]>
Commit | Line | Data |
---|---|---|
9f96e4e7 | 1 | %define mod_name cvs |
1cc1fec1 | 2 | %define apxs /usr/sbin/apxs1 |
2134f1fe | 3 | Summary: Apache module: Automatically updates files in a CVS-based webtree |
86c538a2 | 4 | Summary(pl.UTF-8): Moduł do apache: Automatyczne uaktualnianie plików z drzewa CVS |
1cc1fec1 | 5 | Name: apache1-mod_%{mod_name} |
03c56de1 | 6 | Version: 0.5 |
48e4ef8d | 7 | Release: 3 |
ed6ebc71 | 8 | License: GPL |
9f96e4e7 | 9 | Group: Networking/Daemons |
d1c093d7 JB |
10 | # working URL: http://www.sub.nu/mod_cvs/src/ |
11 | # (but only separate files here, no tarball) | |
91066afd | 12 | Source0: ftp://ftp.sub.nu/pub/mod_cvs/mod_%{mod_name}-%{version}.tar.gz |
e5271c5e | 13 | # Source0-md5: e2cfe7818337915e6cbaffa45852012f |
9f96e4e7 | 14 | URL: http://www.sub.nu/mod_cvs/ |
caf64922 | 15 | BuildRequires: apache1-devel >= 1.3.39 |
ca0712cb | 16 | BuildRequires: rpmbuild(macros) >= 1.268 |
9f96e4e7 | 17 | BuildRequires: zlib-devel |
f12967b2 | 18 | Requires(triggerpostun): %{apxs} |
48e4ef8d | 19 | Requires: apache1(EAPI) |
62d10ec9 | 20 | Obsoletes: apache-mod_cvs <= 0.5 |
f37eb400 | 21 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
9f96e4e7 | 22 | |
f12967b2 ER |
23 | %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null) |
24 | %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null) | |
9f96e4e7 | 25 | |
26 | %description | |
f0af99b7 | 27 | Apache module: Automatically updates files in a CVS-based webtree. |
9f96e4e7 | 28 | |
997ae306 JR |
29 | %description -l pl.UTF-8 |
30 | Moduł do apache: Automatyczne uaktualnianie plików z drzewa CVS. | |
9f96e4e7 | 31 | |
ac9826a0 | 32 | %prep |
9f96e4e7 | 33 | %setup -q -n mod_%{mod_name}-%{version} |
34 | ||
35 | %build | |
98390747 | 36 | %{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.so -lz |
9f96e4e7 | 37 | |
38 | %install | |
39 | rm -rf $RPM_BUILD_ROOT | |
f12967b2 | 40 | install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d} |
9f96e4e7 | 41 | |
42 | install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir} | |
43 | ||
f12967b2 ER |
44 | echo 'LoadModule %{mod_name}_module modules/mod_%{mod_name}.so' > \ |
45 | $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_mod_%{mod_name}.conf | |
46 | ||
91066afd JB |
47 | %clean |
48 | rm -rf $RPM_BUILD_ROOT | |
49 | ||
9f96e4e7 | 50 | %post |
ca0712cb | 51 | %service -q apache restart |
9f96e4e7 | 52 | |
b0528b07 | 53 | %postun |
9f96e4e7 | 54 | if [ "$1" = "0" ]; then |
ca0712cb | 55 | %service -q apache restart |
9f96e4e7 | 56 | fi |
57 | ||
f12967b2 ER |
58 | %triggerpostun -- apache1-mod_%{mod_name} < 0.5-1.1 |
59 | # check that they're not using old apache.conf | |
60 | if grep -q '^Include conf\.d' /etc/apache/apache.conf; then | |
61 | %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2 | |
62 | fi | |
63 | ||
9f96e4e7 | 64 | %files |
65 | %defattr(644,root,root,755) | |
39078c1e | 66 | %doc README |
b4cbea13 | 67 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf |
9f96e4e7 | 68 | %attr(755,root,root) %{_pkglibdir}/* |