]> git.pld-linux.org Git - packages/apache1-mod_accounting.git/commitdiff
- confdir enabled apache1 (no triggers as it wasn't on ftp)
authorElan Ruusamäe <glen@pld-linux.org>
Thu, 10 Feb 2005 18:03:22 +0000 (18:03 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- ipv6 bcond (doesn't build with ipv6)
- fix LIB dir

Changed files:
    apache1-mod_accounting.spec -> 1.24

apache1-mod_accounting.spec

index f1b5d3ccb61af813cb45178a3082df8e24780da4..80dbf05cb79948245ba3c670c3e812cd2116909b 100644 (file)
@@ -1,28 +1,31 @@
+# TODO
+# - ipv6 patch not implemented
+%bcond_without ipv6            # disable IPv6 support
+
 %define                mod_name        accounting
 %define        apxs            %{_sbindir}/apxs1
 Summary:       Apache module: record traffic statistics into a database
 Summary(pl):   Modu³ do apache: zapisuje statystyki ruchu do bazy danych
 Name:          apache1-mod_%{mod_name}
 Version:       0.5
-Release:       0.1
+Release:       0.4
 License:       BSD
 Group:         Networking/Daemons
 Source0:       http://dl.sourceforge.net/mod-acct/mod_accounting-%{version}.tar.gz
 # Source0-md5: fc045bbdc5ae32241765fea2967a63fb
 Source1:       %{name}.conf
 URL:           http://sourceforge.net/projects/mod-acct/
-BuildRequires: apache1-devel
+BuildRequires: apache1-devel >= 1.3.33-2
 BuildRequires: mysql-devel
 BuildRequires: postgresql-devel
-Requires(post,preun):  %{apxs}
-Requires(post,preun):  grep
-Requires(preun):       fileutils
-Requires:      apache1
+%{?with_ipv6:BuildRequires:    apache1(ipv6)-devel}
+%{!?with_ipv6:BuildConflicts:  apache1(ipv6)-devel}
+Requires:      apache1 >= 1.3.33-2
 Obsoletes:     apache-mod_%{mod_name} <= %{version}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define                _pkglibdir      %(%{apxs} -q LIBEXECDIR)
-%define                _sysconfdir     %(%{apxs} -q SYSCONFDIR)
+%define                _pkglibdir      %(%{apxs} -q LIBEXECDIR 2>/dev/null)
+%define                _sysconfdir     %(%{apxs} -q SYSCONFDIR 2>/dev/null)
 
 %description
 mod_accounting is a simple Apache module that can record traffic
@@ -40,34 +43,25 @@ przychodz
 PATH=$PATH:%{_sbindir}
 %{__make} \
        APXS=%{apxs} \
-       LIB="%{_includedir}/postgresql %{_includedir}/mysql -lpq -lmysqlclient"
+       LIB="-L%{_includedir}/postgresql -L%{_includedir}/mysql -lpq -lmysqlclient"
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}}
+install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d}
 
 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
-install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/mod_accounting.conf
+install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_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_accounting.conf" /etc/apache/apache.conf; then
-       echo "Include /etc/apache/mod_accounting.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_accounting.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
@@ -76,4 +70,5 @@ fi
 %files
 %defattr(644,root,root,755)
 %doc README ChangeLog
+%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf
 %attr(755,root,root) %{_pkglibdir}/*
This page took 0.081723 seconds and 4 git commands to generate.