]> git.pld-linux.org Git - packages/drupal.git/blob - drupal.spec
- merge drupal-apache1.conf back to main apache config, i don't see what is that...
[packages/drupal.git] / drupal.spec
1 # TODO
2 # - why not drupal 6.0?
3 Summary:        Open source content management platform
4 Summary(pl.UTF-8):      Platforma do zarządzania treścią o otwartych źródłach
5 Name:           drupal
6 Version:        5.7
7 Release:        0.4
8 License:        GPL
9 Group:          Applications/WWW
10 Source0:        http://ftp.osuosl.org/pub/drupal/files/projects/%{name}-%{version}.tar.gz
11 # Source0-md5:  c7d9911ad1001c790bbdfe6fd4cdfc89
12 Source1:        %{name}.conf
13 Source2:        %{name}.cron
14 Source3:        %{name}.PLD
15 Patch0:         %{name}-cron.patch
16 Patch1:         %{name}-sitesdir.patch
17 Patch2:         %{name}-topdir.patch
18 Patch3:         %{name}-themedir2.patch
19 #Patchx:        %{name}-replication.patch
20 #Patchx:        %{name}-emptypass.patch
21 URL:            http://drupal.org/
22 BuildRequires:  rpmbuild(macros) >= 1.264
23 BuildRequires:  sed >= 4.0
24 Requires:       %{name}(DB_Driver) = %{version}-%{release}
25 Requires:       apache(mod_access)
26 Requires:       apache(mod_alias)
27 Requires:       apache(mod_dir)
28 Requires:       apache(mod_expires)
29 Requires:       apache(mod_rewrite)
30 Requires:       php(mbstring)
31 Requires:       php(pcre)
32 Requires:       php(xml)
33 Requires:       webapps
34 Requires:       webserver = apache
35 Requires:       webserver(php) >= 4.3.3
36 BuildArch:      noarch
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39 %define         _appdir         %{_datadir}/%{name}
40 %define         _webapps        /etc/webapps
41 %define         _webapp         %{name}
42 %define         _sysconfdir     %{_webapps}/%{_webapp}
43
44 %description
45 Drupal is software that allows an individual or a community of users
46 to easily publish, manage and organize a great variety of content on a
47 website. Tens of thousands of people and organizations have used
48 Drupal to set up scores of different kinds of web sites, including
49 - community web portals and discussion sites
50 - corporate web sites/intranet portals
51 - personal web sites
52 - afficionado sites
53 - e-commerce applications
54 - resource directories
55
56 Drupal includes features to enable
57 - content management systems
58 - blogs
59 - collaborative authoring environments
60 - forums
61 - newsletters
62 - picture galleries
63 - file uploads and download
64
65 and much more.
66
67 %description -l pl.UTF-8
68 Drupal to oprogramowanie pozwalające osobie lub społeczności
69 użytkowników na łatwe publikowanie, zarządzanie i organizowanie różnej
70 treści na stronie WWW. Dziesiątki tysięcy ludzi i organizacji używali
71 Drupala do ustawiania wyników różnych rodzajów stron WWW, w tym:
72 - portale WWW i strony dyskusyjne społeczności
73 - korporacyjne strony WWW/portale intranetowe
74 - osobiste strony WWW
75 - strony miłośników
76 - aplikacje e-commerce
77 - słowniki zasobów
78
79 Drupal zawiera zasoby umożliwiające tworzenie:
80 - systemów zarządzania treścią
81 - blogów
82 - środowisk pracy grupowej
83 - forów
84 - nowin
85 - galerii zdjęć
86 - wrzucania i ściągania plików
87
88 i wiele więcej.
89
90 %package cron
91 Summary:        Drupal cron
92 Summary(pl.UTF-8):      Usługa cron dla Drupala
93 Group:          Applications/WWW
94 Requires:       %{name} = %{version}-%{release}
95 Requires:       crondaemon
96 Requires:       php-cli >= 3:4.3.3
97
98 %description cron
99 This package contains script which invokes cron hooks for Drupal.
100
101 %description cron -l pl.UTF-8
102 Ten pakiet zawiera skrypt wywołujący uchwyty crona dla Drupala.
103
104 %package db-mysql
105 Summary:        Drupal DB Driver for MySQL
106 Summary(pl.UTF-8):      Sterownik bazy danych MySQL dla Drupala
107 Group:          Applications/WWW
108 Requires:       php(mysql)
109 Provides:       %{name}(DB_Driver) = %{version}-%{release}
110
111 %description db-mysql
112 This virtual package provides MySQL database backend for Drupal.
113
114 %description db-mysql -l pl.UTF-8
115 Ten wirtualny pakiet dostarcza backend bazy danych MySQL dla Drupala.
116
117 %package db-pgsql
118 Summary:        Drupal DB Driver for PostgreSQL
119 Summary(pl.UTF-8):      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 Drupal.
126
127 NOTE: This driver is not tested in PLD, and not all modules have
128 database schema for PostgreSQL. Use this driver at your own risk!
129
130 %description db-pgsql -l pl.UTF-8
131 Ten wirtualny pakiet dostarcza backend bazy danych PostgreSQL dla
132 Drupala.
133
134 UWAGA: Ten sterownik nie był testowany w PLD i nie wszystkie moduły
135 mają schematy bazy danych dla PostgreSQL-a. Można go używać na własne
136 ryzyko.
137
138 %package update
139 Summary:        Package to perform Drupal database updates
140 Group:          Applications/WWW
141 Requires:       %{name} = %{version}-%{release}
142
143 %description update
144 This package contains scripts needed to do database updates via web.
145
146 %package xmlrpc
147 Summary:        XMLRPC server for Drupal
148 Summary(pl.UTF-8):      Serwer XMLRPC dla Drupala
149 Group:          Applications/WWW
150 Requires:       %{name} = %{version}-%{release}
151
152 %description xmlrpc
153 XMLRPC server for Drupal allows other Drupals authorize with your
154 Drupal's user creditentials, this is called Distributed Authentication
155 in Drupal world.
156
157 %description xmlrpc -l pl.UTF-8
158 Serwer XMLRPC dla Drupala pozwala innym Drupalom autoryzować się z
159 danymi uwierzytelniającymi użytkownika danego Drupala - jest to
160 nazywane rozproszonym uwierzytelnianiem.
161
162 %prep
163 %setup -q %{?_rc:-n %{name}-%{version}-%{_rc}}
164 %patch0 -p1
165 %patch1 -p1
166 %patch2 -p1
167 %patch3 -p1
168
169 # cleanup backups after patching
170 find . '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
171 cp -p %{SOURCE3} README.PLD
172
173 %install
174 rm -rf $RPM_BUILD_ROOT
175 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/cron.d,/var/{cache,lib}/%{name}} \
176         $RPM_BUILD_ROOT%{_appdir}/{po,database,modules/po,htdocs/modules,themes}
177
178 cp -a index.php $RPM_BUILD_ROOT%{_appdir}/htdocs
179 cp -a misc $RPM_BUILD_ROOT%{_appdir}/htdocs
180 cp -a install.php update.php xmlrpc.php $RPM_BUILD_ROOT%{_appdir}/htdocs
181
182 cp -a cron.php $RPM_BUILD_ROOT%{_appdir}
183 cp -a includes scripts $RPM_BUILD_ROOT%{_appdir}
184 cp -a sites $RPM_BUILD_ROOT%{_sysconfdir}
185 cp -a modules/* $RPM_BUILD_ROOT%{_appdir}/modules
186 cp -a themes/* $RPM_BUILD_ROOT%{_appdir}/themes
187 cp -Rl $RPM_BUILD_ROOT%{_appdir}/modules $RPM_BUILD_ROOT%{_appdir}/htdocs
188 cp -Rl $RPM_BUILD_ROOT%{_appdir}/themes $RPM_BUILD_ROOT%{_appdir}/htdocs
189
190 find $RPM_BUILD_ROOT%{_appdir}/htdocs/themes/ $RPM_BUILD_ROOT%{_appdir}/htdocs/modules/ \
191   -type f -regextype posix-awk \
192   -regex '.*\.(engine|inc|info|install|module|profile|po|sh|.*sql|theme|php|xtmpl)$|.*/(code-style\.pl|Entries.*|Repository|Root|Tag|Template)$' \
193   -print0 | xargs -0 -r -l512 rm -f
194 find $RPM_BUILD_ROOT%{_appdir}/themes/ $RPM_BUILD_ROOT%{_appdir}/modules/ \
195   -type f -regextype posix-awk \
196   ! -regex '.*\.(engine|inc|info|install|module|profile|po|sh|.*sql|theme|php|xtmpl)$|.*/(code-style\.pl|Entries.*|Repository|Root|Tag|Template)$' \
197   -print0 | xargs -0 -r -l512 rm -f
198
199 # avoid pulling perl dep
200 chmod -x $RPM_BUILD_ROOT%{_appdir}/scripts/*
201
202 ln -s /var/lib/%{name} $RPM_BUILD_ROOT%{_appdir}/files
203
204 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
205 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
206 install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/%{name}
207
208 %clean
209 rm -rf $RPM_BUILD_ROOT
210
211 %post
212 if [ "$1" = 1 ]; then
213 %banner -e %{name} <<'EOF'
214 If this is your first install of Drupal, You need at least configure
215 $db_url and $base_url in %{_sysconfdir}/sites/default/settings.php
216
217 EOF
218 fi
219
220 %post db-mysql
221 if [ "$1" = 1 ]; then
222 %banner -e %{name}-db-mysql <<'EOF'
223 If this is your first install of Drupal, you need to create Drupal database:
224
225 mysqladmin create drupal
226 zcat %{_docdir}/%{name}-db-mysql-%{version}/database.mysql.gz | mysql drupal
227 mysql -e "GRANT SELECT, INSERT, UPDATE, DELETE ON drupal.* TO 'drupal'@'localhost' IDENTIFIED BY 'password'"
228 mysql -e "GRANT CREATE TEMPORARY TABLES, LOCK TABLES ON *.* TO 'drupal'@'localhost'"
229
230 EOF
231 fi
232
233 %post db-pgsql
234 if [ "$1" = 1 ]; then
235 %banner -e %{name}-db-pgsql <<'EOF'
236 If this is your first install of Drupal, you need to create Drupal database:
237
238 and import initial schema from
239 %{_docdir}/%{name}-db-pgsql-%{version}/database.pgsql.gz
240
241 EOF
242 fi
243
244 %triggerin -- apache1 < 1.3.37-3, apache1-base
245 %webapp_register apache %{_webapp}
246
247 %triggerun -- apache1 < 1.3.37-3, apache1-base
248 %webapp_unregister apache %{_webapp}
249
250 %triggerin -- apache < 2.2.0, apache-base
251 %webapp_register httpd %{_webapp}
252
253 %triggerun -- apache < 2.2.0, apache-base
254 %webapp_unregister httpd %{_webapp}
255
256 %files
257 %defattr(644,root,root,755)
258 %doc *.txt README.PLD
259
260 %dir %attr(750,root,http) %{_sysconfdir}
261 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
262 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
263
264 %attr(750,root,http) %dir %{_sysconfdir}/sites
265 %attr(750,root,http) %dir %{_sysconfdir}/sites/default
266 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sites/default/*
267 %attr(750,root,http) %dir %{_sysconfdir}/sites/all
268 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sites/all/*
269
270 %dir %{_appdir}
271 %{_appdir}/includes
272 %{_appdir}/modules
273 %{_appdir}/scripts
274 %{_appdir}/themes
275 %{_appdir}/po
276 # symlink
277 %{_appdir}/files
278
279 %dir %{_appdir}/htdocs
280 %{_appdir}/htdocs/index.php
281 %{_appdir}/htdocs/install.php
282 %{_appdir}/htdocs/misc
283 %{_appdir}/htdocs/themes
284 %{_appdir}/htdocs/modules
285
286 %dir %attr(775,root,http) /var/lib/%{name}
287 %dir %attr(775,root,http) /var/cache/%{name}
288
289 %files cron
290 %defattr(644,root,root,755)
291 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}
292 %attr(775,root,root) %{_appdir}/cron.php
293
294 %files db-mysql
295 %defattr(644,root,root,755)
296 #%doc README.replication
297
298 %files db-pgsql
299 %defattr(644,root,root,755)
300
301 %files update
302 %defattr(644,root,root,755)
303 %{_appdir}/htdocs/update.php
304 %{_appdir}/database
305
306 %files xmlrpc
307 %defattr(644,root,root,755)
308 %{_appdir}/htdocs/xmlrpc.php
This page took 0.072772 seconds and 3 git commands to generate.