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