X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=PHP-nuke.spec;h=1078a7c489e32c6c0b1afdbc7e035135e861d934;hb=3d54e6c0cfb30429bab79fbf56cb8324c0ad3702;hp=d7699164d79f385e4ba76a3a6c797a944366e710;hpb=a7aceb61dee35cf8401a7cd64a772acef4bf6d34;p=packages%2FPHP-nuke.git diff --git a/PHP-nuke.spec b/PHP-nuke.spec index d769916..1078a7c 100644 --- a/PHP-nuke.spec +++ b/PHP-nuke.spec @@ -1,111 +1,110 @@ -# 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/Aug/1010924.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 +Summary(pl.UTF-8): Serwis nowinek WWW w stylu Slashdota napisany w PHP, łatwy w instalacji i używaniu Name: PHP-nuke -Version: 7.5 -Release: 1 +Version: 7.8 +Release: 4 License: GPL -Group: Applications/Databases/Interfaces +Group: Applications/WWW Source0: http://phpnuke.org/files/PHP-Nuke-%{version}.zip -# Source0-md5: 49ccda4e5b2862b8ba9ab8a1cc8b52d7 +# Source0-md5: 0f60b9e5c67827192d4b36fc7b06b267 Source1: PHP-Nuke.README.first Source2: %{name}.conf -#Icon: phpnuke.gif URL: http://phpnuke.org/ -Requires: php-mysql -Requires: php-pcre -Requires: webserver +BuildRequires: rpmbuild(macros) >= 1.268 +BuildRequires: sed > 4.0 +BuildRequires: unzip +Requires: php(pcre) +Requires: php-common >= 3:4.2.0 +Requires: webapps BuildArch: noarch BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) -%define _nukeroot %{_datadir}/phpnuke +%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. +Content Management and Portal solution featuring web-based +administration, surveys, customizable blocks, modules and themes with +multilanguage support. -You only have to run: mysqladmin create nuke mysql nuke < \ -%{_docdir}/%{name}-%{version}/nuke.sql - -(read %{_docdir}/%{name}-%{version}/README.first for further -information) - -%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) +%description -l pl.UTF-8 +System zarządzania treścią oraz portal WWW z administracją opartą na +WWW, przeglądami, konfigurowalnymi blokami, modułami i motywami oraz +obsługą wielu języków. %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},/etc/httpd} +install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}} -cp -ar html/* $RPM_BUILD_ROOT%{_nukeroot} - -install %{SOURCE1} $RPM_BUILD_ROOT/etc/httpd/phpnuke.conf +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 -%triggerpostun -- %{name} <= 7.4-2 +%post +if [ "$1" = 1 ]; then +%banner -e %{name} <> /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 +# 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_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 +# 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 -%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? +%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}