]> git.pld-linux.org Git - packages/apache1-mod_frontpage.git/blobdiff - apache1-mod_frontpage.spec
- confdir enabled apache1
[packages/apache1-mod_frontpage.git] / apache1-mod_frontpage.spec
index 6e6fe3f01fa535f6b2ecd062ca594a809b224242..469c02434154e9ec2366d3b674273c48b383a5ee 100644 (file)
@@ -4,7 +4,7 @@ Summary:        The improved mod_frontpage module for the Apache Web server
 Summary(pl):   Ulepszony modu³ mod_frontpage dla serwera Apache
 Name:          apache1-mod_%{mod_name}
 Version:       1.6.2
-Release:       1
+Release:       1.3
 License:       Apache
 Group:         Networking/Daemons
 Source0:       http://dl.sourceforge.net/mirfak/mod_%{mod_name}_mirfak-%{version}.tar.bz2
@@ -12,20 +12,19 @@ Source0:    http://dl.sourceforge.net/mirfak/mod_%{mod_name}_mirfak-%{version}.tar.
 Source1:       %{name}.pl
 Patch0:                %{name}-mirfak.patch
 URL:           http://mirfak.sourceforge.net/
-BuildRequires: apache1-devel >= 1.3.23
+BuildRequires: apache1-devel >= 1.3.33-2
 BuildRequires: %{__perl}
-PreReq:                apache1 >= 1.3.23
-Requires(post,preun):  %{apxs}
-Requires:      apache1
+Requires:              apache1 >= 1.3.33-2
+Requires(triggerpostun):       %{apxs}
 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
 This is a module for the Apache HTTP Server
-<http://www.apache.org/httpd.html>. It replaces the Apache-FP patches
+<http://httpd.apache.org/>. It replaces the Apache-FP patches
 and module supplied with the FrontPage Server Extensions available
 from Microsoft <http://www.microsoft.com/> and Ready-to-Run Software
 <http://www.rtr.com/fpsupport/>.
@@ -56,31 +55,39 @@ uruchamiania fpinstall.sh lub fpsrvadm.exe z pow
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sbindir}}
+install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d,%{_sbindir}}
 
 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
 install fp{exec,static} $RPM_BUILD_ROOT%{_sbindir}
 
+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
-%{apxs} -e -a -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
 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
        if [ -f /var/lock/subsys/apache ]; then
                /etc/rc.d/init.d/apache restart 1>&2
        fi
 fi
 
+%triggerpostun -- apache1-mod_%{mod_name} < 1.6.2-1.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 *.html CHANGES FEATURES README
+%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf
 %attr(755,root,root) %{_pkglibdir}/*
 %attr(4750,root,root) %{_sbindir}/fpexec
 %attr(755,root,root) %{_sbindir}/fpstatic
This page took 0.06824 seconds and 4 git commands to generate.