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