]> git.pld-linux.org Git - packages/apache1-mod_witch.git/blob - apache1-mod_witch.spec
d385d006cce4c0229ed1a21f18c2f04da885416c
[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):    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:  %{apxs}
15 BuildRequires:  apache1-devel >= 1.3.33-2
16 BuildRequires:  rpmbuild(macros) >= 1.268
17 Requires(triggerpostun):        %{apxs}
18 Requires(triggerpostun):        grep
19 Requires(triggerpostun):        sed >= 4.0
20 Requires:       apache1(EAPI)
21 Obsoletes:      apache-mod_witch <= 0.0.5
22 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24 %define         _pkglibdir      %(%{apxs} -q LIBEXECDIR 2>/dev/null)
25 %define         _sysconfdir     %(%{apxs} -q SYSCONFDIR 2>/dev/null)
26
27 %description
28 This mod_witch apache module project intend to help the Apache web
29 server to log the access_log and error_log log into the syslogd, this
30 way apache will be able to log onto a remote logger machine with the
31 syslogd.
32
33 %description -l pl
34 Modu³ apache'a mod_witch ma pomóc serwerowi WWW apache przekazywaæ
35 logi access_log i error_log do syslogd, umo¿liwiaj±c w ten sposób
36 logowanie na inn± maszynê.
37
38 %prep
39 %setup -q -n mod-%{mod_name}-%{version}
40
41 %build
42 %{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.so
43
44 %install
45 rm -rf $RPM_BUILD_ROOT
46 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d}
47
48 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
49 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_mod_%{mod_name}.conf
50
51 %clean
52 rm -rf $RPM_BUILD_ROOT
53
54 %post
55 %service -q apache restart
56
57 %postun
58 if [ "$1" = "0" ]; then
59         %service -q apache restart
60 fi
61
62 %triggerpostun -- %{name} < 0.0.5-2.1
63 if grep -q '^Include conf\.d/\*\.conf' /etc/apache/apache.conf; then
64         %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
65         sed -i -e '
66                 /^Include.*mod_%{mod_name}\.conf/d
67         ' /etc/apache/apache.conf
68 else
69         # they're still using old apache.conf
70         sed -i -e '
71                 s,^Include.*mod_%{mod_name}\.conf,Include %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf,
72         ' /etc/apache/apache.conf
73 fi
74 if [ -f /var/lock/subsys/apache ]; then
75         /etc/rc.d/init.d/apache restart 1>&2
76 fi
77
78 %files
79 %defattr(644,root,root,755)
80 %doc ChangeLog README TODO
81 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf
82 %attr(755,root,root) %{_pkglibdir}/*
This page took 0.119463 seconds and 2 git commands to generate.