]> git.pld-linux.org Git - packages/drupal.git/blame - drupal.spec
- add php dependencies
[packages/drupal.git] / drupal.spec
CommitLineData
412d0f01
ER
1Summary: Open source content management platform
2Name: drupal
3Version: 4.6.0
b5d0dcdb 4Release: 0.33
412d0f01
ER
5Epoch: 0
6License: GPL
7Group: Applications/WWW
8Source0: http://drupal.org/files/projects/%{name}-%{version}.tar.gz
9# Source0-md5: cba80c4f511284b09d6a0a2def5cb250
54439521 10Source1: %{name}.conf
70724985 11Source2: %{name}.cron
6c37b393
ER
12Patch0: %{name}-config.patch
13Patch1: %{name}-includedir.patch
14Patch2: %{name}-module-themedir.patch
15Patch3: %{name}-emptypass.patch
16Patch4: %{name}-themedir.patch
3128c8e1
ER
17Patch5: %{name}-sitesdir.patch
18Patch6: %{name}-topdir.patch
412d0f01 19URL: http://drupal.org/
6c37b393
ER
20BuildRequires: rpmbuild(macros) >= 1.194
21BuildRequires: sed >= 4.0
3128c8e1
ER
22Requires: apache >= 1.3.33-3
23Requires: apache(mod_dir)
24Requires: apache(mod_access)
25Requires: apache(mod_expires)
26Requires: apache(mod_rewrite)
27Requires: apache(mod_alias)
6c37b393
ER
28Requires: php >= 3:4.3.3
29Requires: php-mysql
30#Requires: php-pgsql
b5d0dcdb
ER
31Requires: php-xml
32Requires: php-pcre
412d0f01
ER
33BuildArch: noarch
34BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36%define _appdir %{_datadir}/%{name}
37%define _sysconfdir /etc/%{name}
38
39%description
40Drupal is software that allows an individual or a community of users
41to easily publish, manage and organize a great variety of content on a
42website. Tens of thousands of people and organizations have used
43Drupal 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
51Drupal 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
60and much more.
61
70724985
ER
62%package cron
63Summary: drupal cron
64Group: Applications/WWW
65Requires: %{name} = %{version}-%{release}
66Requires: crondaemon
67Requires: php-cli >= 3:4.3.3
68
69%description cron
70This package contains script which invokes cron hooks for drupal.
71
412d0f01
ER
72%prep
73%setup -q
3128c8e1
ER
74%patch0 -p1 -b config
75#%patch1 -p1 -b includedir
76#%patch2 -p1 -b module-themedir
77%patch3 -p1 -b emptypass
78%patch4 -p1 -b themedir
79%patch5 -p1 -b sitesdir
80%patch6 -p1 -b topdir
412d0f01 81
3128c8e1
ER
82#grep -rl 'include_once .includes/' . | xargs sed -i -e '
83# s,include_once \(.\)includes/,include_once \1%{_appdir}/includes/,g
84#'
85
86find -name '*~' | xargs -r rm -v
412d0f01
ER
87
88%install
89rm -rf $RPM_BUILD_ROOT
70724985 90install -d $RPM_BUILD_ROOT{%{_appdir}/htdocs,%{_sysconfdir},/etc/cron.d}
412d0f01
ER
91
92cp -a *.ico index.php $RPM_BUILD_ROOT%{_appdir}/htdocs
6c37b393 93cp -a misc $RPM_BUILD_ROOT%{_appdir}/htdocs
412d0f01
ER
94
95cp -a cron.php $RPM_BUILD_ROOT%{_appdir}
f4ab86cb 96cp -a includes modules scripts $RPM_BUILD_ROOT%{_appdir}
6c37b393 97cp -a sites $RPM_BUILD_ROOT%{_sysconfdir}
412d0f01 98
f4ab86cb
ER
99cp -a themes $RPM_BUILD_ROOT%{_appdir}/htdocs
100# move .xtmpl out of htdocs
101(cd $RPM_BUILD_ROOT%{_appdir}/htdocs && tar cf - --remove-files themes/*/*.xtmpl) | tar -xf - -C $RPM_BUILD_ROOT%{_appdir}
102mv $RPM_BUILD_ROOT%{_appdir}/{htdocs/,}themes/engines
103
54439521 104install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache-%{name}.conf
70724985 105install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/%{name}
54439521 106
6c37b393 107%post
3128c8e1 108if [ "$1" = 1 ]; then
6c37b393
ER
109%banner -e %{name} <<EOF
110If this is your first install of Drupal, you need to create drupal database:
111shell$ mysqladmin create drupal
112
113and import initial schema:
114shell$ zcat %{_docdir}/%{name}-%{version}/database/database.mysql.gz | mysql drupal
115
116(anyway, read INSTALL file from documentation).
117
118EOF
3128c8e1 119fi
6c37b393 120
412d0f01
ER
121%clean
122rm -rf $RPM_BUILD_ROOT
123
54439521
ER
124%triggerin -- apache1 >= 1.3.33-2
125%apache_config_install -v 1 -c %{_sysconfdir}/apache-%{name}.conf
126
127%triggerun -- apache1 >= 1.3.33-2
128%apache_config_uninstall -v 1
129
130%triggerin -- apache >= 2.0.0
131%apache_config_install -v 2 -c %{_sysconfdir}/apache-%{name}.conf
132
133%triggerun -- apache >= 2.0.0
134%apache_config_uninstall -v 2
135
412d0f01
ER
136%files
137%defattr(644,root,root,755)
138%doc *.txt database
54439521
ER
139
140%attr(750,root,http) %dir %{_sysconfdir}
5f407171 141%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache-%{name}.conf
54439521 142
6c37b393
ER
143%attr(750,root,http) %dir %{_sysconfdir}/sites
144%attr(750,root,http) %dir %{_sysconfdir}/sites/default
5f407171 145%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sites/default/*
6c37b393 146
412d0f01 147%dir %{_appdir}
412d0f01
ER
148%{_appdir}/htdocs
149%{_appdir}/includes
150%{_appdir}/modules
151%{_appdir}/scripts
6c37b393 152%{_appdir}/themes
70724985
ER
153
154%files cron
155%defattr(644,root,root,755)
156%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}
157%{_appdir}/cron.php
This page took 0.047833 seconds and 4 git commands to generate.