SPECS: smbwebclient.spec - use apache config triggers (no migratio...

glen glen at pld-linux.org
Thu Oct 6 15:42:47 CEST 2005


Author: glen                         Date: Thu Oct  6 13:42:47 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- use apache config triggers (no migration triggers as pkg was never on ftp)
- changed Group to Applications/WWW

---- Files affected:
SPECS:
   smbwebclient.spec (1.34 -> 1.35) 

---- Diffs:

================================================================
Index: SPECS/smbwebclient.spec
diff -u SPECS/smbwebclient.spec:1.34 SPECS/smbwebclient.spec:1.35
--- SPECS/smbwebclient.spec:1.34	Fri May 20 19:56:16 2005
+++ SPECS/smbwebclient.spec	Thu Oct  6 15:42:38 2005
@@ -3,13 +3,14 @@
 Summary(pl):	SmbWebClient - skrypt do używania sieci Windows z przeglądarki
 Name:		smbwebclient
 Version:	2.9
-Release:	1
+Release:	1.3
 License:	GPL
-Group:		Applications/System
+Group:		Applications/WWW
 Source0:	http://dl.sourceforge.net/smbwebclient/%{name}-%{version}.php.gz
 # Source0-md5:	9c4a18d2bc477989a85d55f8ba55bc50
 Source1:	%{name}.conf
 URL:		http://smbwebclient.sourceforge.net/
+BuildRequires:	rpmbuild(macros) >= 1.226
 Requires:	php
 Requires:	samba-client
 BuildArch:	noarch
@@ -26,52 +27,33 @@
 celu korzystania z sieci Windows z poziomu przeglądarki internetowej.
 
 %prep
-cp %{SOURCE0} .
-gunzip smbwebclient-%{version}.php.gz
+gunzip -dc %{SOURCE0} > %{name}.php
 
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_phpdir},%{_sysconfdir}/httpd}
-
-install smbwebclient-%{version}.php $RPM_BUILD_ROOT%{_phpdir}/smbwebclient.php
-
-install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/%{name}.conf
+install %{name}.php $RPM_BUILD_ROOT%{_phpdir}/smbwebclient.php
+install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache-%{name}.conf
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%post
-if [ -f /etc/httpd/httpd.conf ] && ! grep -q "^Include.*%{name}.conf" /etc/httpd/httpd.conf; then
-	echo "Include /etc/httpd/%{name}.conf" >> /etc/httpd/httpd.conf
-elif [ -d /etc/httpd/httpd.conf ]; then
-	ln -sf /etc/httpd/%{name}.conf /etc/httpd/httpd.conf/99_%{name}.conf
-fi
-if [ -f /var/lock/subsys/httpd ]; then
-	/usr/sbin/apachectl restart 1>&2
-fi
-
-%preun
-if [ "$1" = "0" ]; then
-	umask 027
-	if [ -d /etc/httpd/httpd.conf ]; then
-		rm -f /etc/httpd/httpd.conf/99_%{name}.conf
-	else
-		grep -v "^Include.*%{name}.conf" /etc/httpd/httpd.conf > \
-			/etc/httpd/httpd.conf.tmp
-		mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
-		if [ -f /var/lock/subsys/httpd ]; then
-			/usr/sbin/apachectl restart 1>&2
-		fi
-	fi
-fi
+%triggerin -- apache1 >= 1.3.33-2
+%apache_config_install -v 1 -c %{_sysconfdir}/apache-%{name}.conf
+
+%triggerun -- apache1 >= 1.3.33-2
+%apache_config_uninstall -v 1
+
+%triggerin -- apache >= 2.0.0
+%apache_config_install -v 2 -c %{_sysconfdir}/apache-%{name}.conf
+
+%triggerun -- apache >= 2.0.0
+%apache_config_uninstall -v 2
 
 %files
 %defattr(644,root,root,755)
-%dir %{_phpdir}
-%{_phpdir}/smbwebclient.php
-%dir %{_sysconfdir}
-%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*
-%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd/%{name}.conf
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache-%{name}.conf
+%{_phpdir}
 
 %define	date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -79,6 +61,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.35  2005/10/06 13:42:38  glen
+- use apache config triggers (no migration triggers as pkg was never on ftp)
+- changed Group to Applications/WWW
+
 Revision 1.34  2005/05/20 17:56:16  darekr
 - missing dir
 
@@ -100,7 +86,7 @@
 - workaround for SOURCE0
 
 Revision 1.28  2005/02/09 12:45:21  paszczus
- -updated to 2.3
+- updated to 2.3
 
 Revision 1.27  2005/02/06 17:35:14  czucz
 - updated to 2.2
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/smbwebclient.spec?r1=1.34&r2=1.35&f=u




More information about the pld-cvs-commit mailing list