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