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