]> git.pld-linux.org Git - packages/apache1-mod_log_sql.git/commitdiff
- confdir enabled apache1
authorElan Ruusamäe <glen@pld-linux.org>
Thu, 10 Feb 2005 01:49:47 +0000 (01:49 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- added patch to make %install re-entrant

Changed files:
    apache1-mod_log_sql.spec -> 1.7

apache1-mod_log_sql.spec

index 02c61941974198edfbe69fcdfca44d26376bdfce..a0ef8fe613f39ef47f8290dfc3ba742556a299a3 100644 (file)
@@ -1,4 +1,5 @@
-# todo: split *.so to subpackages: mysql/dbi/ssl
+# TODO
+# - split *.so to subpackages: mysql/dbi/ssl
 %define                mod_name        log_sql
 %define                apxs            /usr/sbin/apxs1
 Summary:       SQL logging module for Apache
 %define                mod_name        log_sql
 %define                apxs            /usr/sbin/apxs1
 Summary:       SQL logging module for Apache
@@ -6,30 +7,29 @@ Summary(pl):  Modu
 Name:          apache1-mod_%{mod_name}
 # NOTE: remember about apache-mod_log_sql when updating!
 Version:       1.99
 Name:          apache1-mod_%{mod_name}
 # NOTE: remember about apache-mod_log_sql when updating!
 Version:       1.99
-Release:       2
+Release:       2.3
 License:       Apache (?)
 Group:         Networking/Daemons
 Source0:       http://www.outoforder.cc/downloads/mod_log_sql/mod_%{mod_name}-%{version}.tar.gz
 # Source0-md5: e246a3d8e96d2d62715eb34f75c7c11d
 Patch0:                mod_%{mod_name}-acam_libexecdir.patch
 License:       Apache (?)
 Group:         Networking/Daemons
 Source0:       http://www.outoforder.cc/downloads/mod_log_sql/mod_%{mod_name}-%{version}.tar.gz
 # Source0-md5: e246a3d8e96d2d62715eb34f75c7c11d
 Patch0:                mod_%{mod_name}-acam_libexecdir.patch
+Patch1:                mod_%{mod_name}-subdirs.patch
 URL:           http://www.outoforder.cc/projects/apache/mod_log_sql/
 BuildRequires: %{apxs}
 URL:           http://www.outoforder.cc/projects/apache/mod_log_sql/
 BuildRequires: %{apxs}
-BuildRequires: apache1-devel >= 1.3.20
+BuildRequires: apache1-devel >= 1.3.33-2
 BuildRequires: apache1-mod_ssl-devel
 BuildRequires: autoconf
 BuildRequires: automake
 BuildRequires: libdbi-devel >= 0.7.0
 BuildRequires: libtool
 BuildRequires: mysql-devel >= 3.23.30
 BuildRequires: apache1-mod_ssl-devel
 BuildRequires: autoconf
 BuildRequires: automake
 BuildRequires: libdbi-devel >= 0.7.0
 BuildRequires: libtool
 BuildRequires: mysql-devel >= 3.23.30
-Requires(post,preun):  %{apxs}
-Requires(post,preun):  grep
-Requires(preun):       fileutils
-Requires:      apache1
+Requires(triggerpostun):       %{apxs}
+Requires:      apache1 >= 1.3.33-2
 Obsoletes:     apache-mod_log_sql <= 1.13
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 Obsoletes:     apache-mod_log_sql <= 1.13
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define                _sysconfdir     %(%{apxs} -q SYSCONFDIR)
-%define                _pkglibdir      %(%{apxs} -q LIBEXECDIR)
+%define                _pkglibdir      %(%{apxs} -q LIBEXECDIR 2>/dev/null)
+%define                _sysconfdir     %(%{apxs} -q SYSCONFDIR 2>/dev/null)
 
 %description
 mod_log_sql is a logging module for Apache 1.3 and 2.0 which logs all requests
 
 %description
 mod_log_sql is a logging module for Apache 1.3 and 2.0 which logs all requests
@@ -42,6 +42,9 @@ logowanie wszystkich zapyta
 %prep
 %setup -q -n mod_%{mod_name}-%{version}
 %patch0 -p0
 %prep
 %setup -q -n mod_%{mod_name}-%{version}
 %patch0 -p0
+%patch1 -p1
+
+rm -f docs/{Makefile*,*.xml} contrib/Makefile*
 
 %build
 %{__libtoolize}
 
 %build
 %{__libtoolize}
@@ -53,32 +56,36 @@ logowanie wszystkich zapyta
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_pkglibdir}}
+install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d}
 
 install *.so $RPM_BUILD_ROOT%{_pkglibdir}
 
 install *.so $RPM_BUILD_ROOT%{_pkglibdir}
-#install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf
 
 
-rm docs/Makefile* docs/*.xml contrib/Makefile*
+echo 'LoadModule %{mod_name}_module    modules/mod_%{mod_name}.so' > \
+       $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_mod_%{mod_name}.conf
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %post
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %post
-%{apxs} -e -a -n %{mod_name} %{_libexecdir}/mod_%{mod_name}.so 1>&2
 if [ -f /var/lock/subsys/apache ]; then
        /etc/rc.d/init.d/apache restart 1>&2
 fi
 
 %postun
 if [ "$1" = "0" ]; then
 if [ -f /var/lock/subsys/apache ]; then
        /etc/rc.d/init.d/apache restart 1>&2
 fi
 
 %postun
 if [ "$1" = "0" ]; then
-       %{apxs} -e -A -n %{mod_name} %{_libexecdir}/mod_%{mod_name}.so 1>&2
        if [ -f /var/lock/subsys/apache ]; then
                /etc/rc.d/init.d/apache restart 1>&2
        fi
 fi
 
        if [ -f /var/lock/subsys/apache ]; then
                /etc/rc.d/init.d/apache restart 1>&2
        fi
 fi
 
+%triggerpostun -- apache1-mod_%{mod_name} < 1.99-2.1
+# check that they're not using old apache.conf
+if grep -q '^Include conf\.d' /etc/apache/apache.conf; then
+       %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
+fi
+
 %files
 %defattr(644,root,root,755)
 %doc AUTHORS CHANGELOG TODO contrib docs LICENSE
 %files
 %defattr(644,root,root,755)
 %doc AUTHORS CHANGELOG TODO contrib docs LICENSE
+%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf
 %attr(755,root,root) %{_pkglibdir}/*
 %attr(755,root,root) %{_pkglibdir}/*
-#%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.conf
This page took 0.036448 seconds and 4 git commands to generate.