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