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