]> git.pld-linux.org Git - packages/apache1-mod_witch.git/blame - apache1-mod_witch.spec
- apxs1 in apache1-devel now
[packages/apache1-mod_witch.git] / apache1-mod_witch.spec
CommitLineData
db28fcc7 1%define mod_name witch
582cfaa4 2%define apxs /usr/sbin/apxs1
db28fcc7 3Summary: Apache module: log the access_log and error_log log into the syslogd
d3c88b9a 4Summary(pl.UTF-8): Moduł do apache przekazujący access_log i error_log do demona syslogd
582cfaa4 5Name: apache1-mod_%{mod_name}
db28fcc7 6Version: 0.0.5
fd5cbd89 7Release: 4
368b6afd 8License: GPL v2
db28fcc7
MW
9Group: Networking/Daemons
10Source0: http://savannah.nongnu.org/download/mod-witch/mod-witch.pkg/%{version}/mod-witch-%{version}.tar.gz
8b57f697 11# Source0-md5: a2ffe2f9e28947426321615e2ba57fc7
582cfaa4 12Source1: %{name}.conf
cb724c85 13URL: http://savannah.nongnu.org/projects/mod-witch/
5c37dfac 14BuildRequires: apache1-devel >= 1.3.39
c6a3a95b 15BuildRequires: rpmbuild(macros) >= 1.268
6464169f
ER
16Requires(triggerpostun): %{apxs}
17Requires(triggerpostun): grep
18Requires(triggerpostun): sed >= 4.0
fd5cbd89 19Requires: apache1(EAPI)
c6a3a95b 20Obsoletes: apache-mod_witch <= 0.0.5
db28fcc7
MW
21BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
6464169f
ER
23%define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
24%define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)
db28fcc7
MW
25
26%description
cb724c85
JB
27This mod_witch apache module project intend to help the Apache web
28server to log the access_log and error_log log into the syslogd, this
29way apache will be able to log onto a remote logger machine with the
30syslogd.
db28fcc7 31
b8e04810
JR
32%description -l pl.UTF-8
33Moduł apache'a mod_witch ma pomóc serwerowi WWW apache przekazywać
34logi access_log i error_log do syslogd, umożliwiając w ten sposób
35logowanie na inną maszynę.
db28fcc7
MW
36
37%prep
38%setup -q -n mod-%{mod_name}-%{version}
39
40%build
582cfaa4 41%{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.so
db28fcc7
MW
42
43%install
44rm -rf $RPM_BUILD_ROOT
6464169f 45install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d}
db28fcc7
MW
46
47install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
6464169f 48install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_mod_%{mod_name}.conf
db28fcc7
MW
49
50%clean
51rm -rf $RPM_BUILD_ROOT
52
53%post
c6a3a95b 54%service -q apache restart
db28fcc7 55
3e9825c2 56%postun
db28fcc7 57if [ "$1" = "0" ]; then
c6a3a95b 58 %service -q apache restart
db28fcc7
MW
59fi
60
6464169f 61%triggerpostun -- %{name} < 0.0.5-2.1
225fc8b2 62if grep -q '^Include conf\.d/\*\.conf' /etc/apache/apache.conf; then
6464169f
ER
63 %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
64 sed -i -e '
65 /^Include.*mod_%{mod_name}\.conf/d
66 ' /etc/apache/apache.conf
67else
68 # they're still using old apache.conf
69 sed -i -e '
70 s,^Include.*mod_%{mod_name}\.conf,Include %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf,
71 ' /etc/apache/apache.conf
72fi
73if [ -f /var/lock/subsys/apache ]; then
74 /etc/rc.d/init.d/apache restart 1>&2
75fi
76
db28fcc7
MW
77%files
78%defattr(644,root,root,755)
3f9ca957 79%doc ChangeLog README TODO
4cd395ec 80%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf
db28fcc7 81%attr(755,root,root) %{_pkglibdir}/*
This page took 0.087537 seconds and 4 git commands to generate.