]> git.pld-linux.org Git - packages/drupal.git/blob - drupal.spec
- alternative comments moderation patch
[packages/drupal.git] / drupal.spec
1 Summary:        Open source content management platform
2 Summary(pl):    Platforma do zarz±dzania tre¶ci± o otwartych ¼ród³ach
3 Name:           drupal
4 Version:        4.6.5
5 Release:        0.12
6 License:        GPL
7 Group:          Applications/WWW
8 Source0:        http://drupal.org/files/projects/%{name}-%{version}.tar.gz
9 # Source0-md5:  21e5e768d92fb6ecf52d56cacd37706e
10 Source1:        %{name}.conf
11 Source2:        %{name}.cron
12 Source3:        %{name}.PLD
13 Patch0:         %{name}-replication.patch
14 Patch1:         %{name}-sitesdir.patch
15 Patch2:         %{name}-topdir.patch
16 Patch3:         %{name}-themedir2.patch
17 Patch4:         %{name}-emptypass.patch
18 Patch5:         %{name}-cron.patch
19 Patch6:         %{name}-19298-cache.patch
20 Patch7:         %{name}-update-cli.patch
21 Patch8:         %{name}-locale-memory.patch
22 URL:            http://drupal.org/
23 BuildRequires:  rpmbuild(macros) >= 1.264
24 BuildRequires:  sed >= 4.0
25 Requires:       %{name}(DB_Driver) = %{version}-%{release}
26 Requires:       apache(mod_access)
27 Requires:       apache(mod_alias)
28 Requires:       apache(mod_dir)
29 Requires:       apache(mod_expires)
30 Requires:       apache(mod_rewrite)
31 Requires:       php >= 3:4.3.3
32 Requires:       php-mysql
33 Requires:       php-pcre
34 Requires:       php-xml
35 Requires:       webapps
36 Requires:       webserver = apache
37 BuildArch:      noarch
38 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40 %define         _appdir         %{_datadir}/%{name}
41 %define         _webapps        /etc/webapps
42 %define         _webapp         %{name}
43 %define         _sysconfdir     %{_webapps}/%{_webapp}
44
45 %description
46 Drupal is software that allows an individual or a community of users
47 to easily publish, manage and organize a great variety of content on a
48 website. Tens of thousands of people and organizations have used
49 Drupal to set up scores of different kinds of web sites, including
50 - community web portals and discussion sites
51 - corporate web sites/intranet portals
52 - personal web sites
53 - afficionado sites
54 - e-commerce applications
55 - resource directories
56
57 Drupal includes features to enable
58 - content management systems
59 - blogs
60 - collaborative authoring environments
61 - forums
62 - newsletters
63 - picture galleries
64 - file uploads and download
65
66 and much more.
67
68 %description -l pl
69 Drupal to oprogramowanie pozwalaj±ce osobie lub spo³eczno¶ci
70 u¿ytkowników na ³atwe publikowanie, zarz±dzanie i organizowanie ró¿nej
71 tre¶ci na stronie WWW. Dziesi±tki tysiêcy ludzi i organizacji u¿ywali
72 Drupala do ustawiania wyników ró¿nych rodzajów stron WWW, w tym:
73 - portale WWW i strony dyskusyjne spo³eczno¶ci
74 - korporacyjne strony WWW/portale intranetowe
75 - osobiste strony WWW
76 - strony mi³o¶ników
77 - aplikacje e-commerce
78 - s³owniki zasobów
79
80 Drupal zawiera zasoby umo¿liwiaj±ce tworzenie:
81 - systemów zarz±dzania tre¶ci±
82 - blogów
83 - ¶rodowisk pracy grupowej
84 - forów
85 - nowin
86 - galerii zdjêæ
87 - wrzucania i ¶ci±gania plików
88
89 i wiele wiêcej.
90
91 %package cron
92 Summary:        Drupal cron
93 Summary(pl):    Us³uga cron dla Drupala
94 Group:          Applications/WWW
95 Requires:       %{name} = %{version}-%{release}
96 Requires:       /usr/bin/php
97 Requires:       crondaemon
98 Requires:       php-cli >= 3:4.3.3
99
100 %description cron
101 This package contains script which invokes cron hooks for Drupal.
102
103 %description cron -l pl
104 Ten pakiet zawiera skrypt wywo³uj±cy uchwyty crona dla Drupala.
105
106 %package db-mysql
107 Summary:        Drupal DB Driver for MySQL
108 Summary(pl):    Sterownik bazy danych MySQL dla Drupala
109 Group:          Applications/WWW
110 Requires:       php-mysql
111 Provides:       %{name}(DB_Driver) = %{version}-%{release}
112
113 %description db-mysql
114 This virtual package provides MySQL database backend for Drupal.
115
116 %description db-mysql -l pl
117 Ten wirtualny pakiet dostarcza backend bazy danych MySQL dla Drupala.
118
119 %package db-pgsql
120 Summary:        Drupal DB Driver for PostgreSQL
121 Summary(pl):    Sterownik bazy danych PostgreSQL dla Drupala
122 Group:          Applications/WWW
123 Requires:       php-pgsql
124 Provides:       %{name}(DB_Driver) = %{version}-%{release}
125
126 %description db-pgsql
127 This virtual package provides PostgreSQL database backend for Drupal.
128
129 NOTE: This driver is not tested in PLD, and not all modules have
130 database schema for PostgreSQL. Use this driver at your own risk!
131
132 %description db-pgsql -l pl
133 Ten wirtualny pakiet dostarcza backend bazy danych PostgreSQL dla
134 Drupala.
135
136 UWAGA: Ten sterownik nie by³ testowany w PLD i nie wszystkie modu³y
137 maj± schematy bazy danych dla PostgreSQL-a. Mo¿na go u¿ywaæ na w³asne
138 ryzyko.
139
140 %package update
141 Summary:        Package to perform Drupal database updates
142 Group:          Applications/WWW
143 Requires:       %{name} = %{version}-%{release}
144
145 %description update
146 This package contains scripts needed to do database updates via web.
147
148 %package xmlrpc
149 Summary:        XMLRPC server for Drupal
150 Summary(pl):    Serwer XMLRPC dla Drupala
151 Group:          Applications/WWW
152 Requires:       %{name} = %{version}-%{release}
153
154 %description xmlrpc
155 XMLRPC server for Drupal allows other Drupals authorize with your
156 Drupal's user creditentials, this is called Distributed Authentication
157 in Drupal world.
158
159 %description xmlrpc -l pl
160 Serwer XMLRPC dla Drupala pozwala innym Drupalom autoryzowaæ siê z
161 danymi uwierzytelniaj±cymi u¿ytkownika danego Drupala - jest to
162 nazywane rozproszonym uwierzytelnianiem.
163
164 %prep
165 %setup -q
166 %patch0 -p1
167 %patch1 -p1
168 %patch2 -p1
169 %patch3 -p1
170 %patch4 -p1
171 %patch5 -p1
172 %patch6 -p0
173 %patch7 -p1
174 %patch8 -p1
175
176 find -name '*~' | xargs -r rm -v
177 cp -p %{SOURCE3} README.PLD
178
179 %install
180 rm -rf $RPM_BUILD_ROOT
181 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/cron.d,/var/{cache,lib}/%{name}} \
182         $RPM_BUILD_ROOT%{_appdir}/{po,database,modules/po,htdocs/modules}
183
184 cp -a *.ico index.php $RPM_BUILD_ROOT%{_appdir}/htdocs
185 cp -a misc $RPM_BUILD_ROOT%{_appdir}/htdocs
186 cp -a update.php xmlrpc.php $RPM_BUILD_ROOT%{_appdir}/htdocs
187 cp -a database/updates.inc $RPM_BUILD_ROOT%{_appdir}/database
188
189 cp -a cron.php $RPM_BUILD_ROOT%{_appdir}
190 cp -a modules/* $RPM_BUILD_ROOT%{_appdir}/modules
191 cp -a includes scripts $RPM_BUILD_ROOT%{_appdir}
192 cp -a sites $RPM_BUILD_ROOT%{_sysconfdir}
193
194 ln -s /var/lib/%{name} $RPM_BUILD_ROOT%{_appdir}/files
195 # needed for node.module for syndication icon
196 ln -s htdocs/misc $RPM_BUILD_ROOT%{_appdir}
197
198 # install themes
199 cp -a themes $RPM_BUILD_ROOT%{_appdir}/htdocs
200 # move .xtmpl/.theme out of htdocs
201 (cd $RPM_BUILD_ROOT%{_appdir}/htdocs && tar cf - --remove-files themes/*/*.{xtmpl,theme}) | tar -xf - -C $RPM_BUILD_ROOT%{_appdir}
202 mv $RPM_BUILD_ROOT%{_appdir}/{htdocs/,}themes/engines
203 # make screenshot.png available in appdir
204 for a in $RPM_BUILD_ROOT%{_appdir}/htdocs/themes/*; do
205         t=$(basename $a)
206         ln -s ../../htdocs/themes/$t/screenshot.png $RPM_BUILD_ROOT%{_appdir}/themes/$t
207 done
208
209 # a hack
210 s=themes/chameleon/marvin
211 ln -s ../../htdocs/$s $RPM_BUILD_ROOT%{_appdir}/$s
212
213 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
214 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
215 install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/%{name}
216
217 %clean
218 rm -rf $RPM_BUILD_ROOT
219
220 %post db-mysql
221 if [ "$1" = 1 ]; then
222 %banner -e %{name}-db-mysql <<EOF
223 If this is your first install of Drupal, you need to create Drupal database:
224
225 mysqladmin create drupal
226 zcat %{_docdir}/%{name}-db-mysql-%{version}/database.mysql.gz | mysql drupal
227 mysql -e "GRANT SELECT, INSERT, UPDATE, DELETE ON drupal.* TO 'drupal'@'localhost' IDENTIFIED BY 'PASSWORD'"
228 mysql -e "GRANT CREATE TEMPORARY TABLES, LOCK TABLES ON *.* TO 'drupal'@'localhost'"
229
230 EOF
231 fi
232
233 %post db-pgsql
234 if [ "$1" = 1 ]; then
235 %banner -e %{name}-db-pgsql <<EOF
236 If this is your first install of Drupal, you need to create Drupal database:
237
238 and import initial schema from
239 %{_docdir}/%{name}-db-pgsql-%{version}/database.pgsql.gz
240
241 EOF
242 fi
243
244 %triggerin -- apache1
245 %webapp_register apache %{_webapp}
246
247 %triggerun -- apache1
248 %webapp_unregister apache %{_webapp}
249
250 %triggerin -- apache >= 2.0.0
251 %webapp_register httpd %{_webapp}
252
253 %triggerun -- apache >= 2.0.0
254 %webapp_unregister httpd %{_webapp}
255
256 %triggerpostun -- %{name} < 4.6.4-0.4
257 # rescue app configs.
258 if [ -f /etc/drupal/sites/default/settings.php.rpmsave ]; then
259         mv -f %{_sysconfdir}/sites/default/settings.php{,.rpmnew}
260         mv -f /etc/drupal/sites/default/settings.php.rpmsave %{_sysconfdir}/sites/default/settings.php
261 fi
262 # other configured sites, if any
263 for i in /etc/drupal/sites/*; do
264         d=$(basename $i)
265         [ "$d" = "default" ] && continue
266         mv -f %{_sysconfdir}/sites/$d{,.rpmnew}
267         mv -f $i %{_sysconfdir}/sites/$d
268 done
269
270 # migrate from apache-config macros
271 if [ -f /etc/drupal/apache.conf.rpmsave ]; then
272         if [ -d /etc/apache/webapps.d ]; then
273                 cp -f %{_sysconfdir}/apache.conf{,.rpmnew}
274                 cp -f /etc/drupal/apache.conf.rpmsave %{_sysconfdir}/apache.conf
275         fi
276
277         if [ -d /etc/httpd/webapps.d ]; then
278                 cp -f %{_sysconfdir}/httpd.conf{,.rpmnew}
279                 cp -f /etc/drupal/apache.conf.rpmsave %{_sysconfdir}/httpd.conf
280         fi
281         rm -f /etc/drupal/apache.conf.rpmsave
282 fi
283
284 # place new config location, as trigger puts config only on first install, do it here.
285 if [ -L /etc/apache/conf.d/99_%{name}.conf ]; then
286         rm -f /etc/apache/conf.d/99_%{name}.conf
287         /usr/sbin/webapp register apache %{_webapp}
288         apache_reload=1
289 fi
290 if [ -L /etc/httpd/httpd.conf/99_%{name}.conf ]; then
291         rm -f /etc/httpd/httpd.conf/99_%{name}.conf
292         /usr/sbin/webapp register httpd %{_webapp}
293         httpd_reload=1
294 fi
295
296 if [ "$httpd_reload" ]; then
297         %service httpd reload
298 fi
299 if [ "$apache_reload" ]; then
300         %service apache reload
301 fi
302
303 %files
304 %defattr(644,root,root,755)
305 %doc *.txt README.PLD
306
307 %dir %attr(750,root,http) %{_sysconfdir}
308 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
309 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
310
311 %attr(750,root,http) %dir %{_sysconfdir}/sites
312 %attr(750,root,http) %dir %{_sysconfdir}/sites/default
313 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sites/default/*
314
315 %dir %{_appdir}
316 %{_appdir}/includes
317 %{_appdir}/modules
318 %{_appdir}/scripts
319 %{_appdir}/themes
320 %{_appdir}/po
321 # symlink
322 %{_appdir}/files
323 %{_appdir}/misc
324
325 %dir %{_appdir}/htdocs
326 %{_appdir}/htdocs/*.ico
327 %{_appdir}/htdocs/index.php
328 %{_appdir}/htdocs/misc
329 %{_appdir}/htdocs/themes
330 %{_appdir}/htdocs/modules
331
332 %dir %attr(775,root,http) /var/lib/%{name}
333 %dir %attr(775,root,http) /var/cache/%{name}
334
335 %files cron
336 %defattr(644,root,root,755)
337 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}
338 %{_appdir}/cron.php
339
340 %files db-mysql
341 %defattr(644,root,root,755)
342 %doc database/*.mysql
343 %doc README.replication
344
345 %files db-pgsql
346 %defattr(644,root,root,755)
347 %doc database/*.pgsql
348
349 %files update
350 %defattr(644,root,root,755)
351 %{_appdir}/htdocs/update.php
352 %{_appdir}/database
353
354 %files xmlrpc
355 %defattr(644,root,root,755)
356 %{_appdir}/htdocs/xmlrpc.php
This page took 0.216807 seconds and 3 git commands to generate.