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