X-Git-Url: https://git.pld-linux.org/?a=blobdiff_plain;f=PHP-nuke.spec;h=b0c158829977724b145a33b330c5409f642a135c;hb=6a36b1fc6db9fb0c837929741a8e94f182ba232a;hp=f49e80907d24f300dce6382b42d094f41221d050;hpb=b71087762d4e63cefd65a043e9b731418673c851;p=packages%2FPHP-nuke.git diff --git a/PHP-nuke.spec b/PHP-nuke.spec index f49e809..b0c1588 100644 --- a/PHP-nuke.spec +++ b/PHP-nuke.spec @@ -1,75 +1,108 @@ -# 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 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 -Release: 1 +Version: 7.8 +Release: 2 License: GPL -Group: Applications/Databases/Interfaces +Group: Applications/WWW Source0: http://phpnuke.org/files/PHP-Nuke-%{version}.zip -# Source0-md5: b6bdea4d54e0693e85b96bb405e2c874 +# Source0-md5: 0f60b9e5c67827192d4b36fc7b06b267 Source1: PHP-Nuke.README.first -#Icon: phpnuke.gif +Source2: %{name}.conf URL: http://phpnuke.org/ +BuildRequires: rpmbuild(macros) >= 1.268 +BuildRequires: unzip Requires: php-mysql Requires: php-pcre -Requires: webserver +Requires: webapps BuildArch: noarch BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) -%define nukeroot /home/services/httpd/html/nuke +%define _webapps /etc/webapps +%define _webapp phpnuke +%define _sysconfdir %{_webapps}/%{_webapp} +%define _appdir %{_datadir}/%{_webapp} %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 - -(read %{_docdir}/%{name}-%{version}/README.first for further -information) +Content Management and Portal solution featuring web-based +administration, surveys, customizable blocks, modules and themes with +multilanguage support. %description -l pl 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 - -(wiêcej informacji w %{_docdir}/%{name}-%{version}/README.first) +u u¿ywaniu. %prep -%setup -q -c %{name}-%{version} - -install %{SOURCE1} README.first - -# (TV): workaround for bad tarball -find -type d -exec chmod 755 '{}' \; -find -type f -exec chmod 644 '{}' \; -find -type f -empty |xargs rm -f -chmod 755 */*/*/ +%setup -q -c +# undos the source +find . -type f -print0 | xargs -0 sed -i -e 's,\r$,,' +cp -p %{SOURCE1} README.first %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT%{nukeroot} +install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}} -cp -ar html/* $RPM_BUILD_ROOT%{nukeroot} +cp -a html/* $RPM_BUILD_ROOT%{_appdir} +mv $RPM_BUILD_ROOT%{_appdir}/config.php $RPM_BUILD_ROOT%{_sysconfdir} +ln -s %{_sysconfdir}/config.php $RPM_BUILD_ROOT%{_appdir}/config.php +install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf +install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf %clean rm -rf $RPM_BUILD_ROOT +%post +if [ "$1" = 1 ]; then +%banner -e %{name} <= 2.0.0 +%webapp_register httpd %{_webapp} + +%triggerun -- apache >= 2.0.0 +%webapp_unregister httpd %{_webapp} + +%triggerpostun -- %{name} < 7.8-1.4 +# old 7.4-2 trigger +if [ -s /home/services/httpd/html/nuke/config.php ]; then + mv -f /home/services/httpd/html/nuke/config.php %{_appdir} +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 + +# 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/phpnuke.conf +/usr/sbin/webapp register httpd %{_webapp} +%service -q httpd reload + %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]* -# more needed? +%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 +%{_appdir}