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