1 Summary: A feature-rich PHP discussion board
2 Summary(pl): Forum dyskusyjne o du¿ych mo¿liwo¶ciach
7 Group: Applications/WWW
8 #Source0: http://dl.sourceforge.net/phpbb/%{name}-%{version}.tar.bz2
9 Source0: http://dl.sourceforge.net/phpbb-php5mod/20143.tar.gz
10 # Source0-md5: aedb16819029c7e1f6cd625d566685e4
11 Source1: http://dl.sourceforge.net/phpbb/lang_polish.tar.gz
12 # Source1-md5: db020ef788d4bd50ce04014964e3e043
13 Source2: http://dl.sourceforge.net/phpbb/subSilver_polish.tar.gz
14 # Source2-md5: 9367f7a761aef3795ffa296b413136b4
15 Source3: http://dl.sourceforge.net/phpbb/lang_german.tar.gz
16 # Source3-md5: afc686072978b896e18fa211210c3b13
17 Source4: http://dl.sourceforge.net/phpbb/subSilver_german.tar.gz
18 # Source4-md5: 8340f310ee4892f3e19da3e000fdb708
19 Source5: http://dl.sourceforge.net/phpbb/lang_french.tar.gz
20 # Source5-md5: c81f843d4adf0a086efef590074478e6
21 Source6: http://dl.sourceforge.net/phpbb/subSilver_french.tar.gz
22 # Source6-md5: 419157eb144fa81b7464a5f2edeea434
25 URL: http://www.phpbb.com/
29 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31 %define _phpdir %{_datadir}/%{name}
32 %define _confdir %{_sysconfdir}/%{name}
33 %define _avatardir /var/lib/%{name}/avatars
36 phpBB is a UBB-style dissussion board written in PHP backended by a
37 MySQL database. It includes features such as posting/replying/editing
38 messages, private messages, private forums, user and anonymous
39 posting, robust theming, user ranking by posts or by special, admin
40 definable, ranks, and much more.
43 phpBB jest forum dyskusyjnym w stylu UBB napisanym w PHP z u¿yciem
44 bazy danych MySQL. Ma mo¿liwo¶ci takie jak: wysy³anie, odpisywanie,
45 edycja wiadomo¶ci, prywatne wiadomo¶ci, prywatne fora, wysy³anie jako
46 u¿ytkownik i anonimowe, bogaty wybór motywów, ranking u¿ytkowników
47 wed³ug ich wiadomo¶ci lub specjalne, definiowane przez administratora,
48 rankingi i wiele innych.
51 Summary: A feature-rich PHP discussion board - installer
52 Summary(pl): Forum dyskusyjne o du¿ych mo¿liwo¶ciach - instalator
53 Group: Applications/Databases/Interfaces
57 Package needed for %{name} forum instalation.
59 %description install -l pl
60 Pakiet potrzebny do instalacji forum %{name}.
63 #%setup -q -n phpbb-php5
67 rm -rf $RPM_BUILD_ROOT
68 install -d $RPM_BUILD_ROOT%{_phpdir}/{admin,db,images,includes,install/schemas,language,templates} \
69 $RPM_BUILD_ROOT{%{_confdir},/etc/httpd} \
70 $RPM_BUILD_ROOT%{_avatardir}
72 install *.{php,inc} $RPM_BUILD_ROOT%{_phpdir}
73 install admin/*.php $RPM_BUILD_ROOT%{_phpdir}/admin
74 install db/*.php $RPM_BUILD_ROOT%{_phpdir}/db
75 install includes/*.php $RPM_BUILD_ROOT%{_phpdir}/includes
76 install install/*.php $RPM_BUILD_ROOT%{_phpdir}/install
77 install install/schemas/*.sql $RPM_BUILD_ROOT%{_phpdir}/install/schemas
79 cp -R images/* $RPM_BUILD_ROOT%{_phpdir}/images
80 cp -R images/avatars/* $RPM_BUILD_ROOT%{_avatardir}
81 cp -R language/* $RPM_BUILD_ROOT%{_phpdir}/language
82 cp -R templates/* $RPM_BUILD_ROOT%{_phpdir}/templates
83 rm -rf $RPM_BUILD_ROOT%{_phpdir}/images/avatars
84 ln -sf $RPM_BUILD_ROOT%{_avatardir} $RPM_BUILD_ROOT%{_phpdir}/images/avatars
86 install config.php $RPM_BUILD_ROOT%{_confdir}
87 install %{SOURCE8} $RPM_BUILD_ROOT%{_confdir}/favicon.ico
88 touch $RPM_BUILD_ROOT%{_confdir}/robots.txt
89 ln -sf %{_confdir}/config.php $RPM_BUILD_ROOT%{_phpdir}/config.php
90 ln -sf %{_confdir}/favicon.ico $RPM_BUILD_ROOT%{_phpdir}/favicon.ico
91 ln -sf %{_confdir}/robots.txt $RPM_BUILD_ROOT%{_phpdir}/robots.txt
93 tar zxf %{SOURCE1} -C $RPM_BUILD_ROOT%{_phpdir}/language/
94 tar zxf %{SOURCE2} -C $RPM_BUILD_ROOT%{_phpdir}/templates/
96 tar zxf %{SOURCE3} -C $RPM_BUILD_ROOT%{_phpdir}/language/
97 tar zxf %{SOURCE4} -C $RPM_BUILD_ROOT%{_phpdir}/templates/
99 tar zxf %{SOURCE5} -C $RPM_BUILD_ROOT%{_phpdir}/language/
100 tar zxf %{SOURCE6} -C $RPM_BUILD_ROOT%{_phpdir}/templates/
102 install %{SOURCE7} $RPM_BUILD_ROOT/etc/httpd/%{name}.conf
105 rm -rf $RPM_BUILD_ROOT
108 if [ "$1" = "1" ]; then
109 if [ -f /etc/httpd/httpd.conf ] && ! grep -q "^Include.*%{name}.conf" /etc/httpd/httpd.conf; then
110 echo "Include /etc/httpd/%{name}.conf" >> /etc/httpd/httpd.conf
111 elif [ -d /etc/httpd/httpd.conf ]; then
112 ln -sf /etc/httpd/%{name}.conf /etc/httpd/httpd.conf/99_%{name}.conf
114 if [ -f /var/lock/subsys/httpd ]; then
115 /usr/sbin/apachectl graceful 1>&2
120 echo "For instalation: http://<your.site.address>/<path>/install/install.php"
121 echo "For upgrade: http://<your.site.address>/<path>/install/upgrade.php"
123 echo "Remember to uninstall %{name}-install after initiation/upgrade of %{name}!!"
126 if [ "$1" = "0" ]; then
128 if [ -d /etc/httpd/httpd.conf ]; then
129 rm -f /etc/httpd/httpd.conf/99_%{name}.conf
131 grep -v "^Include.*%{name}.conf" /etc/httpd/httpd.conf > \
132 /etc/httpd/httpd.conf.tmp
133 mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
134 if [ -f /var/lock/subsys/httpd ]; then
135 /usr/sbin/apachectl graceful 1>&2
140 %triggerpostun -- %{name} < %{version}
141 echo "You have to install %{name}-install package to prepare upgrade!!!"
142 echo "For upgrade: http://<your.site.address>/<path>/install/upgrade.php"
144 %triggerpostun -- %{name} <= 2.0.10-1
145 if [ -f /home/services/httpd/html/phpBB/config.php.rpmsave ]; then
146 mv -f /home/services/httpd/html/phpBB/config.php.rpmsave /etc/phpBB/config.php
148 if [ -f /home/httpd/html/phpBB/config.php.rpmsave ]; then
149 mv -f /home/httpd/html/phpBB/config.php.rpmsave /etc/phpBB/config.php
152 for i in `grep -lr "/home/\(services/\)*httpd/html/phpBB" /etc/httpd/*`; do
154 %{__perl} -pi -e "s#/home/httpd/html/phpBB#%{_phpdir}#g" $i
155 %{__perl} -pi -e "s#/home/services/httpd/html/phpBB#%{_phpdir}#g" $i
156 echo "File changed by trigger: $i (backup: $i.backup)"
158 if [ -f /var/lock/subsys/httpd ]; then
159 /usr/sbin/apachectl graceful 1>&2
163 %defattr(644,root,root,755)
165 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_confdir}/*
166 %config(noreplace) %verify(not md5 mtime size) /etc/httpd/%{name}.conf
168 %attr(755,root,http) %dir %{_phpdir}
169 %attr(640,root,http) %{_phpdir}/[!c]*.php
170 %attr(640,root,http) %{_phpdir}/common.php
171 %attr(640,root,http) %{_phpdir}/*.inc
172 %attr(750,root,http) %dir %{_phpdir}/admin
173 %attr(750,root,http) %dir %{_phpdir}/db
174 %attr(750,root,http) %dir %{_phpdir}/images
175 %attr(640,root,http) %{_phpdir}/images/*.gif
176 %attr(640,root,http) %{_phpdir}/images/index.htm
177 %attr(750,root,http) %dir %{_phpdir}/images/smiles
178 %attr(710,root,http) %dir /var/lib/%{name}
179 %attr(1770,root,http) %dir %{_avatardir}
180 %attr(750,root,http) %dir %{_phpdir}/includes
181 %attr(640,root,http) %config(noreplace) %{_phpdir}/config.php
182 %attr(640,root,http) %config(noreplace) %{_phpdir}/favicon.ico
183 %attr(640,root,http) %config(noreplace) %{_phpdir}/robots.txt
186 %{_phpdir}/images/smiles/*
188 %{_phpdir}/includes/*
189 %{_phpdir}/templates/index.htm
190 %attr(750,root,http) %dir %{_phpdir}/templates
191 %attr(750,root,http) %dir %{_phpdir}/templates/subSilver
192 %attr(750,root,http) %dir %{_phpdir}/templates/subSilver/admin
193 %attr(640,root,http) %{_phpdir}/templates/subSilver/admin/*
194 %attr(640,root,http) %{_phpdir}/templates/subSilver/*.*
195 %attr(750,root,http) %dir %{_phpdir}/templates/subSilver/images
196 %attr(640,root,http) %{_phpdir}/templates/subSilver/images/*.*
197 %attr(750,root,http) %dir %{_phpdir}/language
198 %attr(640,root,http) %{_phpdir}/language/*.htm
200 %lang(en) %{_phpdir}/language/lang_english
201 %lang(en) %{_phpdir}/templates/subSilver/images/lang_english
203 %lang(pl) %{_phpdir}/language/lang_polish
204 %lang(pl) %{_phpdir}/templates/subSilver/images/lang_polish
206 %lang(de) %{_phpdir}/language/lang_german
207 %lang(de) %{_phpdir}/templates/subSilver/images/lang_german
209 %lang(fr) %{_phpdir}/language/lang_french
210 %lang(fr) %{_phpdir}/templates/subSilver/images/lang_french
213 %defattr(644,root,root,755)
214 %doc install/schemas/*.zip
215 %attr(750,root,http) %dir %{_phpdir}/install
216 %attr(640,root,http) %{_phpdir}/install/*.php
217 %attr(750,root,http) %dir %{_phpdir}/install/schemas
218 %attr(640,root,http) %{_phpdir}/install/schemas/*.sql