]>
Commit | Line | Data |
---|---|---|
26979e56 | 1 | Summary: A feature-rich PHP discussion board |
93bb512d | 2 | Summary(pl.UTF-8): Forum dyskusyjne o dużych możliwościach |
26979e56 | 3 | Name: phpBB |
79ef0064 | 4 | Version: 2.0.21 |
2c230cb8 | 5 | Release: 2 |
26979e56 | 6 | License: GPL v2 |
45ef6d73 | 7 | Group: Applications/WWW |
417ae765 | 8 | Source0: http://dl.sourceforge.net/phpbb/%{name}-%{version}.tar.bz2 |
79ef0064 | 9 | # Source0-md5: 891dd4d30539dad4ba301db2ad038392 |
b2f26cdf | 10 | Source1: http://www.phpbb.com/files/releases/language_packs/lang_polish.tar.gz |
5731c6ce | 11 | # Source1-md5: db020ef788d4bd50ce04014964e3e043 |
b2f26cdf | 12 | Source2: http://www.phpbb.com/files/releases/language_packs/subsilver_polish.tar.gz |
e666201e | 13 | # Source2-md5: 9367f7a761aef3795ffa296b413136b4 |
b2f26cdf | 14 | Source3: http://www.phpbb.com/files/releases/language_packs/lang_german.tar.gz |
79ef0064 | 15 | # Source3-md5: 5170a64aac5bf429b2c61fe36728c8cf |
b2f26cdf | 16 | Source4: http://www.phpbb.com/files/releases/language_packs/subsilver_german.tar.gz |
e666201e | 17 | # Source4-md5: 8340f310ee4892f3e19da3e000fdb708 |
b2f26cdf | 18 | Source5: http://www.phpbb.com/files/releases/language_packs/lang_french.tar.gz |
79ef0064 | 19 | # Source5-md5: a46b461d5e5406b1cf24bcf4b55ada08 |
b2f26cdf | 20 | Source6: http://www.phpbb.com/files/releases/language_packs/subsilver_french.tar.gz |
e666201e | 21 | # Source6-md5: 419157eb144fa81b7464a5f2edeea434 |
4ce8e8bc | 22 | Source7: %{name}.conf |
0030081f | 23 | Source8: %{name}.ico |
26979e56 | 24 | URL: http://www.phpbb.com/ |
2abd58fa | 25 | BuildRequires: rpmbuild(macros) >= 1.268 |
52932b0e | 26 | Requires(triggerpostun): sed >= 4.0 |
2c230cb8 | 27 | Requires: php(pcre) |
52932b0e | 28 | Requires: webapps |
6ef77a30 | 29 | BuildArch: noarch |
26979e56 PG |
30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
31 | ||
273b23f4 | 32 | %define _avatardir /var/lib/%{name}/avatars |
52932b0e | 33 | %define _appdir %{_datadir}/%{name} |
34 | %define _webapps /etc/webapps | |
35 | %define _webapp %{name} | |
36 | %define _sysconfdir %{_webapps}/%{_webapp} | |
26979e56 PG |
37 | |
38 | %description | |
39 | phpBB is a UBB-style dissussion board written in PHP backended by a | |
40 | MySQL database. It includes features such as posting/replying/editing | |
41 | messages, private messages, private forums, user and anonymous | |
42 | posting, robust theming, user ranking by posts or by special, admin | |
43 | definable, ranks, and much more. | |
44 | ||
93bb512d JR |
45 | %description -l pl.UTF-8 |
46 | phpBB jest forum dyskusyjnym w stylu UBB napisanym w PHP z użyciem | |
47 | bazy danych MySQL. Ma możliwości takie jak: wysyłanie, odpisywanie, | |
48 | edycja wiadomości, prywatne wiadomości, prywatne fora, wysyłanie jako | |
49 | użytkownik i anonimowe, bogaty wybór motywów, ranking użytkowników | |
50 | według ich wiadomości lub specjalne, definiowane przez administratora, | |
6ef77a30 JB |
51 | rankingi i wiele innych. |
52 | ||
6cd05911 | 53 | %package install |
0c7647b8 | 54 | Summary: A feature-rich PHP discussion board - installer |
93bb512d | 55 | Summary(pl.UTF-8): Forum dyskusyjne o dużych możliwościach - instalator |
6cd05911 PG |
56 | Group: Applications/Databases/Interfaces |
57 | Requires: phpBB | |
58 | ||
59 | %description install | |
0c7647b8 | 60 | Package needed for %{name} forum instalation. |
6cd05911 | 61 | |
93bb512d | 62 | %description install -l pl.UTF-8 |
6cd05911 PG |
63 | Pakiet potrzebny do instalacji forum %{name}. |
64 | ||
26979e56 | 65 | %prep |
c04dbcca | 66 | %setup -q -n phpBB2 |
26979e56 PG |
67 | |
68 | %install | |
69 | rm -rf $RPM_BUILD_ROOT | |
52932b0e | 70 | install -d $RPM_BUILD_ROOT%{_appdir}/{admin,db,images,includes,install/schemas,language,templates} \ |
71 | $RPM_BUILD_ROOT{%{_sysconfdir},/etc/httpd,%{_avatardir}} | |
72 | ||
73 | install *.{php,inc} $RPM_BUILD_ROOT%{_appdir} | |
74 | install admin/*.php $RPM_BUILD_ROOT%{_appdir}/admin | |
75 | install db/*.php $RPM_BUILD_ROOT%{_appdir}/db | |
76 | install includes/*.php $RPM_BUILD_ROOT%{_appdir}/includes | |
77 | install install/*.php $RPM_BUILD_ROOT%{_appdir}/install | |
78 | install install/schemas/*.sql $RPM_BUILD_ROOT%{_appdir}/install/schemas | |
79 | ||
80 | cp -R images/* $RPM_BUILD_ROOT%{_appdir}/images | |
273b23f4 | 81 | cp -R images/avatars/* $RPM_BUILD_ROOT%{_avatardir} |
52932b0e | 82 | cp -R language/* $RPM_BUILD_ROOT%{_appdir}/language |
83 | cp -R templates/* $RPM_BUILD_ROOT%{_appdir}/templates | |
84 | rm -rf $RPM_BUILD_ROOT%{_appdir}/images/avatars | |
85 | ln -sf %{_avatardir} $RPM_BUILD_ROOT%{_appdir}/images/avatars | |
26979e56 | 86 | |
52932b0e | 87 | install config.php $RPM_BUILD_ROOT%{_sysconfdir}/config.php |
88 | install %{SOURCE8} $RPM_BUILD_ROOT%{_sysconfdir}/favicon.ico | |
89 | touch $RPM_BUILD_ROOT%{_sysconfdir}/robots.txt | |
90 | ln -sf %{_sysconfdir}/config.php $RPM_BUILD_ROOT%{_appdir}/config.php | |
91 | ln -sf %{_sysconfdir}/favicon.ico $RPM_BUILD_ROOT%{_appdir}/favicon.ico | |
92 | ln -sf %{_sysconfdir}/robots.txt $RPM_BUILD_ROOT%{_appdir}/robots.txt | |
6342c5f4 | 93 | |
52932b0e | 94 | tar zxf %{SOURCE1} -C $RPM_BUILD_ROOT%{_appdir}/language/ |
95 | tar zxf %{SOURCE2} -C $RPM_BUILD_ROOT%{_appdir}/templates/ | |
52932b0e | 96 | tar zxf %{SOURCE3} -C $RPM_BUILD_ROOT%{_appdir}/language/ |
97 | tar zxf %{SOURCE4} -C $RPM_BUILD_ROOT%{_appdir}/templates/ | |
52932b0e | 98 | tar zxf %{SOURCE5} -C $RPM_BUILD_ROOT%{_appdir}/language/ |
99 | tar zxf %{SOURCE6} -C $RPM_BUILD_ROOT%{_appdir}/templates/ | |
52932b0e | 100 | install %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf |
101 | install %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf | |
6342c5f4 | 102 | |
07da33f9 | 103 | find $RPM_BUILD_ROOT%{_appdir} -name Thumbs.db | xargs rm -f |
104 | ||
26979e56 PG |
105 | %clean |
106 | rm -rf $RPM_BUILD_ROOT | |
107 | ||
2abd58fa ER |
108 | %post |
109 | echo "You have to install %{name}-install package to prepare upgrade!!!" | |
110 | echo "For upgrade: http://<your.site.address>/<path>/install/upgrade.php" | |
111 | ||
daa42845 | 112 | %post install |
2abd58fa | 113 | echo "For installation: http://<your.site.address>/<path>/install/install.php" |
31fd8d31 PG |
114 | echo "For upgrade: http://<your.site.address>/<path>/install/upgrade.php" |
115 | echo | |
116 | echo "Remember to uninstall %{name}-install after initiation/upgrade of %{name}!!" | |
117 | ||
843b030f | 118 | %triggerin -- apache1 < 1.3.37-3, apache1-base |
52932b0e | 119 | %webapp_register apache %{_webapp} |
120 | ||
843b030f | 121 | %triggerun -- apache1 < 1.3.37-3, apache1-base |
52932b0e | 122 | %webapp_unregister apache %{_webapp} |
123 | ||
dd7fc53f | 124 | %triggerin -- apache < 2.2.0, apache-base |
52932b0e | 125 | %webapp_register httpd %{_webapp} |
126 | ||
dd7fc53f | 127 | %triggerun -- apache < 2.2.0, apache-base |
52932b0e | 128 | %webapp_unregister httpd %{_webapp} |
6342c5f4 | 129 | |
40d1318a | 130 | %triggerpostun -- %{name} <= 2.0.10-1 |
0ea2552b | 131 | for i in `grep -lr "/home/\(services/\)*httpd/html/phpBB" /etc/httpd/*`; do |
4ce8e8bc | 132 | cp $i $i.backup |
07da33f9 | 133 | sed -i -e "s#/home/httpd/html/phpBB#%{_appdir}#g" $i |
134 | sed -i -e "s#/home/services/httpd/html/phpBB#%{_appdir}#g" $i | |
4ce8e8bc | 135 | echo "File changed by trigger: $i (backup: $i.backup)" |
0ea2552b | 136 | done |
0ea2552b | 137 | |
07da33f9 | 138 | %triggerpostun -- %{name} < 2.0.19-0.5 |
52932b0e | 139 | # rescue app config from various old locations |
e1b43ca2 | 140 | for i in config.php favicon.ico robots.txt; do |
6bd71488 | 141 | if [ -f /home/services/httpd/html/phpBB/$i.rpmsave ]; then |
e1b43ca2 | 142 | mv -f %{_sysconfdir}/$i{,.rpmnew} |
143 | mv -f /home/services/httpd/html/phpBB/$i.rpmsave %{_sysconfdir}/$i | |
6bd71488 | 144 | fi |
e1b43ca2 | 145 | done |
52932b0e | 146 | |
e1b43ca2 | 147 | for i in config.php favicon.ico robots.txt; do |
6bd71488 | 148 | if [ -f /home/httpd/html/phpBB/$i.rpmsave ]; then |
e1b43ca2 | 149 | mv -f %{_sysconfdir}/$i{,.rpmnew} |
150 | mv -f /home/httpd/html/phpBB/$i.rpmsave %{_sysconfdir}/$i | |
6bd71488 | 151 | fi |
e1b43ca2 | 152 | done |
52932b0e | 153 | |
e1b43ca2 | 154 | for i in config.php favicon.ico robots.txt; do |
6bd71488 | 155 | if [ -f /etc/%{name}/$i.rpmsave ]; then |
e1b43ca2 | 156 | mv -f %{_sysconfdir}/$i{,.rpmnew} |
157 | mv -f /etc/%{name}/$i.rpmsave %{_sysconfdir}/$i | |
158 | fi | |
159 | done | |
52932b0e | 160 | |
161 | # nuke very-old config location (this mostly for Ra) | |
162 | if [ -f /etc/httpd/httpd.conf ]; then | |
163 | sed -i -e "/^Include.*%{name}.conf/d" /etc/httpd/httpd.conf | |
164 | fi | |
165 | ||
166 | # migrate from httpd (apache2) config dir | |
167 | if [ -f /etc/httpd/%{name}.conf.rpmsave ]; then | |
168 | cp -f %{_sysconfdir}/httpd.conf{,.rpmnew} | |
169 | mv -f /etc/httpd/%{name}.conf.rpmsave %{_sysconfdir}/httpd.conf | |
170 | fi | |
171 | ||
172 | rm -f /etc/httpd/httpd.conf/99_%{name}.conf | |
173 | /usr/sbin/webapp register httpd %{_webapp} | |
6bd71488 | 174 | %service -q httpd reload |
07da33f9 | 175 | |
26979e56 PG |
176 | %files |
177 | %defattr(644,root,root,755) | |
52932b0e | 178 | %dir %attr(750,root,http) %{_sysconfdir} |
179 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf | |
180 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf | |
07da33f9 | 181 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.php |
182 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/favicon.ico | |
183 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/robots.txt | |
49a55436 | 184 | %doc docs/* |
52932b0e | 185 | %dir %{_appdir} |
07da33f9 | 186 | %{_appdir}/[!c]*.php |
187 | %{_appdir}/common.php | |
188 | %{_appdir}/*.inc | |
189 | %{_appdir}/admin | |
190 | %{_appdir}/db | |
191 | %{_appdir}/images | |
192 | %{_appdir}/includes | |
aac88bb4 | 193 | %dir %{_appdir}/templates |
52932b0e | 194 | %{_appdir}/templates/index.htm |
07da33f9 | 195 | %{_appdir}/templates/subSilver/*.* |
196 | %{_appdir}/templates/subSilver/admin/*.* | |
197 | %{_appdir}/templates/subSilver/images/*.* | |
aac88bb4 | 198 | %dir %{_appdir}/language |
07da33f9 | 199 | %{_appdir}/language/index.htm |
52932b0e | 200 | %lang(en) %{_appdir}/language/lang_english |
201 | %lang(en) %{_appdir}/templates/subSilver/images/lang_english | |
202 | %lang(pl) %{_appdir}/language/lang_polish | |
203 | %lang(pl) %{_appdir}/templates/subSilver/images/lang_polish | |
204 | %lang(de) %{_appdir}/language/lang_german | |
205 | %lang(de) %{_appdir}/templates/subSilver/images/lang_german | |
206 | %lang(fr) %{_appdir}/language/lang_french | |
207 | %lang(fr) %{_appdir}/templates/subSilver/images/lang_french | |
07da33f9 | 208 | %attr(710,root,http) %dir /var/lib/%{name} |
209 | %attr(1770,root,http) %dir %{_avatardir} | |
210 | %{_avatardir}/index.htm | |
211 | %{_avatardir}/gallery | |
212 | %attr(640,root,http) %config(noreplace) %{_appdir}/config.php | |
213 | %attr(640,root,http) %config(noreplace) %{_appdir}/favicon.ico | |
214 | %attr(640,root,http) %config(noreplace) %{_appdir}/robots.txt | |
215 | ||
6cd05911 PG |
216 | %files install |
217 | %defattr(644,root,root,755) | |
49a55436 | 218 | %doc install/schemas/*.zip |
db9300b8 | 219 | %dir %{_appdir}/install |
07da33f9 | 220 | %{_appdir}/install/*.php |
aac88bb4 | 221 | %dir %{_appdir}/install/schemas |
07da33f9 | 222 | %{_appdir}/install/schemas/*.sql |