2 %bcond_without php5 # build without php5 support
4 Summary: A feature-rich PHP discussion board
5 Summary(pl): Forum dyskusyjne o du¿ych mo¿liwo¶ciach
11 Group: Applications/WWW
12 Source0: http://dl.sourceforge.net/phpbb-php5mod/%{fver}.tar.bz2
13 # Source0-md5: dac447c941798993feff9f01ffbc8af5
14 Source1: http://dl.sourceforge.net/phpbb/lang_polish.tar.gz
15 # Source1-md5: db020ef788d4bd50ce04014964e3e043
16 Source2: http://dl.sourceforge.net/phpbb/subSilver_polish.tar.gz
17 # Source2-md5: 9367f7a761aef3795ffa296b413136b4
18 Source3: http://dl.sourceforge.net/phpbb/lang_german.tar.gz
19 # Source3-md5: afc686072978b896e18fa211210c3b13
20 Source4: http://dl.sourceforge.net/phpbb/subSilver_german.tar.gz
21 # Source4-md5: 8340f310ee4892f3e19da3e000fdb708
22 Source5: http://dl.sourceforge.net/phpbb/lang_french.tar.gz
23 # Source5-md5: c81f843d4adf0a086efef590074478e6
24 Source6: http://dl.sourceforge.net/phpbb/subSilver_french.tar.gz
25 # Source6-md5: 419157eb144fa81b7464a5f2edeea434
28 Source9: http://dl.sourceforge.net/phpbb/%{name}-%{version}.tar.bz2
29 # Source9-md5: 2d3c71574ea8d3ef0afbcf4aec63947a
30 URL: http://www.phpbb.com/
34 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 %define _phpdir %{_datadir}/%{name}
37 %define _confdir %{_sysconfdir}/%{name}
38 %define _avatardir /var/lib/%{name}/avatars
41 phpBB is a UBB-style dissussion board written in PHP backended by a
42 MySQL database. It includes features such as posting/replying/editing
43 messages, private messages, private forums, user and anonymous
44 posting, robust theming, user ranking by posts or by special, admin
45 definable, ranks, and much more.
48 phpBB jest forum dyskusyjnym w stylu UBB napisanym w PHP z u¿yciem
49 bazy danych MySQL. Ma mo¿liwo¶ci takie jak: wysy³anie, odpisywanie,
50 edycja wiadomo¶ci, prywatne wiadomo¶ci, prywatne fora, wysy³anie jako
51 u¿ytkownik i anonimowe, bogaty wybór motywów, ranking u¿ytkowników
52 wed³ug ich wiadomo¶ci lub specjalne, definiowane przez administratora,
53 rankingi i wiele innych.
56 Summary: A feature-rich PHP discussion board - installer
57 Summary(pl): Forum dyskusyjne o du¿ych mo¿liwo¶ciach - instalator
58 Group: Applications/Databases/Interfaces
62 Package needed for %{name} forum instalation.
64 %description install -l pl
65 Pakiet potrzebny do instalacji forum %{name}.
69 %setup -q -T -b 9 -n phpBB2
75 rm -rf $RPM_BUILD_ROOT
76 install -d $RPM_BUILD_ROOT%{_phpdir}/{admin,db,images,includes,install/schemas,language,templates} \
77 $RPM_BUILD_ROOT{%{_confdir},/etc/httpd} \
78 $RPM_BUILD_ROOT%{_avatardir}
80 install *.{php,inc} $RPM_BUILD_ROOT%{_phpdir}
81 install admin/*.php $RPM_BUILD_ROOT%{_phpdir}/admin
82 install db/*.php $RPM_BUILD_ROOT%{_phpdir}/db
83 install includes/*.php $RPM_BUILD_ROOT%{_phpdir}/includes
84 install install/*.php $RPM_BUILD_ROOT%{_phpdir}/install
85 install install/schemas/*.sql $RPM_BUILD_ROOT%{_phpdir}/install/schemas
87 cp -R images/* $RPM_BUILD_ROOT%{_phpdir}/images
88 cp -R images/avatars/* $RPM_BUILD_ROOT%{_avatardir}
89 cp -R language/* $RPM_BUILD_ROOT%{_phpdir}/language
90 cp -R templates/* $RPM_BUILD_ROOT%{_phpdir}/templates
91 rm -rf $RPM_BUILD_ROOT%{_phpdir}/images/avatars
92 ln -sf %{_avatardir} $RPM_BUILD_ROOT%{_phpdir}/images/avatars
94 install config.php $RPM_BUILD_ROOT%{_confdir}
95 install %{SOURCE8} $RPM_BUILD_ROOT%{_confdir}/favicon.ico
96 touch $RPM_BUILD_ROOT%{_confdir}/robots.txt
97 ln -sf %{_confdir}/config.php $RPM_BUILD_ROOT%{_phpdir}/config.php
98 ln -sf %{_confdir}/favicon.ico $RPM_BUILD_ROOT%{_phpdir}/favicon.ico
99 ln -sf %{_confdir}/robots.txt $RPM_BUILD_ROOT%{_phpdir}/robots.txt
101 tar zxf %{SOURCE1} -C $RPM_BUILD_ROOT%{_phpdir}/language/
102 tar zxf %{SOURCE2} -C $RPM_BUILD_ROOT%{_phpdir}/templates/
104 tar zxf %{SOURCE3} -C $RPM_BUILD_ROOT%{_phpdir}/language/
105 tar zxf %{SOURCE4} -C $RPM_BUILD_ROOT%{_phpdir}/templates/
107 tar zxf %{SOURCE5} -C $RPM_BUILD_ROOT%{_phpdir}/language/
108 tar zxf %{SOURCE6} -C $RPM_BUILD_ROOT%{_phpdir}/templates/
110 install %{SOURCE7} $RPM_BUILD_ROOT/etc/httpd/%{name}.conf
113 rm -rf $RPM_BUILD_ROOT
116 if [ "$1" = "1" ]; then
117 if [ -f /etc/httpd/httpd.conf ] && ! grep -q "^Include.*%{name}.conf" /etc/httpd/httpd.conf; then
118 echo "Include /etc/httpd/%{name}.conf" >> /etc/httpd/httpd.conf
119 elif [ -d /etc/httpd/httpd.conf ]; then
120 ln -sf /etc/httpd/%{name}.conf /etc/httpd/httpd.conf/99_%{name}.conf
122 if [ -f /var/lock/subsys/httpd ]; then
123 /usr/sbin/apachectl graceful 1>&2
128 echo "For instalation: http://<your.site.address>/<path>/install/install.php"
129 echo "For upgrade: http://<your.site.address>/<path>/install/upgrade.php"
131 echo "Remember to uninstall %{name}-install after initiation/upgrade of %{name}!!"
134 if [ "$1" = "0" ]; then
136 if [ -d /etc/httpd/httpd.conf ]; then
137 rm -f /etc/httpd/httpd.conf/99_%{name}.conf
139 grep -v "^Include.*%{name}.conf" /etc/httpd/httpd.conf > \
140 /etc/httpd/httpd.conf.tmp
141 mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
142 if [ -f /var/lock/subsys/httpd ]; then
143 /usr/sbin/apachectl graceful 1>&2
148 %triggerpostun -- %{name} < %{version}
149 echo "You have to install %{name}-install package to prepare upgrade!!!"
150 echo "For upgrade: http://<your.site.address>/<path>/install/upgrade.php"
152 %triggerpostun -- %{name} <= 2.0.10-1
153 if [ -f /home/services/httpd/html/phpBB/config.php.rpmsave ]; then
154 mv -f /home/services/httpd/html/phpBB/config.php.rpmsave /etc/phpBB/config.php
156 if [ -f /home/httpd/html/phpBB/config.php.rpmsave ]; then
157 mv -f /home/httpd/html/phpBB/config.php.rpmsave /etc/phpBB/config.php
160 for i in `grep -lr "/home/\(services/\)*httpd/html/phpBB" /etc/httpd/*`; do
162 %{__perl} -pi -e "s#/home/httpd/html/phpBB#%{_phpdir}#g" $i
163 %{__perl} -pi -e "s#/home/services/httpd/html/phpBB#%{_phpdir}#g" $i
164 echo "File changed by trigger: $i (backup: $i.backup)"
166 if [ -f /var/lock/subsys/httpd ]; then
167 /usr/sbin/apachectl graceful 1>&2
171 %defattr(644,root,root,755)
173 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_confdir}/*
174 %config(noreplace) %verify(not md5 mtime size) /etc/httpd/%{name}.conf
176 %attr(755,root,http) %dir %{_phpdir}
177 %attr(640,root,http) %{_phpdir}/[!c]*.php
178 %attr(640,root,http) %{_phpdir}/common.php
179 %attr(640,root,http) %{_phpdir}/*.inc
180 %attr(750,root,http) %dir %{_phpdir}/admin
181 %attr(750,root,http) %dir %{_phpdir}/db
182 %attr(750,root,http) %dir %{_phpdir}/images
183 %attr(640,root,http) %{_phpdir}/images/*.gif
184 %attr(640,root,http) %{_phpdir}/images/index.htm
185 %attr(750,root,http) %dir %{_phpdir}/images/smiles
186 %attr(710,root,http) %dir /var/lib/%{name}
187 %attr(1770,root,http) %dir %{_avatardir}
188 %attr(750,root,http) %dir %{_phpdir}/includes
189 %attr(640,root,http) %config(noreplace) %{_phpdir}/config.php
190 %attr(640,root,http) %config(noreplace) %{_phpdir}/favicon.ico
191 %attr(640,root,http) %config(noreplace) %{_phpdir}/robots.txt
194 %{_phpdir}/images/smiles/*
195 %{_phpdir}/images/avatars
197 %{_phpdir}/includes/*
198 %{_phpdir}/templates/index.htm
199 %attr(750,root,http) %dir %{_phpdir}/templates
200 %attr(750,root,http) %dir %{_phpdir}/templates/subSilver
201 %attr(750,root,http) %dir %{_phpdir}/templates/subSilver/admin
202 %attr(640,root,http) %{_phpdir}/templates/subSilver/admin/*
203 %attr(640,root,http) %{_phpdir}/templates/subSilver/*.*
204 %attr(750,root,http) %dir %{_phpdir}/templates/subSilver/images
205 %attr(640,root,http) %{_phpdir}/templates/subSilver/images/*.*
206 %attr(750,root,http) %dir %{_phpdir}/language
207 %attr(640,root,http) %{_phpdir}/language/*.htm
209 %lang(en) %{_phpdir}/language/lang_english
210 %lang(en) %{_phpdir}/templates/subSilver/images/lang_english
212 %lang(pl) %{_phpdir}/language/lang_polish
213 %lang(pl) %{_phpdir}/templates/subSilver/images/lang_polish
215 %lang(de) %{_phpdir}/language/lang_german
216 %lang(de) %{_phpdir}/templates/subSilver/images/lang_german
218 %lang(fr) %{_phpdir}/language/lang_french
219 %lang(fr) %{_phpdir}/templates/subSilver/images/lang_french
222 %defattr(644,root,root,755)
223 %doc install/schemas/*.zip
224 %attr(750,root,http) %dir %{_phpdir}/install
225 %attr(640,root,http) %{_phpdir}/install/*.php
226 %attr(750,root,http) %dir %{_phpdir}/install/schemas
227 %attr(640,root,http) %{_phpdir}/install/schemas/*.sql