]> git.pld-linux.org Git - packages/apache1-mod_rpaf.git/commitdiff
- new
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 5 Jan 2005 00:28:43 +0000 (00:28 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    apache1-mod_rpaf.spec -> 1.1

apache1-mod_rpaf.spec [new file with mode: 0644]

diff --git a/apache1-mod_rpaf.spec b/apache1-mod_rpaf.spec
new file mode 100644 (file)
index 0000000..96c8dee
--- /dev/null
@@ -0,0 +1,71 @@
+# TODO
+# - compile fails when apache1 is compiled with ipv6
+%define                mod_name        rpaf
+%define        apxs            %{_sbindir}/apxs1
+Summary:       Apache module: record traffic statistics into a database
+Name:          apache1-mod_%{mod_name}
+Version:       0.5
+Release:       0.3
+License:       Apache
+Group:         Networking/Daemons
+Source0:       http://stderr.net/apache/rpaf/download/mod_%{mod_name}-%{version}.tar.gz
+# Source0-md5: 471fb059d6223a394f319b7c8ab45c4d
+Source1:       %{name}.conf
+URL:           http://stderr.net/apache/rpaf/
+BuildRequires: apache1-devel
+Requires(post,preun):  %{apxs}
+Requires(post,preun):  grep
+Requires:      apache1
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define                _pkglibdir      %(%{apxs} -q LIBEXECDIR 2>/dev/null)
+%define                _sysconfdir     %(%{apxs} -q SYSCONFDIR 2>/dev/null)
+
+%description
+rpaf is for backend Apache servers what mod_proxy_add_forward is for
+frontend Apache servers. It does excactly the opposite of
+mod_proxy_add_forward written by Ask Bjørn Hansen. It will also work
+with mod_proxy in Apache starting with release 1.3.25
+
+%prep
+%setup -q -n mod_%{mod_name}-%{version}
+
+%build
+%{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.so
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}}
+
+install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
+install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/mod_%{mod_name}.conf
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+%{apxs} -e -a -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
+if [ -f /etc/apache/apache.conf ] && ! grep -q "^Include.*mod_%{mod_name}.conf" /etc/apache/apache.conf; then
+       echo "Include /etc/apache/mod_%{mod_name}.conf" >> /etc/apache/apache.conf
+fi
+if [ -f /var/lock/subsys/apache ]; then
+       /etc/rc.d/init.d/apache restart 1>&2
+fi
+
+%preun
+if [ "$1" = "0" ]; then
+       %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
+       umask 027
+       grep -v "^Include.*mod_%{mod_name}.conf" /etc/apache/apache.conf > \
+               /etc/apache/apache.conf.tmp
+       mv -f /etc/apache/apache.conf.tmp /etc/apache/apache.conf
+       if [ -f /var/lock/subsys/apache ]; then
+               /etc/rc.d/init.d/apache restart 1>&2
+       fi
+fi
+
+%files
+%defattr(644,root,root,755)
+%doc README CHANGES test.pl
+%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mod_*.conf
+%attr(755,root,root) %{_pkglibdir}/*
This page took 0.116536 seconds and 4 git commands to generate.