]> git.pld-linux.org Git - packages/phpBB.git/blob - phpBB.spec
- rel. 1, STBR
[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.14
5 Release:        1
6 License:        GPL v2
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
23 Source7:        %{name}.conf
24 Source8:        %{name}.ico
25 URL:            http://www.phpbb.com/
26 Requires:       php-pcre
27 Requires:       webserver
28 BuildArch:      noarch
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31 %define         _phpdir         %{_datadir}/%{name}
32 %define         _confdir        %{_sysconfdir}/%{name}
33 %define         _avatardir      /var/lib/%{name}/avatars
34
35 %description
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.
41
42 %description -l pl
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.
49
50 %package install
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
54 Requires:       phpBB
55
56 %description install
57 Package needed for %{name} forum instalation.
58
59 %description install -l pl
60 Pakiet potrzebny do instalacji forum %{name}.
61
62 %prep
63 %setup -q -c
64
65 %install
66 rm -rf $RPM_BUILD_ROOT
67 install -d $RPM_BUILD_ROOT%{_phpdir}/{admin,db,images,includes,install/schemas,language,templates} \
68         $RPM_BUILD_ROOT{%{_confdir},/etc/httpd} \
69         $RPM_BUILD_ROOT%{_avatardir}
70
71 install *.{php,inc}     $RPM_BUILD_ROOT%{_phpdir}
72 install admin/*.php     $RPM_BUILD_ROOT%{_phpdir}/admin
73 install db/*.php        $RPM_BUILD_ROOT%{_phpdir}/db
74 install includes/*.php  $RPM_BUILD_ROOT%{_phpdir}/includes
75 install install/*.php   $RPM_BUILD_ROOT%{_phpdir}/install
76 install install/schemas/*.sql $RPM_BUILD_ROOT%{_phpdir}/install/schemas
77
78 cp -R images/*          $RPM_BUILD_ROOT%{_phpdir}/images
79 cp -R images/avatars/*  $RPM_BUILD_ROOT%{_avatardir}
80 cp -R language/*        $RPM_BUILD_ROOT%{_phpdir}/language
81 cp -R templates/*       $RPM_BUILD_ROOT%{_phpdir}/templates
82 rm -rf $RPM_BUILD_ROOT%{_phpdir}/images/avatars
83 ln -sf %{_avatardir} $RPM_BUILD_ROOT%{_phpdir}/images/avatars
84
85 install config.php $RPM_BUILD_ROOT%{_confdir}
86 install %{SOURCE8} $RPM_BUILD_ROOT%{_confdir}/favicon.ico
87 touch $RPM_BUILD_ROOT%{_confdir}/robots.txt
88 ln -sf %{_confdir}/config.php $RPM_BUILD_ROOT%{_phpdir}/config.php
89 ln -sf %{_confdir}/favicon.ico $RPM_BUILD_ROOT%{_phpdir}/favicon.ico
90 ln -sf %{_confdir}/robots.txt $RPM_BUILD_ROOT%{_phpdir}/robots.txt
91
92 tar zxf %{SOURCE1} -C $RPM_BUILD_ROOT%{_phpdir}/language/
93 tar zxf %{SOURCE2} -C $RPM_BUILD_ROOT%{_phpdir}/templates/
94
95 tar zxf %{SOURCE3} -C $RPM_BUILD_ROOT%{_phpdir}/language/
96 tar zxf %{SOURCE4} -C $RPM_BUILD_ROOT%{_phpdir}/templates/
97
98 tar zxf %{SOURCE5} -C $RPM_BUILD_ROOT%{_phpdir}/language/
99 tar zxf %{SOURCE6} -C $RPM_BUILD_ROOT%{_phpdir}/templates/
100
101 install %{SOURCE7} $RPM_BUILD_ROOT/etc/httpd/%{name}.conf
102
103 %clean
104 rm -rf $RPM_BUILD_ROOT
105
106 %post
107 if [ "$1" = "1" ]; then
108         if [ -f /etc/httpd/httpd.conf ] && ! grep -q "^Include.*%{name}.conf" /etc/httpd/httpd.conf; then
109                 echo "Include /etc/httpd/%{name}.conf" >> /etc/httpd/httpd.conf
110         elif [ -d /etc/httpd/httpd.conf ]; then
111                 ln -sf /etc/httpd/%{name}.conf /etc/httpd/httpd.conf/99_%{name}.conf
112         fi
113         if [ -f /var/lock/subsys/httpd ]; then
114                 /usr/sbin/apachectl graceful 1>&2
115         fi
116 fi
117
118 %post install
119 echo "For instalation: http://<your.site.address>/<path>/install/install.php"
120 echo "For upgrade: http://<your.site.address>/<path>/install/upgrade.php"
121 echo
122 echo "Remember to uninstall %{name}-install after initiation/upgrade of %{name}!!"
123
124 %preun
125 if [ "$1" = "0" ]; then
126         umask 027
127         if [ -d /etc/httpd/httpd.conf ]; then
128                 rm -f /etc/httpd/httpd.conf/99_%{name}.conf
129         else
130                 grep -v "^Include.*%{name}.conf" /etc/httpd/httpd.conf > \
131                         /etc/httpd/httpd.conf.tmp
132                 mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
133                 if [ -f /var/lock/subsys/httpd ]; then
134                         /usr/sbin/apachectl graceful 1>&2
135                 fi
136         fi
137 fi
138
139 %triggerpostun -- %{name} < %{version}
140 echo "You have to install %{name}-install package to prepare upgrade!!!"
141 echo "For upgrade: http://<your.site.address>/<path>/install/upgrade.php"
142
143 %triggerpostun -- %{name} <= 2.0.10-1
144 if [ -f /home/services/httpd/html/phpBB/config.php.rpmsave ]; then
145         mv -f /home/services/httpd/html/phpBB/config.php.rpmsave /etc/phpBB/config.php
146 else
147         if [ -f /home/httpd/html/phpBB/config.php.rpmsave ]; then
148                 mv -f /home/httpd/html/phpBB/config.php.rpmsave /etc/phpBB/config.php
149         fi
150 fi
151 for i in `grep -lr "/home/\(services/\)*httpd/html/phpBB" /etc/httpd/*`; do
152         cp $i $i.backup
153         %{__perl} -pi -e "s#/home/httpd/html/phpBB#%{_phpdir}#g" $i
154         %{__perl} -pi -e "s#/home/services/httpd/html/phpBB#%{_phpdir}#g" $i
155         echo "File changed by trigger: $i (backup: $i.backup)"
156 done
157 if [ -f /var/lock/subsys/httpd ]; then
158         /usr/sbin/apachectl graceful 1>&2
159 fi
160
161 %files
162 %defattr(644,root,root,755)
163 %dir %{_confdir}
164 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_confdir}/*
165 %config(noreplace) %verify(not md5 mtime size) /etc/httpd/%{name}.conf
166 %doc docs/*
167 %attr(755,root,http) %dir %{_phpdir}
168 %attr(640,root,http) %{_phpdir}/[!c]*.php
169 %attr(640,root,http) %{_phpdir}/common.php
170 %attr(640,root,http) %{_phpdir}/*.inc
171 %attr(750,root,http) %dir %{_phpdir}/admin
172 %attr(750,root,http) %dir %{_phpdir}/db
173 %attr(750,root,http) %dir %{_phpdir}/images
174 %attr(640,root,http) %{_phpdir}/images/*.gif
175 %attr(640,root,http) %{_phpdir}/images/index.htm
176 %attr(750,root,http) %dir %{_phpdir}/images/smiles
177 %attr(710,root,http) %dir /var/lib/%{name}
178 %attr(1770,root,http) %dir %{_avatardir}
179 %attr(750,root,http) %dir %{_phpdir}/includes
180 %attr(640,root,http) %config(noreplace) %{_phpdir}/config.php
181 %attr(640,root,http) %config(noreplace) %{_phpdir}/favicon.ico
182 %attr(640,root,http) %config(noreplace) %{_phpdir}/robots.txt
183 %{_phpdir}/admin/*
184 %{_phpdir}/db/*
185 %{_phpdir}/images/smiles/*
186 %{_phpdir}/images/avatars
187 %{_avatardir}/*
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
199
200 %lang(en) %{_phpdir}/language/lang_english
201 %lang(en) %{_phpdir}/templates/subSilver/images/lang_english
202
203 %lang(pl) %{_phpdir}/language/lang_polish
204 %lang(pl) %{_phpdir}/templates/subSilver/images/lang_polish
205
206 %lang(de) %{_phpdir}/language/lang_german
207 %lang(de) %{_phpdir}/templates/subSilver/images/lang_german
208
209 %lang(fr) %{_phpdir}/language/lang_french
210 %lang(fr) %{_phpdir}/templates/subSilver/images/lang_french
211
212 %files install
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
This page took 0.103615 seconds and 3 git commands to generate.