]> git.pld-linux.org Git - packages/minify.git/blame - minify.spec
- use github code, adds option to minify JS with Closure Compiler API w/ JSMin failover
[packages/minify.git] / minify.spec
CommitLineData
981a47f4
ER
1Summary: Combines, minifies, and caches JavaScript and CSS files on demand to speed up page loads
2Name: minify
6626a6f2 3Version: 2.1.4
ed36d77a 4Release: 0.13
981a47f4
ER
5License: New BSD License
6Group: Applications/WWW
ed36d77a
ER
7#Source0: http://minify.googlecode.com/files/%{name}_%{version}_beta.zip
8Source0: https://github.com/mrclay/minify/tarball/master#/%{name}.tgz
9# Source0-md5: 2eeff0f069b52b89ba78c22d20de60e2
3e524d3a 10Patch0: paths.patch
981a47f4
ER
11Source1: apache.conf
12Source2: lighttpd.conf
13URL: http://code.google.com/p/minify/
14BuildRequires: rpmbuild(macros) >= 1.553
15a438fc 15BuildRequires: unzip
981a47f4
ER
16Requires: php-%{name} = %{version}-%{release}
17Requires: webapps
18BuildArch: noarch
19BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20
21%define _webapps /etc/webapps
22%define _webapp %{name}
23%define _sysconfdir %{_webapps}/%{_webapp}
24%define _appdir %{_datadir}/%{_webapp}
25%define cachedir /var/cache/%{name}
26
27%description
28Minify is a PHP5 app that helps you follow several of Yahoo!'s Rules
29for High Performance Web Sites.
30
31It combines multiple CSS or Javascript files, removes unnecessary
32whitespace and comments, and serves them with gzip encoding and
33optimal client-side cache headers.
34
35%package -n php-%{name}
36Summary: Minify Classes
37Group: Applications/WWW
38
39%description -n php-%{name}
40Minify Classes.
41
42%package builder
43Summary: Minify URI Builder
44Group: Applications/WWW
45Requires: %{name} = %{version}-%{release}
46
47%description builder
48Minify URI Builder.
49
50%package unit_tests
51Summary: Unit tests for Minify
52Group: Applications/WWW
53Requires: %{name} = %{version}-%{release}
54
55%description unit_tests
56Unit tests for Minify.
57
58%prep
59%setup -qc
ed36d77a 60mv mrclay-minify-*/* .
3e524d3a 61%patch0 -p1
981a47f4
ER
62%undos UPGRADING.txt
63%undos -f php
64
65mv min/README.txt README.min.txt
66
67%install
68rm -rf $RPM_BUILD_ROOT
69install -d $RPM_BUILD_ROOT{%{php_data_dir},%{_sysconfdir},%{_appdir},%{cachedir}}
70
3e524d3a
ER
71cp -a min/*.php min/builder $RPM_BUILD_ROOT%{_appdir}
72cp -a min/lib/* $RPM_BUILD_ROOT%{php_data_dir}
981a47f4
ER
73
74for config in config.php groupsConfig.php; do
75 mv $RPM_BUILD_ROOT{%{_appdir}/$config,%{_sysconfdir}}
76 ln -s %{_sysconfdir}/$config $RPM_BUILD_ROOT%{_appdir}
77done
78
3e524d3a
ER
79cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
80cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
81cp -p $RPM_BUILD_ROOT%{_sysconfdir}/{apache,httpd}.conf
981a47f4
ER
82
83%triggerin -- apache1 < 1.3.37-3, apache1-base
84%webapp_register apache %{_webapp}
85
86%triggerun -- apache1 < 1.3.37-3, apache1-base
87%webapp_unregister apache %{_webapp}
88
89%triggerin -- apache < 2.2.0, apache-base
90%webapp_register httpd %{_webapp}
91
92%triggerun -- apache < 2.2.0, apache-base
93%webapp_unregister httpd %{_webapp}
94
95%triggerin -- lighttpd
96%webapp_register lighttpd %{_webapp}
97
98%triggerun -- lighttpd
99%webapp_unregister lighttpd %{_webapp}
100
101%clean
102rm -rf $RPM_BUILD_ROOT
103
104%preun
105if [ "$1" = 0 ]; then
106 echo %{cachedir}/* | xargs rm -rf
107fi
108
109%files
110%defattr(644,root,root,755)
111%doc *.txt
112%dir %attr(750,root,http) %{_sysconfdir}
113%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
114%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
115%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
116%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.php
117%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/groupsConfig.php
118%dir %{_appdir}
119%{_appdir}/*.php
120
121%dir %attr(771,root,http) %{cachedir}
122
123%files builder
124%defattr(644,root,root,755)
125%{_appdir}/builder
126
127%files -n php-%{name}
128%defattr(644,root,root,755)
129%dir %{php_data_dir}/HTTP
130%{php_data_dir}/HTTP/ConditionalGet.php
131%{php_data_dir}/HTTP/Encoder.php
132%{php_data_dir}/FirePHP.php
133%{php_data_dir}/JSMin.php
134%{php_data_dir}/JSMinPlus.php
135%{php_data_dir}/Minify.php
136%{php_data_dir}/Minify
This page took 0.087678 seconds and 4 git commands to generate.