]> git.pld-linux.org Git - packages/PHP-nuke.git/blob - PHP-nuke.spec
- updated to 7.7
[packages/PHP-nuke.git] / PHP-nuke.spec
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
3 Name:           PHP-nuke
4 Version:        7.7
5 Release:        1
6 License:        GPL
7 Group:          Applications/Databases/Interfaces
8 Source0:        http://phpnuke.org/files/PHP-Nuke-%{version}.zip
9 # Source0-md5:  27a14521dc5aaa0ebaefe78dd78449f9
10 Source1:        PHP-Nuke.README.first
11 Source2:        %{name}.conf
12 #Icon:          phpnuke.gif
13 URL:            http://phpnuke.org/
14 Requires:       php-mysql
15 Requires:       php-pcre
16 Requires:       webserver
17 BuildArch:      noarch
18 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
20 %define         _nukeroot       %{_datadir}/phpnuke
21
22 %description
23 Web-portal writen in php. Very powerful, yet easy to install and use:
24 see documentation in %{_docdir}/%{name}-%{version} for details.
25
26 You only have to run:
27 mysqladmin create nuke
28 mysql nuke < %{_docdir}/%{name}-%{version}/nuke.sql
29
30 (read %{_docdir}/%{name}-%{version}/README.first for further
31 information)
32
33 %description -l pl
34 Portal WWW napisany w PHP. Ma du¿e mo¿liwo¶ci, jest ³atwy w instalacji
35 u u¿ywaniu. Szczegó³y w dokumentacji w %{_docdir}/%{name}-%{version}.
36
37 Wystarczy zrobiæ jedno:
38 mysqladmin create nuke
39 mysql nuke < %{_docdir}/%{name}-%{version}/nuke.sql
40
41 (wiêcej informacji w %{_docdir}/%{name}-%{version}/README.first)
42
43 %prep
44 %setup -q -c
45
46 install %{SOURCE1} README.first
47
48 # (TV): workaround for bad tarball
49 find -type d -exec chmod 755 '{}' \;
50 find -type f -exec chmod 644 '{}' \;
51 find -type f -empty |xargs rm -f
52 chmod 755 */*/*/
53
54 %install
55 rm -rf $RPM_BUILD_ROOT
56 install -d $RPM_BUILD_ROOT{%{_nukeroot},/etc/httpd}
57
58 cp -ar html/* $RPM_BUILD_ROOT%{_nukeroot}
59
60 install %{SOURCE2} $RPM_BUILD_ROOT/etc/httpd/phpnuke.conf
61
62 %clean
63 rm -rf $RPM_BUILD_ROOT
64
65 %triggerpostun -- %{name} <= 7.4-2
66 if [ -s /home/services/httpd/html/nuke/config.php ]; then
67         mv -f /home/services/httpd/html/nuke/config.php %{_nukeroot}
68 fi
69
70 %post
71 if [ -f /etc/httpd/httpd.conf ] && ! grep -q "^Include.*phpnuke.conf" /etc/httpd/httpd.conf; then
72         echo "Include /etc/httpd/phpnuke.conf" >> /etc/httpd/httpd.conf
73         if [ -f /var/lock/subsys/httpd ]; then
74                 /usr/sbin/apachectl restart 1>&2
75         fi
76 elif [ -d /etc/httpd/httpd.conf ]; then
77         ln -sf /etc/httpd/phpnuke.conf /etc/httpd/httpd.conf/phpnuke.conf
78         if [ -f /var/lock/subsys/httpd ]; then
79                 /usr/sbin/apachectl restart 1>&2
80         fi
81 fi
82
83 %preun
84 if [ "$1" = "0" ]; then
85         umask 027
86         if [ -d /etc/httpd/httpd.conf ]; then
87                 rm -f /etc/httpd/httpd.conf/99_phpnuke.conf
88         else
89                 grep -v "^Include.*phpnuke.conf" /etc/httpd/httpd.conf > \
90                         /etc/httpd/httpd.conf.tmp
91                 mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
92         fi
93         if [ -f /var/lock/subsys/httpd ]; then
94                 /usr/sbin/apachectl restart 1>&2
95         fi
96 fi
97
98 %files
99 %defattr(644,root,root,755)
100 %doc Addons* Blocks* Changes* Credits* Install* README* Readme*
101 %doc Support* Upgrade* sql/nuke.sql upgrades
102 %config(noreplace) %verify(not size mtime md5) /etc/httpd/phpnuke.conf
103 %dir %{_nukeroot}
104 %config(noreplace) %attr(640,http,http) %{_nukeroot}/config.php
105 %{_nukeroot}/[!c]*
106 # more needed?
This page took 0.093875 seconds and 3 git commands to generate.