]> git.pld-linux.org Git - packages/phpBB.git/blob - phpBB.spec
- back to php5 ready version, rel.2
[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.11
5 Release:        2
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/20112.tar.gz
10 # Source0-md5:  5f1d4db2882c5b50a04d6fb245d1e71d
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 URL:            http://www.phpbb.com/
25 Requires:       php-pcre
26 Requires:       webserver
27 BuildArch:      noarch
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30 %define         _phpdir         %{_datadir}/%{name}
31 %define         _sysconfdir     /etc/%{name}
32
33 %description
34 phpBB is a UBB-style dissussion board written in PHP backended by a
35 MySQL database. It includes features such as posting/replying/editing
36 messages, private messages, private forums, user and anonymous
37 posting, robust theming, user ranking by posts or by special, admin
38 definable, ranks, and much more.
39
40 %description -l pl
41 phpBB jest forum dyskusyjnym w stylu UBB napisanym w PHP z u¿yciem
42 bazy danych MySQL. Ma mo¿liwo¶ci takie jak: wysy³anie, odpisywanie,
43 edycja wiadomo¶ci, prywatne wiadomo¶ci, prywatne fora, wysy³anie jako
44 u¿ytkownik i anonimowe, bogaty wybór motywów, ranking u¿ytkowników
45 wed³ug ich wiadomo¶ci lub specjalne, definiowane przez administratora,
46 rankingi i wiele innych.
47
48 %package install
49 Summary:        A feature-rich PHP discussion board - installer
50 Summary(pl):    Forum dyskusyjne o du¿ych mo¿liwo¶ciach - instalator
51 Group:          Applications/Databases/Interfaces
52 Requires:       phpBB
53
54 %description install
55 Package needed for %{name} forum instalation.
56
57 %description install -l pl
58 Pakiet potrzebny do instalacji forum %{name}.
59
60 %prep
61 %setup -q -c %{name}2
62
63 %install
64 rm -rf $RPM_BUILD_ROOT
65 install -d $RPM_BUILD_ROOT%{_phpdir}/{admin,db,images,includes,install/schemas,language,templates} \
66         $RPM_BUILD_ROOT{%{_sysconfdir},/etc/httpd}
67
68 install *.{php,inc}     $RPM_BUILD_ROOT%{_phpdir}
69 install admin/*.php     $RPM_BUILD_ROOT%{_phpdir}/admin
70 install db/*.php        $RPM_BUILD_ROOT%{_phpdir}/db
71 install includes/*.php  $RPM_BUILD_ROOT%{_phpdir}/includes
72 install install/*.php   $RPM_BUILD_ROOT%{_phpdir}/install
73 install install/schemas/*.sql $RPM_BUILD_ROOT%{_phpdir}/install/schemas
74
75 cp -R images/*          $RPM_BUILD_ROOT%{_phpdir}/images
76 cp -R language/*        $RPM_BUILD_ROOT%{_phpdir}/language
77 cp -R templates/*       $RPM_BUILD_ROOT%{_phpdir}/templates
78
79 cp config.php $RPM_BUILD_ROOT%{_sysconfdir}
80 ln -sf %{_sysconfdir}/config.php $RPM_BUILD_ROOT%{_phpdir}/config.php
81
82 tar zxfv %{SOURCE1} -C $RPM_BUILD_ROOT%{_phpdir}/language/
83 tar zxfv %{SOURCE2} -C $RPM_BUILD_ROOT%{_phpdir}/templates/
84
85 tar zxfv %{SOURCE3} -C $RPM_BUILD_ROOT%{_phpdir}/language/
86 tar zxfv %{SOURCE4} -C $RPM_BUILD_ROOT%{_phpdir}/templates/
87
88 tar zxfv %{SOURCE5} -C $RPM_BUILD_ROOT%{_phpdir}/language/
89 tar zxfv %{SOURCE6} -C $RPM_BUILD_ROOT%{_phpdir}/templates/
90
91 install %{SOURCE7} $RPM_BUILD_ROOT/etc/httpd/%{name}.conf
92
93 %clean
94 rm -rf $RPM_BUILD_ROOT
95
96 %post
97 if [ "$1" = "1" ]; then
98         if [ -f /etc/httpd/httpd.conf ] && ! grep -q "^Include.*%{name}.conf" /etc/httpd/httpd.conf; then
99                 echo "Include /etc/httpd/%{name}.conf" >> /etc/httpd/httpd.conf
100         elif [ -d /etc/httpd/httpd.conf ]; then
101                 ln -sf /etc/httpd/%{name}.conf /etc/httpd/httpd.conf/99_%{name}.conf
102         fi
103         if [ -f /var/lock/subsys/httpd ]; then
104                 /usr/sbin/apachectl graceful 1>&2
105         fi
106 fi
107
108 %post install
109 echo "For instalation: http://<your.site.address>/<path>/install/install.php"
110 echo "For upgrade: http://<your.site.address>/<path>/install/upgrade.php"
111 echo
112 echo "Remember to uninstall %{name}-install after initiation/upgrade of %{name}!!"
113
114 %preun
115 if [ "$1" = "0" ]; then
116         umask 027
117         if [ -d /etc/httpd/httpd.conf ]; then
118                 rm -f /etc/httpd/httpd.conf/99_%{name}.conf
119         else
120                 grep -v "^Include.*%{name}.conf" /etc/httpd/httpd.conf > \
121                         /etc/httpd/httpd.conf.tmp
122                 mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
123                 if [ -f /var/lock/subsys/httpd ]; then
124                         /usr/sbin/apachectl graceful 1>&2
125                 fi
126         fi
127 fi
128
129 %triggerpostun -- %{name} < %{version}
130 echo "You have to install %{name}-install package to prepare upgrade!!!"
131 echo "For upgrade: http://<your.site.address>/<path>/install/upgrade.php"
132
133 %triggerpostun -- %{name} <= 2.0.10-1
134 if [ -f /home/services/httpd/html/phpBB/config.php.rpmsave ]; then
135         mv -f /home/services/httpd/html/phpBB/config.php.rpmsave /etc/phpBB/config.php
136 else
137         if [ -f /home/httpd/html/phpBB/config.php.rpmsave ]; then
138                 mv -f /home/httpd/html/phpBB/config.php.rpmsave /etc/phpBB/config.php
139         fi
140 fi
141 for i in `grep -lr "/home/\(services/\)*httpd/html/phpBB" /etc/httpd/*`; do
142         cp $i $i.backup
143         %{__perl} -pi -e "s#/home/httpd/html/phpBB#%{_phpdir}#g" $i
144         %{__perl} -pi -e "s#/home/services/httpd/html/phpBB#%{_phpdir}#g" $i
145         echo "File changed by trigger: $i (backup: $i.backup)"
146 done
147 if [ -f /var/lock/subsys/httpd ]; then
148         /usr/sbin/apachectl graceful 1>&2
149 fi
150
151 %files
152 %defattr(644,root,root,755)
153 %dir %{_sysconfdir}
154 %attr(640,root,http) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/*
155 %config(noreplace) %verify(not size mtime md5) /etc/httpd/%{name}.conf
156 %doc docs/*
157 %attr(755,root,http) %dir %{_phpdir}
158 %attr(640,root,http) %{_phpdir}/[!c]*.php
159 %attr(640,root,http) %{_phpdir}/common.php
160 %attr(640,root,http) %{_phpdir}/*.inc
161 %attr(750,root,http) %dir %{_phpdir}/admin
162 %attr(750,root,http) %dir %{_phpdir}/db
163 %attr(750,root,http) %dir %{_phpdir}/images
164 %attr(640,root,http) %{_phpdir}/images/*.gif
165 %attr(640,root,http) %{_phpdir}/images/index.htm
166 %attr(750,root,http) %dir %{_phpdir}/images/smiles
167 %attr(1770,root,http) %dir %{_phpdir}/images/avatars
168 %attr(750,root,http) %dir %{_phpdir}/includes
169 %{_phpdir}/admin/*
170 %{_phpdir}/db/*
171 %{_phpdir}/images/smiles/*
172 %{_phpdir}/images/avatars/*
173 %{_phpdir}/includes/*
174 %{_phpdir}/templates/index.htm
175 %attr(750,root,http) %dir %{_phpdir}/templates
176 %attr(750,root,http) %dir %{_phpdir}/templates/subSilver
177 %attr(750,root,http) %dir %{_phpdir}/templates/subSilver/admin
178 %attr(640,root,http) %{_phpdir}/templates/subSilver/admin/*
179 %attr(640,root,http) %{_phpdir}/templates/subSilver/*.*
180 %attr(750,root,http) %dir %{_phpdir}/templates/subSilver/images
181 %attr(640,root,http) %{_phpdir}/templates/subSilver/images/*.*
182 %attr(750,root,http) %dir %{_phpdir}/language
183 %attr(640,root,http) %{_phpdir}/language/*.htm
184
185 %lang(en) %{_phpdir}/language/lang_english
186 %lang(en) %{_phpdir}/templates/subSilver/images/lang_english
187
188 %lang(pl) %{_phpdir}/language/lang_polish
189 %lang(pl) %{_phpdir}/templates/subSilver/images/lang_polish
190
191 %lang(de) %{_phpdir}/language/lang_german
192 %lang(de) %{_phpdir}/templates/subSilver/images/lang_german
193
194 %lang(fr) %{_phpdir}/language/lang_french
195 %lang(fr) %{_phpdir}/templates/subSilver/images/lang_french
196
197 %files install
198 %defattr(644,root,root,755)
199 %doc install/schemas/*.zip
200 %attr(750,root,http) %dir %{_phpdir}/install
201 %attr(640,root,http) %{_phpdir}/install/*.php
202 %attr(750,root,http) %dir %{_phpdir}/install/schemas
203 %attr(640,root,http) %{_phpdir}/install/schemas/*.sql
This page took 0.033786 seconds and 3 git commands to generate.