]>
Commit | Line | Data |
---|---|---|
412d0f01 ER |
1 | Summary: Open source content management platform |
2 | Name: drupal | |
3 | Version: 4.6.0 | |
b5d0dcdb | 4 | Release: 0.33 |
412d0f01 ER |
5 | Epoch: 0 |
6 | License: GPL | |
7 | Group: Applications/WWW | |
8 | Source0: http://drupal.org/files/projects/%{name}-%{version}.tar.gz | |
9 | # Source0-md5: cba80c4f511284b09d6a0a2def5cb250 | |
54439521 | 10 | Source1: %{name}.conf |
70724985 | 11 | Source2: %{name}.cron |
6c37b393 ER |
12 | Patch0: %{name}-config.patch |
13 | Patch1: %{name}-includedir.patch | |
14 | Patch2: %{name}-module-themedir.patch | |
15 | Patch3: %{name}-emptypass.patch | |
16 | Patch4: %{name}-themedir.patch | |
3128c8e1 ER |
17 | Patch5: %{name}-sitesdir.patch |
18 | Patch6: %{name}-topdir.patch | |
412d0f01 | 19 | URL: http://drupal.org/ |
6c37b393 ER |
20 | BuildRequires: rpmbuild(macros) >= 1.194 |
21 | BuildRequires: sed >= 4.0 | |
3128c8e1 ER |
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) | |
6c37b393 ER |
28 | Requires: php >= 3:4.3.3 |
29 | Requires: php-mysql | |
30 | #Requires: php-pgsql | |
b5d0dcdb ER |
31 | Requires: php-xml |
32 | Requires: php-pcre | |
412d0f01 ER |
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 | ||
70724985 ER |
62 | %package cron |
63 | Summary: drupal cron | |
64 | Group: Applications/WWW | |
65 | Requires: %{name} = %{version}-%{release} | |
66 | Requires: crondaemon | |
67 | Requires: php-cli >= 3:4.3.3 | |
68 | ||
69 | %description cron | |
70 | This 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 | ||
86 | find -name '*~' | xargs -r rm -v | |
412d0f01 ER |
87 | |
88 | %install | |
89 | rm -rf $RPM_BUILD_ROOT | |
70724985 | 90 | install -d $RPM_BUILD_ROOT{%{_appdir}/htdocs,%{_sysconfdir},/etc/cron.d} |
412d0f01 ER |
91 | |
92 | cp -a *.ico index.php $RPM_BUILD_ROOT%{_appdir}/htdocs | |
6c37b393 | 93 | cp -a misc $RPM_BUILD_ROOT%{_appdir}/htdocs |
412d0f01 ER |
94 | |
95 | cp -a cron.php $RPM_BUILD_ROOT%{_appdir} | |
f4ab86cb | 96 | cp -a includes modules scripts $RPM_BUILD_ROOT%{_appdir} |
6c37b393 | 97 | cp -a sites $RPM_BUILD_ROOT%{_sysconfdir} |
412d0f01 | 98 | |
f4ab86cb ER |
99 | cp -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} | |
102 | mv $RPM_BUILD_ROOT%{_appdir}/{htdocs/,}themes/engines | |
103 | ||
54439521 | 104 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache-%{name}.conf |
70724985 | 105 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/%{name} |
54439521 | 106 | |
6c37b393 | 107 | %post |
3128c8e1 | 108 | if [ "$1" = 1 ]; then |
6c37b393 ER |
109 | %banner -e %{name} <<EOF |
110 | If this is your first install of Drupal, you need to create drupal database: | |
111 | shell$ mysqladmin create drupal | |
112 | ||
113 | and import initial schema: | |
114 | shell$ zcat %{_docdir}/%{name}-%{version}/database/database.mysql.gz | mysql drupal | |
115 | ||
116 | (anyway, read INSTALL file from documentation). | |
117 | ||
118 | EOF | |
3128c8e1 | 119 | fi |
6c37b393 | 120 | |
412d0f01 ER |
121 | %clean |
122 | rm -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 |