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