]> git.pld-linux.org Git - packages/apache1-mod_frontpage.git/blobdiff - apache1-mod_frontpage.spec
- adapterized (sorted %verify attrs)
[packages/apache1-mod_frontpage.git] / apache1-mod_frontpage.spec
index 5eb072e67726b634c597f531aed26aaa81c11f19..eb1d3b35b58ba3ab43095f5b3f946638355cc0ad 100644 (file)
@@ -1,12 +1,10 @@
 %define        mod_name        frontpage
-%define                arname          mod_%{mod_name}
-%define                apxs            /usr/sbin/apxs
-
+%define                apxs            /usr/sbin/apxs1
 Summary:       The improved mod_frontpage module for the Apache Web server
 Summary(pl):   Ulepszony modu³ mod_frontpage dla serwera Apache
-Name:          apache-mod_%{mod_name}
+Name:          apache1-mod_%{mod_name}
 Version:       1.6.2
-Release:       1
+Release:       2
 License:       Apache
 Group:         Networking/Daemons
 Source0:       http://dl.sourceforge.net/mirfak/mod_%{mod_name}_mirfak-%{version}.tar.bz2
@@ -14,22 +12,21 @@ 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: apache(EAPI)-devel >= 1.3.23
-BuildRequires: perl
-PreReq:                apache(EAPI) >= 1.3.23
-Requires(post,preun):  %{apxs}
-Requires:      apache
+BuildRequires: %{__perl}
+BuildRequires: apache1-devel >= 1.3.33-2
+Requires(triggerpostun):       %{apxs}
+Requires:              apache1 >= 1.3.33-2
+Obsoletes:     apache-mod_%{mod_name} <= %{version}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-Obsoletes:     mod_frontpage
 
-%define                _pkglibdir      %(%{apxs} -q LIBEXECDIR)
-%define                _sysconfdir     /etc/httpd
+%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
-and module supplied with the FrontPage Server Extensions available
-from Microsoft <http://www.microsoft.com/> and Ready-to-Run Software
+<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/>.
 
 Using this module allows you to use advanced features of the FrontPage
@@ -49,40 +46,48 @@ rozszerzeniami FrontPage przy u
 uruchamiania fpinstall.sh lub fpsrvadm.exe z pow³oki systemowej).
 
 %prep
-%setup -q -n %{arname}_mirfak-%{version}
+%setup -q -n mod_%{mod_name}_mirfak-%{version}
 %patch0 -p1
 
 %build
-perl %{SOURCE1}
+%{__perl} %{SOURCE1}
 %{__make}
 
 %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/httpd ]; then
-       /etc/rc.d/init.d/httpd restart 1>&2
+if [ -f /var/lock/subsys/apache ]; then
+       /etc/rc.d/init.d/apache restart 1>&2
 fi
 
-%preun
+%postun
 if [ "$1" = "0" ]; then
-       %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
-       if [ -f /var/lock/subsys/httpd ]; then
-               /etc/rc.d/init.d/httpd restart 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 CHANGES FEATURES LICENSE README
+%doc *.html CHANGES FEATURES README
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_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.05398 seconds and 4 git commands to generate.