]> git.pld-linux.org Git - packages/drupal.git/blob - drupal.spec
- create -update subpackage which can be used to perform database updates
[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.10
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 URL:            http://drupal.org/
22 BuildRequires:  rpmbuild(macros) >= 1.264
23 BuildRequires:  sed >= 4.0
24 Requires:       webapps
25 Requires:       webserver = apache
26 Requires:       apache(mod_dir)
27 Requires:       apache(mod_access)
28 Requires:       apache(mod_expires)
29 Requires:       apache(mod_rewrite)
30 Requires:       apache(mod_alias)
31 Requires:       php >= 3:4.3.3
32 Requires:       php-mysql
33 Requires:       php-pcre
34 Requires:       %{name}(DB_Driver) = %{version}-%{release}
35 Requires:       php-xml
36 BuildArch:      noarch
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39 %define         _appdir         %{_datadir}/%{name}
40 %define         _webapps        /etc/webapps
41 %define         _webapp         %{name}
42 %define         _sysconfdir     %{_webapps}/%{_webapp}
43
44 %description
45 Drupal is software that allows an individual or a community of users
46 to easily publish, manage and organize a great variety of content on a
47 website. Tens of thousands of people and organizations have used
48 Drupal to set up scores of different kinds of web sites, including
49 - community web portals and discussion sites
50 - corporate web sites/intranet portals
51 - personal web sites
52 - afficionado sites
53 - e-commerce applications
54 - resource directories
55
56 Drupal includes features to enable
57 - content management systems
58 - blogs
59 - collaborative authoring environments
60 - forums
61 - newsletters
62 - picture galleries
63 - file uploads and download
64
65 and much more.
66
67 %description -l pl
68 Drupal to oprogramowanie pozwalaj±ce osobie lub spo³eczno¶ci
69 u¿ytkowników na ³atwe publikowanie, zarz±dzanie i organizowanie ró¿nej
70 tre¶ci na stronie WWW. Dziesi±tki tysiêcy ludzi i organizacji u¿ywali
71 Drupala do ustawiania wyników ró¿nych rodzajów stron WWW, w tym:
72 - portale WWW i strony dyskusyjne spo³eczno¶ci
73 - korporacyjne strony WWW/portale intranetowe
74 - osobiste strony WWW
75 - strony mi³o¶ników
76 - aplikacje e-commerce
77 - s³owniki zasobów
78
79 Drupal zawiera zasoby umo¿liwiaj±ce tworzenie:
80 - systemów zarz±dzania tre¶ci±
81 - blogów
82 - ¶rodowisk pracy grupowej
83 - forów
84 - nowin
85 - galerii zdjêæ
86 - wrzucania i ¶ci±gania plików
87
88 i wiele wiêcej.
89
90 %package cron
91 Summary:        Drupal cron
92 Summary(pl):    Us³uga cron dla Drupala
93 Group:          Applications/WWW
94 Requires:       %{name} = %{version}-%{release}
95 Requires:       crondaemon
96 Requires:       php-cli >= 3:4.3.3
97 Requires:       /usr/bin/php
98
99 %description cron
100 This package contains script which invokes cron hooks for Drupal.
101
102 %description cron -l pl
103 Ten pakiet zawiera skrypt wywo³uj±cy uchwyty crona dla Drupala.
104
105 %package db-mysql
106 Summary:        Drupal DB Driver for MySQL
107 Summary(pl):    Sterownik bazy danych MySQL dla Drupala
108 Group:          Applications/WWW
109 Requires:       php-mysql
110 Provides:       %{name}(DB_Driver) = %{version}-%{release}
111
112 %description db-mysql
113 This virtual package provides MySQL database backend for Drupal.
114
115 %description db-mysql -l pl
116 Ten wirtualny pakiet dostarcza backend bazy danych MySQL dla
117 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
128 Drupal.
129
130 NOTE: This driver is not tested in PLD, and not all modules have
131 database schema for PostgreSQL. Use this driver at your own risk!
132
133 %description db-pgsql -l pl
134 Ten wirtualny pakiet dostarcza backend bazy danych PostgreSQL dla
135 Drupala.
136
137 UWAGA: Ten sterownik nie by³ testowany w PLD i nie wszystkie modu³y
138 maj± schematy bazy danych dla PostgreSQL-a. Mo¿na go u¿ywaæ na w³asne
139 ryzyko.
140
141 %package update
142 Summary:        Package to perform Drupal database updates
143 Group:          Applications/WWW
144 Requires:       %{name} = %{version}-%{release}
145
146 %description update
147 This package contains scripts needed to do database updates via web.
148
149 %package xmlrpc
150 Summary:        XMLRPC server for Drupal
151 Summary(pl):    Serwer XMLRPC dla Drupala
152 Group:          Applications/WWW
153 Requires:       %{name} = %{version}-%{release}
154
155 %description xmlrpc
156 XMLRPC server for Drupal allows other Drupals authorize with your
157 Drupal's user creditentials, this is called Distributed Authentication
158 in Drupal world.
159
160 %description xmlrpc -l pl
161 Serwer XMLRPC dla Drupala pozwala innym Drupalom autoryzowaæ siê z
162 danymi uwierzytelniaj±cymi u¿ytkownika danego Drupala - jest to
163 nazywane rozproszonym uwierzytelnianiem.
164
165 %prep
166 %setup -q
167 %patch0 -p1
168 %patch1 -p1
169 %patch2 -p1
170 %patch3 -p1
171 %patch4 -p1
172 %patch5 -p1
173 %patch6 -p0
174 %patch7 -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         if [ -f /var/lock/subsys/httpd ]; then
298                 /etc/rc.d/init.d/httpd reload 1>&2
299         fi
300 fi
301 if [ "$apache_reload" ]; then
302         if [ -f /var/lock/subsys/apache ]; then
303                 /etc/rc.d/init.d/apache reload 1>&2
304         fi
305 fi
306
307 %files
308 %defattr(644,root,root,755)
309 %doc *.txt README.PLD
310
311 %dir %attr(750,root,http) %{_sysconfdir}
312 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
313 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
314
315 %attr(750,root,http) %dir %{_sysconfdir}/sites
316 %attr(750,root,http) %dir %{_sysconfdir}/sites/default
317 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sites/default/*
318
319 %dir %{_appdir}
320 %{_appdir}/includes
321 %{_appdir}/modules
322 %{_appdir}/scripts
323 %{_appdir}/themes
324 %{_appdir}/po
325 # symlink
326 %{_appdir}/files
327 %{_appdir}/misc
328
329 %dir %{_appdir}/htdocs
330 %{_appdir}/htdocs/*.ico
331 %{_appdir}/htdocs/index.php
332 %{_appdir}/htdocs/misc
333 %{_appdir}/htdocs/themes
334 %{_appdir}/htdocs/modules
335
336 %dir %attr(775,root,http) /var/lib/%{name}
337 %dir %attr(775,root,http) /var/cache/%{name}
338
339 %files cron
340 %defattr(644,root,root,755)
341 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}
342 %{_appdir}/cron.php
343
344 %files db-mysql
345 %defattr(644,root,root,755)
346 %doc database/*.mysql
347 %doc README.replication
348
349 %files db-pgsql
350 %defattr(644,root,root,755)
351 %doc database/*.pgsql
352
353 %files update
354 %defattr(644,root,root,755)
355 %{_appdir}/htdocs/update.php
356 %{_appdir}/database
357
358 %files xmlrpc
359 %defattr(644,root,root,755)
360 %{_appdir}/htdocs/xmlrpc.php
This page took 0.095214 seconds and 4 git commands to generate.