]> git.pld-linux.org Git - packages/drupal.git/blame - drupal.spec
- this one works, out of the box
[packages/drupal.git] / drupal.spec
CommitLineData
412d0f01
ER
1Summary: Open source content management platform
2Name: drupal
3Version: 4.6.0
3128c8e1 4Release: 0.31
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
6c37b393
ER
11Patch0: %{name}-config.patch
12Patch1: %{name}-includedir.patch
13Patch2: %{name}-module-themedir.patch
14Patch3: %{name}-emptypass.patch
15Patch4: %{name}-themedir.patch
3128c8e1
ER
16Patch5: %{name}-sitesdir.patch
17Patch6: %{name}-topdir.patch
412d0f01 18URL: http://drupal.org/
6c37b393
ER
19BuildRequires: rpmbuild(macros) >= 1.194
20BuildRequires: sed >= 4.0
3128c8e1
ER
21Requires: apache >= 1.3.33-3
22Requires: apache(mod_dir)
23Requires: apache(mod_access)
24Requires: apache(mod_expires)
25Requires: apache(mod_rewrite)
26Requires: apache(mod_alias)
6c37b393
ER
27Requires: php >= 3:4.3.3
28Requires: php-mysql
29#Requires: php-pgsql
30#Requires: php-xml
412d0f01
ER
31BuildArch: noarch
32BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34%define _appdir %{_datadir}/%{name}
35%define _sysconfdir /etc/%{name}
36
37%description
38Drupal is software that allows an individual or a community of users
39to easily publish, manage and organize a great variety of content on a
40website. Tens of thousands of people and organizations have used
41Drupal to set up scores of different kinds of web sites, including
42- community web portals and discussion sites
43- corporate web sites/intranet portals
44- personal web sites
45- afficionado sites
46- e-commerce applications
47- resource directories
48
49Drupal includes features to enable
50- content management systems
51- blogs
52- collaborative authoring environments
53- forums
54- newsletters
55- picture galleries
56- file uploads and download
57
58and much more.
59
60%prep
61%setup -q
3128c8e1
ER
62%patch0 -p1 -b config
63#%patch1 -p1 -b includedir
64#%patch2 -p1 -b module-themedir
65%patch3 -p1 -b emptypass
66%patch4 -p1 -b themedir
67%patch5 -p1 -b sitesdir
68%patch6 -p1 -b topdir
412d0f01 69
3128c8e1
ER
70#grep -rl 'include_once .includes/' . | xargs sed -i -e '
71# s,include_once \(.\)includes/,include_once \1%{_appdir}/includes/,g
72#'
73
74find -name '*~' | xargs -r rm -v
412d0f01
ER
75
76%install
77rm -rf $RPM_BUILD_ROOT
78install -d $RPM_BUILD_ROOT{%{_appdir}/htdocs,%{_sysconfdir}}
79
80cp -a *.ico index.php $RPM_BUILD_ROOT%{_appdir}/htdocs
6c37b393 81cp -a misc $RPM_BUILD_ROOT%{_appdir}/htdocs
412d0f01
ER
82
83cp -a cron.php $RPM_BUILD_ROOT%{_appdir}
f4ab86cb 84cp -a includes modules scripts $RPM_BUILD_ROOT%{_appdir}
6c37b393 85cp -a sites $RPM_BUILD_ROOT%{_sysconfdir}
412d0f01 86
f4ab86cb
ER
87cp -a themes $RPM_BUILD_ROOT%{_appdir}/htdocs
88# move .xtmpl out of htdocs
89(cd $RPM_BUILD_ROOT%{_appdir}/htdocs && tar cf - --remove-files themes/*/*.xtmpl) | tar -xf - -C $RPM_BUILD_ROOT%{_appdir}
90mv $RPM_BUILD_ROOT%{_appdir}/{htdocs/,}themes/engines
91
54439521
ER
92install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache-%{name}.conf
93
6c37b393 94%post
3128c8e1 95if [ "$1" = 1 ]; then
6c37b393
ER
96%banner -e %{name} <<EOF
97If this is your first install of Drupal, you need to create drupal database:
98shell$ mysqladmin create drupal
99
100and import initial schema:
101shell$ zcat %{_docdir}/%{name}-%{version}/database/database.mysql.gz | mysql drupal
102
103(anyway, read INSTALL file from documentation).
104
105EOF
3128c8e1 106fi
6c37b393 107
412d0f01
ER
108%clean
109rm -rf $RPM_BUILD_ROOT
110
54439521
ER
111%triggerin -- apache1 >= 1.3.33-2
112%apache_config_install -v 1 -c %{_sysconfdir}/apache-%{name}.conf
113
114%triggerun -- apache1 >= 1.3.33-2
115%apache_config_uninstall -v 1
116
117%triggerin -- apache >= 2.0.0
118%apache_config_install -v 2 -c %{_sysconfdir}/apache-%{name}.conf
119
120%triggerun -- apache >= 2.0.0
121%apache_config_uninstall -v 2
122
412d0f01
ER
123%files
124%defattr(644,root,root,755)
125%doc *.txt database
54439521
ER
126
127%attr(750,root,http) %dir %{_sysconfdir}
5f407171 128%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache-%{name}.conf
54439521 129
6c37b393
ER
130%attr(750,root,http) %dir %{_sysconfdir}/sites
131%attr(750,root,http) %dir %{_sysconfdir}/sites/default
5f407171 132%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sites/default/*
6c37b393 133
412d0f01
ER
134%dir %{_appdir}
135%{_appdir}/*.php
136%{_appdir}/htdocs
137%{_appdir}/includes
138%{_appdir}/modules
139%{_appdir}/scripts
6c37b393 140%{_appdir}/themes
This page took 0.071682 seconds and 4 git commands to generate.