]> git.pld-linux.org Git - packages/apache1-mod_watch.git/blobdiff - apache1-mod_watch.spec
- może wrescie ktoś wykasuje to konto ?
[packages/apache1-mod_watch.git] / apache1-mod_watch.spec
index 48550baf4bad2b4d1b072b3d7525dc994e7feb99..be8c55d63f5e9acf326983f7803cd988edb4546a 100644 (file)
@@ -4,16 +4,19 @@ Summary:      Apache module: Monitoring Interface for MRTG
 Summary(pl):   Modu³ do apache: Interfejs do monitorowania za pomoc± MRTG
 Name:          apache-mod_%{mod_name}
 Version:       3.13
-Release:       2
+Release:       3
 License:       BSD
 Group:         Networking/Daemons
-Source0:       http://www.snert.com/Software/mod_watch/mod_watch%(echo %{version} | sed -e "s#\.##g").tgz
+Source0:       http://www.snert.com/Software/mod_watch/mod_watch%(echo %{version} | tr -d .).tgz
+# Source0-md5: 89ca8cee3315d8073359d47104583aee
 Source1:       %{name}.conf
 Patch0:                %{name}-PLD-v6stuff.patch
 URL:           http://www.snert.com/Software/mod_watch/
 BuildRequires: %{apxs}
 BuildRequires: apache(EAPI)-devel
-Prereq:                %{_sbindir}/apxs
+Requires(post,preun):  %{apxs}
+Requires(post,preun):  grep
+Requires(preun):       fileutils
 Requires:      apache(EAPI)
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -49,14 +52,20 @@ install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/httpd}
 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/mod_watch.conf
 
+mv mod_watch.html mod_watch_pl.html
+sed -e 's/<!--#/<!--/g' index.shtml > mod_watch.html
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
 %post
 %{apxs} -e -a -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
 if [ -f %{_sysconfdir}/httpd/httpd.conf ] && \
-   ! grep -q "^Include.*mod_watch.conf" %{_sysconfdir}/httpd/httpd.conf; then
+    ! grep -q "^Include.*mod_watch.conf" %{_sysconfdir}/httpd/httpd.conf; then
        echo Include %{_sysconfdir}/httpd/mod_watch.conf >> %{_sysconfdir}/httpd/httpd.conf
 fi
 if [ -f /var/lock/subsys/httpd ]; then
-       %{_sysconfdir}/rc.d/init.d/httpd restart 1>&2
+       /etc/rc.d/init.d/httpd restart 1>&2
 else
        echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache http daemon."
 fi
@@ -64,17 +73,15 @@ 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_watch.conf" %{_sysconfdir}/httpd/httpd.conf > \
                %{_sysconfdir}/httpd/httpd.conf.tmp
        mv -f %{_sysconfdir}/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
        if [ -f /var/lock/subsys/httpd ]; then
-               %{_sysconfdir}/rc.d/init.d/httpd restart 1>&2
+               /etc/rc.d/init.d/httpd restart 1>&2
        fi
 fi
 
-%clean
-rm -rf $RPM_BUILD_ROOT
-
 %files
 %defattr(644,root,root,755)
 %doc CHANGES* *.html
This page took 0.06606 seconds and 4 git commands to generate.