X-Git-Url: https://git.pld-linux.org/?a=blobdiff_plain;f=PHP-nuke.spec;h=1e2994123b54e3227c3fbab836ebdb85e583186c;hb=04ab613a718a0c98698aa54f1d6f5ffe02d59ce8;hp=b6a05624976a904c9777eb4e455b2512728604df;hpb=f1665860a0f4afe2ed6190cab15f8c6440476b9b;p=packages%2FPHP-nuke.git diff --git a/PHP-nuke.spec b/PHP-nuke.spec index b6a0562..1e29941 100644 --- a/PHP-nuke.spec +++ b/PHP-nuke.spec @@ -1,27 +1,14 @@ -# TODO: -# - SECURITY: http://securitytracker.com/alerts/2004/Jul/1010734.html -# - SECURITY: http://securitytracker.com/alerts/2004/Jul/1010722.html -# - SECURITY: http://securitytracker.com/alerts/2004/Jun/1010571.html -# - SECURITY: http://securitytracker.com/alerts/2004/Jun/1010477.html -# - SECURITY: http://securitytracker.com/alerts/2004/Jun/1010420.html -# - SECURITY: http://securitytracker.com/alerts/2004/May/1010186.html -# - SECURITY: http://securitytracker.com/alerts/2004/May/1010177.html -# - SECURITY: http://securitytracker.com/alerts/2004/Aug/1010924.html -# - SECURITY: http://securitytracker.com/alerts/2004/Apr/1009748.html -# - SECURITY: http://securitytracker.com/alerts/2004/Apr/1009747.html -# - SECURITY: http://securitytracker.com/alerts/2004/Apr/1009735.html -# - SECURITY: http://securitytracker.com/alerts/2004/Sep/1011161.html -# - SECURITY: http://securitytracker.com/alerts/2004/Sep/1011160.html Summary: Slashdot-like webnews site written in php, easy to install and use Summary(pl): Serwis nowinek WWW w stylu Slashdota napisany w PHP, ³atwy w instalacji i u¿ywaniu Name: PHP-nuke -Version: 7.3 +Version: 7.7 Release: 1 License: GPL Group: Applications/Databases/Interfaces Source0: http://phpnuke.org/files/PHP-Nuke-%{version}.zip -# Source0-md5: b6bdea4d54e0693e85b96bb405e2c874 +# Source0-md5: 27a14521dc5aaa0ebaefe78dd78449f9 Source1: PHP-Nuke.README.first +Source2: %{name}.conf #Icon: phpnuke.gif URL: http://phpnuke.org/ Requires: php-mysql @@ -30,14 +17,15 @@ Requires: webserver BuildArch: noarch BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) -%define nukeroot /home/services/httpd/html/nuke +%define _nukeroot %{_datadir}/phpnuke %description Web-portal writen in php. Very powerful, yet easy to install and use: see documentation in %{_docdir}/%{name}-%{version} for details. -You only have to run: mysqladmin create nuke mysql nuke < \ -%{_docdir}/%{name}-%{version}/nuke.sql +You only have to run: +mysqladmin create nuke +mysql nuke < %{_docdir}/%{name}-%{version}/nuke.sql (read %{_docdir}/%{name}-%{version}/README.first for further information) @@ -46,13 +34,14 @@ information) Portal WWW napisany w PHP. Ma du¿e mo¿liwo¶ci, jest ³atwy w instalacji u u¿ywaniu. Szczegó³y w dokumentacji w %{_docdir}/%{name}-%{version}. -Wystarczy zrobiæ jedno: mysqladmin create nuke mysql nuke < \ -%{_docdir}/%{name}-%{version}/nuke.sql +Wystarczy zrobiæ jedno: +mysqladmin create nuke +mysql nuke < %{_docdir}/%{name}-%{version}/nuke.sql (wiêcej informacji w %{_docdir}/%{name}-%{version}/README.first) %prep -%setup -q -c %{name}-%{version} +%setup -q -c install %{SOURCE1} README.first @@ -64,18 +53,54 @@ chmod 755 */*/*/ %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT%{nukeroot} +install -d $RPM_BUILD_ROOT{%{_nukeroot},/etc/httpd} -cp -ar html/* $RPM_BUILD_ROOT%{nukeroot} +cp -ar html/* $RPM_BUILD_ROOT%{_nukeroot} + +install %{SOURCE2} $RPM_BUILD_ROOT/etc/httpd/phpnuke.conf %clean rm -rf $RPM_BUILD_ROOT +%triggerpostun -- %{name} <= 7.4-2 +if [ -s /home/services/httpd/html/nuke/config.php ]; then + mv -f /home/services/httpd/html/nuke/config.php %{_nukeroot} +fi + +%post +if [ -f /etc/httpd/httpd.conf ] && ! grep -q "^Include.*phpnuke.conf" /etc/httpd/httpd.conf; then + echo "Include /etc/httpd/phpnuke.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/phpnuke.conf /etc/httpd/httpd.conf/phpnuke.conf + if [ -f /var/lock/subsys/httpd ]; then + /usr/sbin/apachectl restart 1>&2 + fi +fi + +%preun +if [ "$1" = "0" ]; then + umask 027 + if [ -d /etc/httpd/httpd.conf ]; then + rm -f /etc/httpd/httpd.conf/99_phpnuke.conf + else + grep -v "^Include.*phpnuke.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 +fi + %files %defattr(644,root,root,755) %doc Addons* Blocks* Changes* Credits* Install* README* Readme* %doc Support* Upgrade* sql/nuke.sql upgrades -%dir %{nukeroot} -%config(noreplace) %attr(640,http,http) %{nukeroot}/config.php -%{nukeroot}/[^c]* +%config(noreplace) %verify(not size mtime md5) /etc/httpd/phpnuke.conf +%dir %{_nukeroot} +%config(noreplace) %attr(640,http,http) %{_nukeroot}/config.php +%{_nukeroot}/[!c]* # more needed?