1 Summary: Open source content management platform
7 Group: Applications/WWW
8 Source0: http://drupal.org/files/projects/%{name}-%{version}.tar.gz
9 # Source0-md5: cba80c4f511284b09d6a0a2def5cb250
11 Patch0: %{name}-config.patch
12 Patch1: %{name}-includedir.patch
13 Patch2: %{name}-module-themedir.patch
14 Patch3: %{name}-emptypass.patch
15 Patch4: %{name}-themedir.patch
16 URL: http://drupal.org/
17 BuildRequires: rpmbuild(macros) >= 1.194
18 BuildRequires: sed >= 4.0
19 Requires: php >= 3:4.3.3
23 #Requires: apache(mod_rewrite)
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27 %define _appdir %{_datadir}/%{name}
28 %define _sysconfdir /etc/%{name}
31 Drupal is software that allows an individual or a community of users
32 to easily publish, manage and organize a great variety of content on a
33 website. Tens of thousands of people and organizations have used
34 Drupal to set up scores of different kinds of web sites, including
35 - community web portals and discussion sites
36 - corporate web sites/intranet portals
39 - e-commerce applications
40 - resource directories
42 Drupal includes features to enable
43 - content management systems
45 - collaborative authoring environments
49 - file uploads and download
61 grep -rl 'include_once .includes/' . | xargs sed -i -e '
62 s,include_once \(.\)includes/,include_once \1%{_appdir}/includes/,g
66 rm -rf $RPM_BUILD_ROOT
67 install -d $RPM_BUILD_ROOT{%{_appdir}/htdocs,%{_sysconfdir}}
69 cp -a *.ico index.php $RPM_BUILD_ROOT%{_appdir}/htdocs
70 cp -a misc $RPM_BUILD_ROOT%{_appdir}/htdocs
72 cp -a cron.php $RPM_BUILD_ROOT%{_appdir}
73 cp -a includes modules scripts $RPM_BUILD_ROOT%{_appdir}
74 cp -a sites $RPM_BUILD_ROOT%{_sysconfdir}
76 cp -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}
79 mv $RPM_BUILD_ROOT%{_appdir}/{htdocs/,}themes/engines
81 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache-%{name}.conf
84 %banner -e %{name} <<EOF
85 If this is your first install of Drupal, you need to create drupal database:
86 shell$ mysqladmin create drupal
88 and import initial schema:
89 shell$ zcat %{_docdir}/%{name}-%{version}/database/database.mysql.gz | mysql drupal
91 (anyway, read INSTALL file from documentation).
96 rm -rf $RPM_BUILD_ROOT
98 %triggerin -- apache1 >= 1.3.33-2
99 %apache_config_install -v 1 -c %{_sysconfdir}/apache-%{name}.conf
101 %triggerun -- apache1 >= 1.3.33-2
102 %apache_config_uninstall -v 1
104 %triggerin -- apache >= 2.0.0
105 %apache_config_install -v 2 -c %{_sysconfdir}/apache-%{name}.conf
107 %triggerun -- apache >= 2.0.0
108 %apache_config_uninstall -v 2
111 %defattr(644,root,root,755)
114 %attr(750,root,http) %dir %{_sysconfdir}
115 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache-%{name}.conf
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/*