2 %define apxs /usr/sbin/apxs1
3 Summary: Apache module: Automatically updates files in a CVS-based webtree
4 Summary(pl): Modu³ do apache: Automatyczne uaktualnianie plików z drzewa CVS
5 Name: apache1-mod_%{mod_name}
9 Group: Networking/Daemons
10 # working URL: http://www.sub.nu/mod_cvs/src/
11 # (but only separate files here, no tarball)
12 Source0: ftp://ftp.sub.nu/pub/mod_cvs/mod_%{mod_name}-%{version}.tar.gz
13 # Source0-md5: e2cfe7818337915e6cbaffa45852012f
14 URL: http://www.sub.nu/mod_cvs/
15 BuildRequires: %{apxs}
16 BuildRequires: apache1-devel >= 1.3.33-2
17 BuildRequires: zlib-devel
18 Requires(triggerpostun): %{apxs}
19 Requires: apache1 >= 1.3.33-2
20 Obsoletes: apache-mod_%{mod_name} <= %{version}
21 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23 %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
24 %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)
27 Apache module: Automatically updates files in a CVS-based webtree.
30 Modu³ do apache: Automatyczne uaktualnianie plików z drzewa CVS.
33 %setup -q -n mod_%{mod_name}-%{version}
36 %{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.so -lz
39 rm -rf $RPM_BUILD_ROOT
40 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d}
42 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
44 echo 'LoadModule %{mod_name}_module modules/mod_%{mod_name}.so' > \
45 $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_mod_%{mod_name}.conf
48 rm -rf $RPM_BUILD_ROOT
51 if [ -f /var/lock/subsys/apache ]; then
52 /etc/rc.d/init.d/apache restart 1>&2
56 if [ "$1" = "0" ]; then
57 if [ -f /var/lock/subsys/apache ]; then
58 /etc/rc.d/init.d/apache restart 1>&2
62 %triggerpostun -- apache1-mod_%{mod_name} < 0.5-1.1
63 # check that they're not using old apache.conf
64 if grep -q '^Include conf\.d' /etc/apache/apache.conf; then
65 %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
69 %defattr(644,root,root,755)
71 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf
72 %attr(755,root,root) %{_pkglibdir}/*