]> git.pld-linux.org Git - packages/PHP-nuke.git/blame - PHP-nuke.spec
- corrected BR: sed >= 4.0
[packages/PHP-nuke.git] / PHP-nuke.spec
CommitLineData
1bbb5b9a 1Summary: Slashdot-like webnews site written in php, easy to install and use
3d54e6c0 2Summary(pl.UTF-8): Serwis nowinek WWW w stylu Slashdota napisany w PHP, łatwy w instalacji i używaniu
e0241ec6 3Name: PHP-nuke
67674b29 4Version: 7.8
5159a03d 5Release: 4
e0241ec6 6License: GPL
6a36b1fc 7Group: Applications/WWW
978b3b58 8Source0: http://phpnuke.org/files/PHP-Nuke-%{version}.zip
67674b29 9# Source0-md5: 0f60b9e5c67827192d4b36fc7b06b267
3f375c11 10Source1: PHP-Nuke.README.first
a7aceb61 11Source2: %{name}.conf
1bbb5b9a 12URL: http://phpnuke.org/
6a36b1fc 13BuildRequires: rpmbuild(macros) >= 1.268
c41e4308 14BuildRequires: sed >= 4.0
644b1d91 15BuildRequires: unzip
5159a03d 16Requires: php(pcre)
2a99df41 17Requires: php-common >= 3:4.2.0
6a36b1fc 18Requires: webapps
e0241ec6 19BuildArch: noarch
1bbb5b9a
JB
20BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21
6a36b1fc
ER
22%define _webapps /etc/webapps
23%define _webapp phpnuke
24%define _sysconfdir %{_webapps}/%{_webapp}
25%define _appdir %{_datadir}/%{_webapp}
e0241ec6 26
27%description
6a36b1fc
ER
28Content Management and Portal solution featuring web-based
29administration, surveys, customizable blocks, modules and themes with
30multilanguage support.
1bbb5b9a 31
0e43a9f5
JR
32%description -l pl.UTF-8
33System zarządzania treścią oraz portal WWW z administracją opartą na
34WWW, przeglądami, konfigurowalnymi blokami, modułami i motywami oraz
35obsługą wielu języków.
1bbb5b9a
JB
36
37%prep
58ae2b2c 38%setup -q -c
6a36b1fc
ER
39# undos the source
40find . -type f -print0 | xargs -0 sed -i -e 's,\r$,,'
41cp -p %{SOURCE1} README.first
e0241ec6 42
e0241ec6 43%install
1bbb5b9a 44rm -rf $RPM_BUILD_ROOT
6a36b1fc 45install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}}
e0241ec6 46
6a36b1fc
ER
47cp -a html/* $RPM_BUILD_ROOT%{_appdir}
48mv $RPM_BUILD_ROOT%{_appdir}/config.php $RPM_BUILD_ROOT%{_sysconfdir}
49ln -s %{_sysconfdir}/config.php $RPM_BUILD_ROOT%{_appdir}/config.php
50install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
51install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
a7aceb61 52
e0241ec6 53%clean
1bbb5b9a 54rm -rf $RPM_BUILD_ROOT
e0241ec6 55
6a36b1fc
ER
56%post
57if [ "$1" = 1 ]; then
58%banner -e %{name} <<EOF
59If this is your first PHP Nuke install, then You should create the
60MySQL database:
61mysqladmin create nuke
62zcat %{_docdir}/%{name}-%{version}/nuke.sql | mysql nuke
63
64Read %{_docdir}/%{name}-%{version}/README.first.gz for further
65information.
66EOF
67fi
68
efd9b00c 69%triggerin -- apache1 < 1.3.37-3, apache1-base
6a36b1fc
ER
70%webapp_register apache %{_webapp}
71
efd9b00c 72%triggerun -- apache1 < 1.3.37-3, apache1-base
6a36b1fc
ER
73%webapp_unregister apache %{_webapp}
74
a1a55922 75%triggerin -- apache < 2.2.0, apache-base
6a36b1fc
ER
76%webapp_register httpd %{_webapp}
77
a1a55922 78%triggerun -- apache < 2.2.0, apache-base
6a36b1fc
ER
79%webapp_unregister httpd %{_webapp}
80
81%triggerpostun -- %{name} < 7.8-1.4
82# old 7.4-2 trigger
a7aceb61 83if [ -s /home/services/httpd/html/nuke/config.php ]; then
6a36b1fc 84 mv -f /home/services/httpd/html/nuke/config.php %{_appdir}
a6a3ef47 85fi
86
6a36b1fc
ER
87# nuke very-old config location (this mostly for Ra)
88if [ -f /etc/httpd/httpd.conf ]; then
89 sed -i -e "/^Include.*%{name}.conf/d" /etc/httpd/httpd.conf
a7aceb61 90fi
91
6a36b1fc
ER
92# migrate from httpd (apache2) config dir
93if [ -f /etc/httpd/%{name}.conf.rpmsave ]; then
94 cp -f %{_sysconfdir}/httpd.conf{,.rpmnew}
95 mv -f /etc/httpd/%{name}.conf.rpmsave %{_sysconfdir}/httpd.conf
a7aceb61 96fi
97
6a36b1fc
ER
98rm -f /etc/httpd/httpd.conf/phpnuke.conf
99/usr/sbin/webapp register httpd %{_webapp}
100%service -q httpd reload
101
e0241ec6 102%files
1bbb5b9a 103%defattr(644,root,root,755)
cc54dfe0 104%doc Addons* Blocks* Changes* Credits* Install* README* Readme*
105%doc Support* Upgrade* sql/nuke.sql upgrades
6a36b1fc
ER
106%dir %attr(750,root,http) %{_sysconfdir}
107%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
108%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
109%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.php
110%{_appdir}
This page took 0.101885 seconds and 4 git commands to generate.