]> git.pld-linux.org Git - packages/phpBB.git/blob - phpBB.spec
- realy up to 2.0.15 (phpBB-php5 run better on php 5.x)
[packages/phpBB.git] / phpBB.spec
1 Summary:        A feature-rich PHP discussion board
2 Summary(pl):    Forum dyskusyjne o du¿ych mo¿liwo¶ciach
3 Name:           phpBB
4 Version:        2.0.15
5 %define fver    20154
6 Release:        1
7 License:        GPL v2
8 Group:          Applications/WWW
9 #Source0:       http://dl.sourceforge.net/phpbb/%{name}-%{version}.tar.bz2
10 Source0:        http://dl.sourceforge.net/phpbb-php5mod/%{fver}.tar.gz
11 # Source0-md5:  e8c6f11c6dec5236033dd517e5f07281
12 Source1:        http://dl.sourceforge.net/phpbb/lang_polish.tar.gz
13 # Source1-md5:  db020ef788d4bd50ce04014964e3e043
14 Source2:        http://dl.sourceforge.net/phpbb/subSilver_polish.tar.gz
15 # Source2-md5:  9367f7a761aef3795ffa296b413136b4
16 Source3:        http://dl.sourceforge.net/phpbb/lang_german.tar.gz
17 # Source3-md5:  afc686072978b896e18fa211210c3b13
18 Source4:        http://dl.sourceforge.net/phpbb/subSilver_german.tar.gz
19 # Source4-md5:  8340f310ee4892f3e19da3e000fdb708
20 Source5:        http://dl.sourceforge.net/phpbb/lang_french.tar.gz
21 # Source5-md5:  c81f843d4adf0a086efef590074478e6
22 Source6:        http://dl.sourceforge.net/phpbb/subSilver_french.tar.gz
23 # Source6-md5:  419157eb144fa81b7464a5f2edeea434
24 Source7:        %{name}.conf
25 Source8:        %{name}.ico
26 URL:            http://www.phpbb.com/
27 Requires:       php-pcre
28 Requires:       webserver
29 BuildArch:      noarch
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %define         _phpdir         %{_datadir}/%{name}
33 %define         _confdir        %{_sysconfdir}/%{name}
34 %define         _avatardir      /var/lib/%{name}/avatars
35
36 %description
37 phpBB is a UBB-style dissussion board written in PHP backended by a
38 MySQL database. It includes features such as posting/replying/editing
39 messages, private messages, private forums, user and anonymous
40 posting, robust theming, user ranking by posts or by special, admin
41 definable, ranks, and much more.
42
43 %description -l pl
44 phpBB jest forum dyskusyjnym w stylu UBB napisanym w PHP z u¿yciem
45 bazy danych MySQL. Ma mo¿liwo¶ci takie jak: wysy³anie, odpisywanie,
46 edycja wiadomo¶ci, prywatne wiadomo¶ci, prywatne fora, wysy³anie jako
47 u¿ytkownik i anonimowe, bogaty wybór motywów, ranking u¿ytkowników
48 wed³ug ich wiadomo¶ci lub specjalne, definiowane przez administratora,
49 rankingi i wiele innych.
50
51 %package install
52 Summary:        A feature-rich PHP discussion board - installer
53 Summary(pl):    Forum dyskusyjne o du¿ych mo¿liwo¶ciach - instalator
54 Group:          Applications/Databases/Interfaces
55 Requires:       phpBB
56
57 %description install
58 Package needed for %{name} forum instalation.
59
60 %description install -l pl
61 Pakiet potrzebny do instalacji forum %{name}.
62
63 %prep
64 %setup -q -c
65
66 %install
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}
71
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
78
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 %{_avatardir} $RPM_BUILD_ROOT%{_phpdir}/images/avatars
85
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
92
93 tar zxf %{SOURCE1} -C $RPM_BUILD_ROOT%{_phpdir}/language/
94 tar zxf %{SOURCE2} -C $RPM_BUILD_ROOT%{_phpdir}/templates/
95
96 tar zxf %{SOURCE3} -C $RPM_BUILD_ROOT%{_phpdir}/language/
97 tar zxf %{SOURCE4} -C $RPM_BUILD_ROOT%{_phpdir}/templates/
98
99 tar zxf %{SOURCE5} -C $RPM_BUILD_ROOT%{_phpdir}/language/
100 tar zxf %{SOURCE6} -C $RPM_BUILD_ROOT%{_phpdir}/templates/
101
102 install %{SOURCE7} $RPM_BUILD_ROOT/etc/httpd/%{name}.conf
103
104 %clean
105 rm -rf $RPM_BUILD_ROOT
106
107 %post
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
113         fi
114         if [ -f /var/lock/subsys/httpd ]; then
115                 /usr/sbin/apachectl graceful 1>&2
116         fi
117 fi
118
119 %post install
120 echo "For instalation: http://<your.site.address>/<path>/install/install.php"
121 echo "For upgrade: http://<your.site.address>/<path>/install/upgrade.php"
122 echo
123 echo "Remember to uninstall %{name}-install after initiation/upgrade of %{name}!!"
124
125 %preun
126 if [ "$1" = "0" ]; then
127         umask 027
128         if [ -d /etc/httpd/httpd.conf ]; then
129                 rm -f /etc/httpd/httpd.conf/99_%{name}.conf
130         else
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
136                 fi
137         fi
138 fi
139
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"
143
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
147 else
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
150         fi
151 fi
152 for i in `grep -lr "/home/\(services/\)*httpd/html/phpBB" /etc/httpd/*`; do
153         cp $i $i.backup
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)"
157 done
158 if [ -f /var/lock/subsys/httpd ]; then
159         /usr/sbin/apachectl graceful 1>&2
160 fi
161
162 %files
163 %defattr(644,root,root,755)
164 %dir %{_confdir}
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
167 %doc docs/*
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
184 %{_phpdir}/admin/*
185 %{_phpdir}/db/*
186 %{_phpdir}/images/smiles/*
187 %{_phpdir}/images/avatars
188 %{_avatardir}/*
189 %{_phpdir}/includes/*
190 %{_phpdir}/templates/index.htm
191 %attr(750,root,http) %dir %{_phpdir}/templates
192 %attr(750,root,http) %dir %{_phpdir}/templates/subSilver
193 %attr(750,root,http) %dir %{_phpdir}/templates/subSilver/admin
194 %attr(640,root,http) %{_phpdir}/templates/subSilver/admin/*
195 %attr(640,root,http) %{_phpdir}/templates/subSilver/*.*
196 %attr(750,root,http) %dir %{_phpdir}/templates/subSilver/images
197 %attr(640,root,http) %{_phpdir}/templates/subSilver/images/*.*
198 %attr(750,root,http) %dir %{_phpdir}/language
199 %attr(640,root,http) %{_phpdir}/language/*.htm
200
201 %lang(en) %{_phpdir}/language/lang_english
202 %lang(en) %{_phpdir}/templates/subSilver/images/lang_english
203
204 %lang(pl) %{_phpdir}/language/lang_polish
205 %lang(pl) %{_phpdir}/templates/subSilver/images/lang_polish
206
207 %lang(de) %{_phpdir}/language/lang_german
208 %lang(de) %{_phpdir}/templates/subSilver/images/lang_german
209
210 %lang(fr) %{_phpdir}/language/lang_french
211 %lang(fr) %{_phpdir}/templates/subSilver/images/lang_french
212
213 %files install
214 %defattr(644,root,root,755)
215 %doc install/schemas/*.zip
216 %attr(750,root,http) %dir %{_phpdir}/install
217 %attr(640,root,http) %{_phpdir}/install/*.php
218 %attr(750,root,http) %dir %{_phpdir}/install/schemas
219 %attr(640,root,http) %{_phpdir}/install/schemas/*.sql
This page took 0.07517 seconds and 3 git commands to generate.