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