]> git.pld-linux.org Git - packages/apache1-mod_witch.git/blob - apache1-mod_witch.spec
1e09aec7ad5060daff621e9976e97737a820f40b
[packages/apache1-mod_witch.git] / apache1-mod_witch.spec
1 %define         mod_name        witch
2 %define         apxs            /usr/sbin/apxs
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:           apache-mod_%{mod_name}
6 Version:        0.0.5
7 Release:        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:        apache-mod_witch.conf
13 URL:            http://savannah.nongnu.org/projects/mod-witch/
14 BuildRequires:  %{apxs}
15 BuildRequires:  apache(EAPI)-devel
16 Requires(post,preun):   %{apxs}
17 Requires(post,preun):   grep
18 Requires(preun):        fileutils
19 Requires:       apache(EAPI)
20 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21
22 %define         _pkglibdir      %(%{apxs} -q LIBEXECDIR)
23 %define         _sysconfdir     /etc/httpd
24
25 %description
26 This mod_witch apache module project intend to help the Apache web
27 server to log the access_log and error_log log into the syslogd, this
28 way apache will be able to log onto a remote logger machine with the
29 syslogd.
30
31 %description -l pl
32 Modu³ apache'a mod_witch ma pomóc serwerowi WWW apache przekazywaæ
33 logi access_log i error_log do syslogd, umo¿liwiaj±c w ten sposób
34 logowanie na inn± maszynê.
35
36 %prep
37 %setup -q -n mod-%{mod_name}-%{version}
38
39 %build
40 %{apxs} -Wc,-Wall,-pipe -c mod_%{mod_name}.c -o mod_%{mod_name}.so
41
42 %install
43 rm -rf $RPM_BUILD_ROOT
44 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}}
45
46 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
47 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/mod_%{mod_name}.conf
48
49 %clean
50 rm -rf $RPM_BUILD_ROOT
51
52 %post
53 %{apxs} -e -a -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
54 if [ -f /etc/httpd/httpd.conf ] && ! grep -q "^Include.*mod_%{mod_name}.conf" /etc/httpd/httpd.conf; then
55         echo "Include /etc/httpd/mod_%{mod_name}.conf" >> /etc/httpd/httpd.conf
56 fi
57 if [ -f /var/lock/subsys/httpd ]; then
58         /etc/rc.d/init.d/httpd restart 1>&2
59 fi
60
61 %preun
62 if [ "$1" = "0" ]; then
63         %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
64         umask 027
65         grep -v "^Include.*mod_%{mod_name}.conf" /etc/httpd/httpd.conf > \
66                 /etc/httpd/httpd.conf.tmp
67         mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
68         if [ -f /var/lock/subsys/httpd ]; then
69                 /etc/rc.d/init.d/httpd restart 1>&2
70         fi
71 fi
72
73 %files
74 %defattr(644,root,root,755)
75 %doc ChangeLog README TODO
76 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mod_*.conf
77 %attr(755,root,root) %{_pkglibdir}/*
This page took 0.062331 seconds and 3 git commands to generate.