]> git.pld-linux.org Git - packages/apache-mod_pagespeed.git/blob - apache-mod_pagespeed.spec
- initial, fails with some c++ errors
[packages/apache-mod_pagespeed.git] / apache-mod_pagespeed.spec
1 %define         svndate 20101104
2 %define         rel             0.1
3 %define         mod_name        pagespeed
4 %define         apxs            %{_sbindir}/apxs
5 Summary:        Apache module for rewriting web pages to reduce latency and bandwidth
6 Name:           apache-mod_%{mod_name}
7 Version:        0.9.0.0
8 Release:        0.1
9 License:        Apache v2.0
10 Group:          Networking/Daemons/HTTP
11 # svn co http://src.chromium.org/svn/trunk/tools/depot_tools
12 # install -d modpagespeed
13 # cd modpagespeed
14 # ../depot_tools/gclient config http://modpagespeed.googlecode.com/svn/trunk/src
15 # ../depot_tools/gclient sync
16 # cd -
17 # tar -cjf modpagespeed-$(date +%Y%m%d).tar.bz2 --exclude-vcs modpagespeed
18 # ../dropin modpagespeed-$(date +%Y%m%d).tar.bz2 &
19 Source0:        modpagespeed-%{svndate}.tar.bz2
20 # Source0-md5:  -
21 Source1:        apache.conf
22 URL:            http://code.google.com/p/modpagespeed/
23 BuildRequires:  %{apxs}
24 BuildRequires:  apache-devel >= 2.2
25 BuildRequires:  rpmbuild(macros) >= 1.268
26 Requires:       apache(modules-api) = %apache_modules_api
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %define         _pkglibdir      %(%{apxs} -q LIBEXECDIR 2>/dev/null)
30 %define         _sysconfdir     %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d
31
32 %description
33 mod_pagespeed automates the application of those rules in an Apache
34 server. HTML, CSS, JavaScript, and images are changed dynamically
35 during the web serving process, so that the best practices recommended
36 by Page Speed can be used without having to change the way the web
37 site is maintained.
38
39 %prep
40 %setup -q -n modpagespeed
41
42 %build
43 cat > Makefile <<'EOF'
44 default:
45         $(MAKE) -C src \
46         BUILDTYPE=%{!?debug:Release}%{?debug:Debug} \
47         %{?with_verbose:V=1} \
48         CC="%{__cc}" \
49         CXX="%{__cxx}" \
50         CC.host="%{__cc}" \
51         CXX.host="%{__cxx}" \
52         LINK.host="%{__cxx}" \
53         CFLAGS="%{rpmcflags} %{rpmcppflags}" \
54         CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
55 EOF
56 %{__make}
57
58 %install
59 rm -rf $RPM_BUILD_ROOT
60 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}}
61 install -p mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
62
63 # module configuration
64 # - should contain LoadModule line
65 # - and directives must be between IfModule (so user could disable the module easily)
66 cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/90_mod_%{mod_name}.conf
67
68 # or, if no directives needed, put just LoadModule line
69 echo 'LoadModule %{mod_name}_module     modules/mod_%{mod_name}.so' > \
70         $RPM_BUILD_ROOT%{_sysconfdir}/90_mod_%{mod_name}.conf
71
72 %clean
73 rm -rf $RPM_BUILD_ROOT
74
75 %post
76 %service -q httpd restart
77
78 %postun
79 if [ "$1" = "0" ]; then
80         %service -q httpd restart
81 fi
82
83 %files
84 %defattr(644,root,root,755)
85 %doc README
86 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*_mod_%{mod_name}.conf
87 %attr(755,root,root) %{_pkglibdir}/*
This page took 0.046241 seconds and 4 git commands to generate.