Author: glen                         Date: Wed Dec 28 07:02:34 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- convert to webapps

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

---- Diffs:

================================================================
Index: SPECS/smbwebclient.spec
diff -u SPECS/smbwebclient.spec:1.35 SPECS/smbwebclient.spec:1.36
--- SPECS/smbwebclient.spec:1.35        Thu Oct  6 15:42:38 2005
+++ SPECS/smbwebclient.spec     Wed Dec 28 08:02:29 2005
@@ -3,7 +3,7 @@
 Summary(pl):   SmbWebClient - skrypt do używania sieci Windows z przeglądarki
 Name:          smbwebclient
 Version:       2.9
-Release:       1.3
+Release:       1.5
 License:       GPL
 Group:         Applications/WWW
 Source0:       http://dl.sourceforge.net/smbwebclient/%{name}-%{version}.php.gz
@@ -13,10 +13,14 @@
 BuildRequires: rpmbuild(macros) >= 1.226
 Requires:      php
 Requires:      samba-client
+Requires:      webapps
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define                _phpdir         %{_datadir}/%{name}
+%define                _webapps        /etc/webapps
+%define                _webapp         %{name}
+%define                _sysconfdir     %{_webapps}/%{_webapp}
+%define                _appdir         %{_datadir}/%{_webapp}
 
 %description
 SmbWebClient is a simple script written by Victor M. Varela to use
@@ -31,29 +35,61 @@
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_phpdir},%{_sysconfdir}/httpd}
-install %{name}.php $RPM_BUILD_ROOT%{_phpdir}/smbwebclient.php
-install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache-%{name}.conf
+install -d $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir}/httpd}
+install %{name}.php $RPM_BUILD_ROOT%{_appdir}/smbwebclient.php
+install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
+install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%triggerin -- apache1 >= 1.3.33-2
-%apache_config_install -v 1 -c %{_sysconfdir}/apache-%{name}.conf
+%triggerin -- apache1
+%webapp_register apache %{_webapp}
 
-%triggerun -- apache1 >= 1.3.33-2
-%apache_config_uninstall -v 1
+%triggerun -- apache1
+%webapp_unregister apache %{_webapp}
 
 %triggerin -- apache >= 2.0.0
-%apache_config_install -v 2 -c %{_sysconfdir}/apache-%{name}.conf
+%webapp_register httpd %{_webapp}
 
 %triggerun -- apache >= 2.0.0
-%apache_config_uninstall -v 2
+%webapp_unregister httpd %{_webapp}
+
+%triggerpostun -- %{name} < 2.9-1.5
+if [ -f /etc/apache-%{name}.conf.rpmsave ]; then
+       if [ -d /etc/apache/webapps.d ]; then
+               cp -f %{_sysconfdir}/apache.conf{,.rpmnew}
+               cp -f /etc/apache-%{name}.conf.rpmsave 
%{_sysconfdir}/apache.conf
+       fi
+
+       if [ -d /etc/httpd/webapps.d ]; then
+               cp -f %{_sysconfdir}/httpd.conf{,.rpmnew}
+               cp -f /etc/apache-%{name}.conf.rpmsave %{_sysconfdir}/httpd.conf
+       fi
+       rm -f /etc/apache-%{name}.conf.rpmsave
+fi
+
+if [ -L /etc/apache/conf.d/99_%{name}.conf ]; then
+       rm -f /etc/apache/conf.d/99_%{name}.conf
+       /usr/sbin/webapp register apache %{_webapp}
+       if [ -f /var/lock/subsys/apache ]; then
+               /etc/rc.d/init.d/apache reload 1>&2
+       fi
+fi
+if [ -L /etc/httpd/httpd.conf/99_%{name}.conf ]; then
+       rm -f /etc/httpd/httpd.conf/99_%{name}.conf
+       /usr/sbin/webapp register httpd %{_webapp}
+       if [ -f /var/lock/subsys/httpd ]; then
+               /etc/rc.d/init.d/httpd reload 1>&2
+       fi
+fi
 
 %files
 %defattr(644,root,root,755)
-%config(noreplace) %verify(not md5 mtime size) 
%{_sysconfdir}/apache-%{name}.conf
-%{_phpdir}
+%dir %attr(750,root,http) %{_sysconfdir}
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) 
%{_sysconfdir}/apache.conf
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) 
%{_sysconfdir}/httpd.conf
+%{_appdir}
 
 %define        date    %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -61,6 +97,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.36  2005/12/28 07:02:29  glen
+- convert to webapps
+
 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
================================================================

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

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to