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