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