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