]> git.pld-linux.org Git - packages/drupal.git/blob - drupal.spec
- refresh tarball. fixes form_textarea
[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.4
5 Release:        0.8
6 License:        GPL
7 Group:          Applications/WWW
8 Source0:        http://drupal.org/files/projects/%{name}-%{version}.tar.gz
9 # Source0-md5:  c61d95c766a7ff624abbe04c2430e5df
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
183 # install themes
184 cp -a themes $RPM_BUILD_ROOT%{_appdir}/htdocs
185 # move .xtmpl/.theme out of htdocs
186 (cd $RPM_BUILD_ROOT%{_appdir}/htdocs && tar cf - --remove-files themes/*/*.{xtmpl,theme}) | tar -xf - -C $RPM_BUILD_ROOT%{_appdir}
187 mv $RPM_BUILD_ROOT%{_appdir}/{htdocs/,}themes/engines
188 # make screenshot.png available in appdir
189 for a in $RPM_BUILD_ROOT%{_appdir}/htdocs/themes/*; do
190         t=$(basename $a)
191         ln -s ../../htdocs/themes/$t/screenshot.png $RPM_BUILD_ROOT%{_appdir}/themes/$t
192 done
193
194 # a hack
195 s=themes/chameleon/marvin
196 ln -s ../../htdocs/$s $RPM_BUILD_ROOT%{_appdir}/$s
197
198 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
199 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
200 install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/%{name}
201
202 %clean
203 rm -rf $RPM_BUILD_ROOT
204
205 %post db-mysql
206 if [ "$1" = 1 ]; then
207 %banner -e %{name}-db-mysql <<EOF
208 If this is your first install of Drupal, you need to create Drupal database:
209
210 mysqladmin create drupal
211 zcat %{_docdir}/%{name}-db-mysql-%{version}/database.mysql.gz | mysql drupal
212 mysql -e "GRANT SELECT, INSERT, UPDATE, DELETE ON drupal.* TO 'drupal'@'localhost' IDENTIFIED BY 'PASSWORD'"
213 mysql -e "GRANT CREATE TEMPORARY TABLES, LOCK TABLES ON *.* TO 'drupal'@'localhost'"
214
215 EOF
216 fi
217
218 %post db-pgsql
219 if [ "$1" = 1 ]; then
220 %banner -e %{name}-db-pgsql <<EOF
221 If this is your first install of Drupal, you need to create Drupal database:
222
223 and import initial schema from
224 %{_docdir}/%{name}-db-pgsql-%{version}/database.pgsql.gz
225
226 EOF
227 fi
228
229 %triggerin -- apache1
230 %webapp_register apache %{_webapp}
231
232 %triggerun -- apache1
233 %webapp_unregister apache %{_webapp}
234
235 %triggerin -- apache >= 2.0.0
236 %webapp_register httpd %{_webapp}
237
238 %triggerun -- apache >= 2.0.0
239 %webapp_unregister httpd %{_webapp}
240
241 %triggerpostun -- %{name} < 4.6.4-0.4
242 # rescue app configs.
243 if [ -f /etc/drupal/sites/default/settings.php.rpmsave ]; then
244         mv -f %{_sysconfdir}/sites/default/settings.php{,.rpmnew}
245         mv -f /etc/drupal/sites/default/settings.php.rpmsave %{_sysconfdir}/sites/default/settings.php
246 fi
247 # other configured sites, if any
248 for i in /etc/drupal/sites/*; do
249         d=$(basename $i)
250         [ "$d" = "default" ] && continue
251         mv -f %{_sysconfdir}/sites/$d{,.rpmnew}
252         mv -f $i %{_sysconfdir}/sites/$d
253 done
254
255 # migrate from apache-config macros
256 if [ -f /etc/drupal/apache.conf.rpmsave ]; then
257         if [ -d /etc/apache/webapps.d ]; then
258                 cp -f %{_sysconfdir}/apache.conf{,.rpmnew}
259                 cp -f /etc/drupal/apache.conf.rpmsave %{_sysconfdir}/apache.conf
260         fi
261
262         if [ -d /etc/httpd/webapps.d ]; then
263                 cp -f %{_sysconfdir}/httpd.conf{,.rpmnew}
264                 cp -f /etc/drupal/apache.conf.rpmsave %{_sysconfdir}/httpd.conf
265         fi
266         rm -f /etc/drupal/apache.conf.rpmsave
267 fi
268
269 # place new config location, as trigger puts config only on first install, do it here.
270 if [ -L /etc/apache/conf.d/99_%{name}.conf ]; then
271         rm -f /etc/apache/conf.d/99_%{name}.conf
272         /usr/sbin/webapp register apache %{_webapp}
273         apache_reload=1
274 fi
275 if [ -L /etc/httpd/httpd.conf/99_%{name}.conf ]; then
276         rm -f /etc/httpd/httpd.conf/99_%{name}.conf
277         /usr/sbin/webapp register httpd %{_webapp}
278         httpd_reload=1
279 fi
280
281 if [ "$httpd_reload" ]; then
282         if [ -f /var/lock/subsys/httpd ]; then
283                 /etc/rc.d/init.d/httpd reload 1>&2
284         fi
285 fi
286 if [ "$apache_reload" ]; then
287         if [ -f /var/lock/subsys/apache ]; then
288                 /etc/rc.d/init.d/apache reload 1>&2
289         fi
290 fi
291
292 %files
293 %defattr(644,root,root,755)
294 %doc *.txt README.PLD
295 %doc database/updates.inc
296
297 %dir %attr(750,root,http) %{_sysconfdir}
298 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
299 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
300
301 %attr(750,root,http) %dir %{_sysconfdir}/sites
302 %attr(750,root,http) %dir %{_sysconfdir}/sites/default
303 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sites/default/*
304
305 %dir %{_appdir}
306 %{_appdir}/includes
307 %{_appdir}/modules
308 %{_appdir}/scripts
309 %{_appdir}/themes
310 %{_appdir}/po
311 # symlink
312 %{_appdir}/files
313
314 %dir %{_appdir}/htdocs
315 %{_appdir}/htdocs/*.ico
316 %{_appdir}/htdocs/index.php
317 %{_appdir}/htdocs/misc
318 %{_appdir}/htdocs/themes
319 %{_appdir}/htdocs/modules
320
321 %dir %attr(775,root,http) /var/lib/%{name}
322 %dir %attr(775,root,http) /var/cache/%{name}
323
324 %files cron
325 %defattr(644,root,root,755)
326 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}
327 %{_appdir}/cron.php
328
329 %files db-mysql
330 %defattr(644,root,root,755)
331 %doc database/*.mysql
332 %doc README.replication
333
334 %files db-pgsql
335 %defattr(644,root,root,755)
336 %doc database/*.pgsql
337
338 %files xmlrpc
339 %defattr(644,root,root,755)
340 %{_appdir}/htdocs/xmlrpc.php
This page took 0.088819 seconds and 4 git commands to generate.