Author: glen Date: Wed Dec 28 08:34:15 2005 GMT Module: SPECS Tag: HEAD ---- Log message: - use webapps; rel 2
---- Files affected: SPECS: phpSysInfo.spec (1.18 -> 1.19) ---- Diffs: ================================================================ Index: SPECS/phpSysInfo.spec diff -u SPECS/phpSysInfo.spec:1.18 SPECS/phpSysInfo.spec:1.19 --- SPECS/phpSysInfo.spec:1.18 Thu Dec 15 20:58:32 2005 +++ SPECS/phpSysInfo.spec Wed Dec 28 09:34:10 2005 @@ -3,27 +3,28 @@ Summary(pl): phpSysInfo jest skryptem PHP wyświetlającym informacje o wywołanym hoscie Name: phpSysInfo Version: 2.5.1 -Release: 1 +Release: 2 License: GPL -# not sure about this Group: -Group: Networking/Utilities -Vendor: Uriah Welcome <[EMAIL PROTECTED]> +Group: Applications/WWW Source0: http://dl.sourceforge.net/phpsysinfo/phpsysinfo-%{version}.tar.gz # Source0-md5: 3b42b9df6685c81241d807a8ec8b1254 Source1: %{name}.conf Source2: %{name}-PLD.gif Patch0: %{name}-PLD.patch URL: http://phpsysinfo.sourceforge.net/ +BuildRequires: rpmbuild(macros) >= 1.264 Requires: issue Requires: php -Requires: php-xml Requires: php-pcre -Requires: webserver +Requires: php-xml +Requires: webapps BuildArch: noarch BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) -%define _sysinfodir %{_datadir}/%{name} -%define _sysconfdir /etc/%{name} +%define _webapps /etc/webapps +%define _webapp phpsysinfo +%define _sysconfdir %{_webapps}/%{_webapp} +%define _appdir %{_datadir}/%{_webapp} %description PHPSysInfo is a customizable PHP Script that parses /proc, and formats @@ -43,72 +44,77 @@ %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT%{_sysinfodir}/images \ - $RPM_BUILD_ROOT%{_sysinfodir}/includes/{lang,mb,os,xml} \ - $RPM_BUILD_ROOT{%{_sysconfdir},/etc/httpd} - -install index.php phpsysinfo.dtd distros.ini $RPM_BUILD_ROOT%{_sysinfodir} -install images/*.gif images/*.png %{SOURCE2} $RPM_BUILD_ROOT%{_sysinfodir}/images -install %{SOURCE2} $RPM_BUILD_ROOT%{_sysinfodir}/images/PLD.gif -install includes/*.php $RPM_BUILD_ROOT%{_sysinfodir}/includes -install includes/lang/*.php $RPM_BUILD_ROOT%{_sysinfodir}/includes/lang -install includes/mb/*.php $RPM_BUILD_ROOT%{_sysinfodir}/includes/mb -install includes/os/*.php $RPM_BUILD_ROOT%{_sysinfodir}/includes/os -install includes/xml/*.php $RPM_BUILD_ROOT%{_sysinfodir}/includes/xml +install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}/{images,includes/{lang,mb,os,xml}}} -cp -r templates $RPM_BUILD_ROOT%{_sysinfodir}/templates -rm $RPM_BUILD_ROOT%{_sysinfodir}/templates/index.html +install index.php phpsysinfo.dtd distros.ini $RPM_BUILD_ROOT%{_appdir} +install images/*.gif images/*.png %{SOURCE2} $RPM_BUILD_ROOT%{_appdir}/images +install %{SOURCE2} $RPM_BUILD_ROOT%{_appdir}/images/PLD.gif +install includes/*.php $RPM_BUILD_ROOT%{_appdir}/includes +install includes/lang/*.php $RPM_BUILD_ROOT%{_appdir}/includes/lang +install includes/mb/*.php $RPM_BUILD_ROOT%{_appdir}/includes/mb +install includes/os/*.php $RPM_BUILD_ROOT%{_appdir}/includes/os +install includes/xml/*.php $RPM_BUILD_ROOT%{_appdir}/includes/xml -install config.php.new $RPM_BUILD_ROOT%{_sysconfdir}/config.php -ln -sf %{_sysconfdir}/config.php $RPM_BUILD_ROOT%{_sysinfodir}/config.php +cp -a templates $RPM_BUILD_ROOT%{_appdir}/templates +rm $RPM_BUILD_ROOT%{_appdir}/templates/index.html -install %{SOURCE1} $RPM_BUILD_ROOT/etc/httpd/%{name}.conf +install config.php.new $RPM_BUILD_ROOT%{_sysconfdir}/config.php +install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf +install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.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 - if [ -f /var/lock/subsys/httpd ]; then - /usr/sbin/apachectl restart 1>&2 - fi -elif [ -d /etc/httpd/httpd.conf ]; then - ln -sf /etc/httpd/%{name}.conf /etc/httpd/httpd.conf/99_%{name}.conf - if [ -f /var/lock/subsys/httpd ]; then - /usr/sbin/apachectl restart 1>&2 - fi +%triggerin -- apache1 +%webapp_register apache %{_webapp} + +%triggerun -- apache1 +%webapp_unregister apache %{_webapp} + +%triggerin -- apache >= 2.0.0 +%webapp_register httpd %{_webapp} + +%triggerun -- apache >= 2.0.0 +%webapp_unregister httpd %{_webapp} + +%triggerpostun -- %{name} < 2.5.1-1.5 +# rescue app config +if [ -f /etc/%{name}/config.php.rpmsave ]; then + mv -f %{_sysconfdir}/config.php{,.rpmnew} + mv -f /etc/%{name}/config.php.rpmsave %{_sysconfdir}/config.php +fi + +# nuke very-old config location (this mostly for Ra) +if [ -f /etc/httpd/httpd.conf ]; then + sed -i -e "/^Include.*%{name}.conf/d" /etc/httpd/httpd.conf 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 - fi - if [ -f /var/lock/subsys/httpd ]; then - /usr/sbin/apachectl restart 1>&2 - fi +# migrate from httpd (apache2) config dir +if [ -f /etc/httpd/%{name}.conf.rpmsave ]; then + cp -f %{_sysconfdir}/httpd.conf{,.rpmnew} + mv -f /etc/httpd/%{name}.conf.rpmsave %{_sysconfdir}/httpd.conf +fi + +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 %files %defattr(644,root,root,755) %doc README ChangeLog -%dir %{_sysconfdir} -%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/* -%config(noreplace) %verify(not md5 mtime size) /etc/httpd/%{name}.conf -%dir %{_sysinfodir} -%{_sysinfodir}/config.php -%{_sysinfodir}/index.php -%{_sysinfodir}/phpsysinfo.dtd -%{_sysinfodir}/distros.ini -%{_sysinfodir}/images -%{_sysinfodir}/includes -%{_sysinfodir}/templates +%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 +%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.php +%dir %{_appdir} +%{_appdir}/index.php +%{_appdir}/phpsysinfo.dtd +%{_appdir}/distros.ini +%{_appdir}/images +%{_appdir}/includes +%{_appdir}/templates %define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`) %changelog @@ -116,6 +122,9 @@ All persons listed below can be reached at <cvs_login>@pld-linux.org $Log$ +Revision 1.19 2005/12/28 08:34:10 glen +- use webapps; rel 2 + Revision 1.18 2005/12/15 19:58:32 paszczus - updated to 2.5.1 (bugfix release) - thx to patryk (at) patryk.one.pl @@ -125,13 +134,13 @@ - updated to 2.5 (fixes CVE-2005-0869 CVE-2005-0870 CVE-2005-3347 CVE-2005-3348) - updated phpSysInfo-PLD.patch - update made by <patryk (at) patryk.one.pl> -- rel 1 ; STBR +- rel 1; STBR Revision 1.16 2005/09/19 19:43:34 paszczus - adaptarized Revision 1.15 2005/09/19 19:41:08 paszczus -- added R: issue (for /etc/pld-release file which is needed to proper identify PLD release) ; STBR +- added R: issue (for /etc/pld-release file which is needed to proper identify PLD release); STBR Revision 1.14 2005/07/28 04:31:14 domelu - rename PLD image in package ================================================================ ---- CVS-web: http://cvs.pld-linux.org/SPECS/phpSysInfo.spec?r1=1.18&r2=1.19&f=u _______________________________________________ pld-cvs-commit mailing list [email protected] http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
