1 Summary: Slashdot-like webnews site written in php, easy to install and use
2 Summary(pl): Serwis nowinek WWW w stylu Slashdota napisany w PHP, ³atwy w instalacji i u¿ywaniu
7 Group: Applications/WWW
8 Source0: http://phpnuke.org/files/PHP-Nuke-%{version}.zip
9 # Source0-md5: 0f60b9e5c67827192d4b36fc7b06b267
10 Source1: PHP-Nuke.README.first
12 URL: http://phpnuke.org/
13 BuildRequires: rpmbuild(macros) >= 1.268
19 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21 %define _webapps /etc/webapps
22 %define _webapp phpnuke
23 %define _sysconfdir %{_webapps}/%{_webapp}
24 %define _appdir %{_datadir}/%{_webapp}
27 Content Management and Portal solution featuring web-based
28 administration, surveys, customizable blocks, modules and themes with
29 multilanguage support.
32 Portal WWW napisany w PHP. Ma du¿e mo¿liwo¶ci, jest ³atwy w instalacji
38 find . -type f -print0 | xargs -0 sed -i -e 's,\r$,,'
39 cp -p %{SOURCE1} README.first
42 rm -rf $RPM_BUILD_ROOT
43 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}}
45 cp -a html/* $RPM_BUILD_ROOT%{_appdir}
46 mv $RPM_BUILD_ROOT%{_appdir}/config.php $RPM_BUILD_ROOT%{_sysconfdir}
47 ln -s %{_sysconfdir}/config.php $RPM_BUILD_ROOT%{_appdir}/config.php
48 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
49 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
52 rm -rf $RPM_BUILD_ROOT
56 %banner -e %{name} <<EOF
57 If this is your first PHP Nuke install, then You should create the
59 mysqladmin create nuke
60 zcat %{_docdir}/%{name}-%{version}/nuke.sql | mysql nuke
62 Read %{_docdir}/%{name}-%{version}/README.first.gz for further
68 %webapp_register apache %{_webapp}
71 %webapp_unregister apache %{_webapp}
73 %triggerin -- apache >= 2.0.0
74 %webapp_register httpd %{_webapp}
76 %triggerun -- apache >= 2.0.0
77 %webapp_unregister httpd %{_webapp}
79 %triggerpostun -- %{name} < 7.8-1.4
81 if [ -s /home/services/httpd/html/nuke/config.php ]; then
82 mv -f /home/services/httpd/html/nuke/config.php %{_appdir}
85 # nuke very-old config location (this mostly for Ra)
86 if [ -f /etc/httpd/httpd.conf ]; then
87 sed -i -e "/^Include.*%{name}.conf/d" /etc/httpd/httpd.conf
90 # migrate from httpd (apache2) config dir
91 if [ -f /etc/httpd/%{name}.conf.rpmsave ]; then
92 cp -f %{_sysconfdir}/httpd.conf{,.rpmnew}
93 mv -f /etc/httpd/%{name}.conf.rpmsave %{_sysconfdir}/httpd.conf
96 rm -f /etc/httpd/httpd.conf/phpnuke.conf
97 /usr/sbin/webapp register httpd %{_webapp}
98 %service -q httpd reload
101 %defattr(644,root,root,755)
102 %doc Addons* Blocks* Changes* Credits* Install* README* Readme*
103 %doc Support* Upgrade* sql/nuke.sql upgrades
104 %dir %attr(750,root,http) %{_sysconfdir}
105 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
106 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
107 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.php