]> git.pld-linux.org Git - packages/apache1-mod_witch.git/blob - apache1-mod_witch.spec
- confdir enabled apache1
[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:        2.1
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 Requires(triggerpostun):        %{apxs}
17 Requires(triggerpostun):        grep
18 Requires(triggerpostun):        sed >= 4.0
19 Requires:       apache1 >= 1.3.33-2
20 Obsoletes:      apache-mod_%{mod_name} <= %{version}
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
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 if [ -f /var/lock/subsys/apache ]; then
55         /etc/rc.d/init.d/apache restart 1>&2
56 fi
57
58 %preun
59 if [ "$1" = "0" ]; then
60         if [ -f /var/lock/subsys/apache ]; then
61                 /etc/rc.d/init.d/apache restart 1>&2
62         fi
63 fi
64
65 %triggerpostun -- %{name} < 0.0.5-2.1
66 if grep -q '^Include conf\.d' /etc/apache/apache.conf; then
67         %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
68         sed -i -e '
69                 /^Include.*mod_%{mod_name}\.conf/d
70         ' /etc/apache/apache.conf
71 else
72         # they're still using old apache.conf
73         sed -i -e '
74                 s,^Include.*mod_%{mod_name}\.conf,Include %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf,
75         ' /etc/apache/apache.conf
76 fi
77 if [ -f /var/lock/subsys/apache ]; then
78         /etc/rc.d/init.d/apache restart 1>&2
79 fi
80
81 %files
82 %defattr(644,root,root,755)
83 %doc ChangeLog README TODO
84 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf
85 %attr(755,root,root) %{_pkglibdir}/*
This page took 0.078966 seconds and 3 git commands to generate.