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