]>
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/ |
98390747 | 15 | BuildRequires: %{apxs} |
f12967b2 | 16 | BuildRequires: apache1-devel >= 1.3.33-2 |
ca0712cb | 17 | BuildRequires: rpmbuild(macros) >= 1.268 |
9f96e4e7 | 18 | BuildRequires: zlib-devel |
f12967b2 | 19 | Requires(triggerpostun): %{apxs} |
48e4ef8d | 20 | Requires: apache1(EAPI) |
62d10ec9 | 21 | Obsoletes: apache-mod_cvs <= 0.5 |
f37eb400 | 22 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
9f96e4e7 | 23 | |
f12967b2 ER |
24 | %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null) |
25 | %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null) | |
9f96e4e7 | 26 | |
27 | %description | |
f0af99b7 | 28 | Apache module: Automatically updates files in a CVS-based webtree. |
9f96e4e7 | 29 | |
997ae306 JR |
30 | %description -l pl.UTF-8 |
31 | Moduł do apache: Automatyczne uaktualnianie plików z drzewa CVS. | |
9f96e4e7 | 32 | |
ac9826a0 | 33 | %prep |
9f96e4e7 | 34 | %setup -q -n mod_%{mod_name}-%{version} |
35 | ||
36 | %build | |
98390747 | 37 | %{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.so -lz |
9f96e4e7 | 38 | |
39 | %install | |
40 | rm -rf $RPM_BUILD_ROOT | |
f12967b2 | 41 | install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d} |
9f96e4e7 | 42 | |
43 | install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir} | |
44 | ||
f12967b2 ER |
45 | echo 'LoadModule %{mod_name}_module modules/mod_%{mod_name}.so' > \ |
46 | $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_mod_%{mod_name}.conf | |
47 | ||
91066afd JB |
48 | %clean |
49 | rm -rf $RPM_BUILD_ROOT | |
50 | ||
9f96e4e7 | 51 | %post |
ca0712cb | 52 | %service -q apache restart |
9f96e4e7 | 53 | |
b0528b07 | 54 | %postun |
9f96e4e7 | 55 | if [ "$1" = "0" ]; then |
ca0712cb | 56 | %service -q apache restart |
9f96e4e7 | 57 | fi |
58 | ||
f12967b2 ER |
59 | %triggerpostun -- apache1-mod_%{mod_name} < 0.5-1.1 |
60 | # check that they're not using old apache.conf | |
61 | if grep -q '^Include conf\.d' /etc/apache/apache.conf; then | |
62 | %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2 | |
63 | fi | |
64 | ||
9f96e4e7 | 65 | %files |
66 | %defattr(644,root,root,755) | |
39078c1e | 67 | %doc README |
b4cbea13 | 68 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf |
9f96e4e7 | 69 | %attr(755,root,root) %{_pkglibdir}/* |