]> git.pld-linux.org Git - packages/drupal.git/blob - drupal.spec
- add misc directory symlink in drupal dir for theme image functions to work
[packages/drupal.git] / drupal.spec
1 # TODO
2 # - http://drupal.org/node/39670
3 Summary:        Open source content management platform
4 Summary(pl):    Platforma do zarz±dzania tre¶ci± o otwartych ¼ród³ach
5 Name:           drupal
6 Version:        4.6.4
7 Release:        0.13
8 License:        GPL
9 Group:          Applications/WWW
10 Source0:        http://drupal.org/files/projects/%{name}-%{version}.tar.gz
11 # Source0-md5:  c61d95c766a7ff624abbe04c2430e5df
12 Source1:        %{name}.conf
13 Source2:        %{name}.cron
14 Source3:        %{name}.PLD
15 Patch0:         %{name}-replication.patch
16 Patch1:         %{name}-sitesdir.patch
17 Patch2:         %{name}-topdir.patch
18 Patch3:         %{name}-themedir2.patch
19 Patch4:         %{name}-emptypass.patch
20 Patch5:         %{name}-cron.patch
21 # http://drupal.org/node/39566
22 Patch6:         http://drupal.org/files/issues/check_url.patch
23 URL:            http://drupal.org/
24 BuildRequires:  rpmbuild(macros) >= 1.264
25 BuildRequires:  sed >= 4.0
26 Requires:       webapps
27 Requires:       webserver = apache
28 Requires:       apache(mod_dir)
29 Requires:       apache(mod_access)
30 Requires:       apache(mod_expires)
31 Requires:       apache(mod_rewrite)
32 Requires:       apache(mod_alias)
33 Requires:       php >= 3:4.3.3
34 Requires:       php-mysql
35 Requires:       php-pcre
36 Requires:       %{name}(DB_Driver) = %{version}-%{release}
37 Requires:       php-xml
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:       crondaemon
98 Requires:       php-cli >= 3:4.3.3
99 Requires:       /usr/bin/php
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
119 Drupala.
120
121 %package db-pgsql
122 Summary:        Drupal DB Driver for PostgreSQL
123 Summary(pl):    Sterownik bazy danych PostgreSQL dla Drupala
124 Group:          Applications/WWW
125 Requires:       php-pgsql
126 Provides:       %{name}(DB_Driver) = %{version}-%{release}
127
128 %description db-pgsql
129 This virtual package provides PostgreSQL database backend for
130 Drupal.
131
132 NOTE: This driver is not tested in PLD, and not all modules have
133 database schema for PostgreSQL. Use this driver at your own risk!
134
135 %description db-pgsql -l pl
136 Ten wirtualny pakiet dostarcza backend bazy danych PostgreSQL dla
137 Drupala.
138
139 UWAGA: Ten sterownik nie by³ testowany w PLD i nie wszystkie modu³y
140 maj± schematy bazy danych dla PostgreSQL-a. Mo¿na go u¿ywaæ na w³asne
141 ryzyko.
142
143 %package xmlrpc
144 Summary:        XMLRPC server for Drupal
145 Summary(pl):    Serwer XMLRPC dla Drupala
146 Group:          Applications/WWW
147 Requires:       %{name} = %{version}-%{release}
148
149 %description xmlrpc
150 XMLRPC server for Drupal allows other Drupals authorize with your
151 Drupal's user creditentials, this is called Distributed Authentication
152 in Drupal world.
153
154 %description xmlrpc -l pl
155 Serwer XMLRPC dla Drupala pozwala innym Drupalom autoryzowaæ siê z
156 danymi uwierzytelniaj±cymi u¿ytkownika danego Drupala - jest to
157 nazywane rozproszonym uwierzytelnianiem.
158
159 %prep
160 %setup -q
161 %patch0 -p1
162 %patch1 -p1
163 %patch2 -p1
164 %patch3 -p1
165 %patch4 -p1
166 %patch5 -p1
167 %patch6 -p0
168
169 find -name '*~' | xargs -r rm -v
170 cp -p %{SOURCE3} README.PLD
171
172 %install
173 rm -rf $RPM_BUILD_ROOT
174 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/cron.d,/var/{cache,lib}/%{name}} \
175         $RPM_BUILD_ROOT%{_appdir}/{po,modules/po,htdocs/modules}
176
177 cp -a *.ico index.php $RPM_BUILD_ROOT%{_appdir}/htdocs
178 cp -a misc $RPM_BUILD_ROOT%{_appdir}/htdocs
179 cp -a xmlrpc.php $RPM_BUILD_ROOT%{_appdir}/htdocs
180
181 cp -a cron.php $RPM_BUILD_ROOT%{_appdir}
182 cp -a modules/* $RPM_BUILD_ROOT%{_appdir}/modules
183 cp -a includes scripts $RPM_BUILD_ROOT%{_appdir}
184 cp -a sites $RPM_BUILD_ROOT%{_sysconfdir}
185
186 ln -s /var/lib/%{name} $RPM_BUILD_ROOT%{_appdir}/files
187 # needed for node.module for syndication icon
188 ln -s htdocs/misc $RPM_BUILD_ROOT%{_appdir}
189
190 # install themes
191 cp -a themes $RPM_BUILD_ROOT%{_appdir}/htdocs
192 # move .xtmpl/.theme out of htdocs
193 (cd $RPM_BUILD_ROOT%{_appdir}/htdocs && tar cf - --remove-files themes/*/*.{xtmpl,theme}) | tar -xf - -C $RPM_BUILD_ROOT%{_appdir}
194 mv $RPM_BUILD_ROOT%{_appdir}/{htdocs/,}themes/engines
195 # make screenshot.png available in appdir
196 for a in $RPM_BUILD_ROOT%{_appdir}/htdocs/themes/*; do
197         t=$(basename $a)
198         ln -s ../../htdocs/themes/$t/screenshot.png $RPM_BUILD_ROOT%{_appdir}/themes/$t
199 done
200
201 # a hack
202 s=themes/chameleon/marvin
203 ln -s ../../htdocs/$s $RPM_BUILD_ROOT%{_appdir}/$s
204
205 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
206 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
207 install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/%{name}
208
209 %clean
210 rm -rf $RPM_BUILD_ROOT
211
212 %post db-mysql
213 if [ "$1" = 1 ]; then
214 %banner -e %{name}-db-mysql <<EOF
215 If this is your first install of Drupal, you need to create Drupal database:
216
217 mysqladmin create drupal
218 zcat %{_docdir}/%{name}-db-mysql-%{version}/database.mysql.gz | mysql drupal
219 mysql -e "GRANT SELECT, INSERT, UPDATE, DELETE ON drupal.* TO 'drupal'@'localhost' IDENTIFIED BY 'PASSWORD'"
220 mysql -e "GRANT CREATE TEMPORARY TABLES, LOCK TABLES ON *.* TO 'drupal'@'localhost'"
221
222 EOF
223 fi
224
225 %post db-pgsql
226 if [ "$1" = 1 ]; then
227 %banner -e %{name}-db-pgsql <<EOF
228 If this is your first install of Drupal, you need to create Drupal database:
229
230 and import initial schema from
231 %{_docdir}/%{name}-db-pgsql-%{version}/database.pgsql.gz
232
233 EOF
234 fi
235
236 %triggerin -- apache1
237 %webapp_register apache %{_webapp}
238
239 %triggerun -- apache1
240 %webapp_unregister apache %{_webapp}
241
242 %triggerin -- apache >= 2.0.0
243 %webapp_register httpd %{_webapp}
244
245 %triggerun -- apache >= 2.0.0
246 %webapp_unregister httpd %{_webapp}
247
248 %triggerpostun -- %{name} < 4.6.4-0.4
249 # rescue app configs.
250 if [ -f /etc/drupal/sites/default/settings.php.rpmsave ]; then
251         mv -f %{_sysconfdir}/sites/default/settings.php{,.rpmnew}
252         mv -f /etc/drupal/sites/default/settings.php.rpmsave %{_sysconfdir}/sites/default/settings.php
253 fi
254 # other configured sites, if any
255 for i in /etc/drupal/sites/*; do
256         d=$(basename $i)
257         [ "$d" = "default" ] && continue
258         mv -f %{_sysconfdir}/sites/$d{,.rpmnew}
259         mv -f $i %{_sysconfdir}/sites/$d
260 done
261
262 # migrate from apache-config macros
263 if [ -f /etc/drupal/apache.conf.rpmsave ]; then
264         if [ -d /etc/apache/webapps.d ]; then
265                 cp -f %{_sysconfdir}/apache.conf{,.rpmnew}
266                 cp -f /etc/drupal/apache.conf.rpmsave %{_sysconfdir}/apache.conf
267         fi
268
269         if [ -d /etc/httpd/webapps.d ]; then
270                 cp -f %{_sysconfdir}/httpd.conf{,.rpmnew}
271                 cp -f /etc/drupal/apache.conf.rpmsave %{_sysconfdir}/httpd.conf
272         fi
273         rm -f /etc/drupal/apache.conf.rpmsave
274 fi
275
276 # place new config location, as trigger puts config only on first install, do it here.
277 if [ -L /etc/apache/conf.d/99_%{name}.conf ]; then
278         rm -f /etc/apache/conf.d/99_%{name}.conf
279         /usr/sbin/webapp register apache %{_webapp}
280         apache_reload=1
281 fi
282 if [ -L /etc/httpd/httpd.conf/99_%{name}.conf ]; then
283         rm -f /etc/httpd/httpd.conf/99_%{name}.conf
284         /usr/sbin/webapp register httpd %{_webapp}
285         httpd_reload=1
286 fi
287
288 if [ "$httpd_reload" ]; then
289         if [ -f /var/lock/subsys/httpd ]; then
290                 /etc/rc.d/init.d/httpd reload 1>&2
291         fi
292 fi
293 if [ "$apache_reload" ]; then
294         if [ -f /var/lock/subsys/apache ]; then
295                 /etc/rc.d/init.d/apache reload 1>&2
296         fi
297 fi
298
299 %files
300 %defattr(644,root,root,755)
301 %doc *.txt README.PLD
302 %doc database/updates.inc
303
304 %dir %attr(750,root,http) %{_sysconfdir}
305 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
306 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
307
308 %attr(750,root,http) %dir %{_sysconfdir}/sites
309 %attr(750,root,http) %dir %{_sysconfdir}/sites/default
310 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sites/default/*
311
312 %dir %{_appdir}
313 %{_appdir}/includes
314 %{_appdir}/modules
315 %{_appdir}/scripts
316 %{_appdir}/themes
317 %{_appdir}/po
318 # symlink
319 %{_appdir}/files
320
321 %dir %{_appdir}/htdocs
322 %{_appdir}/htdocs/*.ico
323 %{_appdir}/htdocs/index.php
324 %{_appdir}/htdocs/misc
325 %{_appdir}/htdocs/themes
326 %{_appdir}/htdocs/modules
327
328 %dir %attr(775,root,http) /var/lib/%{name}
329 %dir %attr(775,root,http) /var/cache/%{name}
330
331 %files cron
332 %defattr(644,root,root,755)
333 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}
334 %{_appdir}/cron.php
335
336 %files db-mysql
337 %defattr(644,root,root,755)
338 %doc database/*.mysql
339 %doc README.replication
340
341 %files db-pgsql
342 %defattr(644,root,root,755)
343 %doc database/*.pgsql
344
345 %files xmlrpc
346 %defattr(644,root,root,755)
347 %{_appdir}/htdocs/xmlrpc.php
This page took 0.083706 seconds and 4 git commands to generate.