]>
Commit | Line | Data |
---|---|---|
412d0f01 ER |
1 | Summary: Open source content management platform |
2 | Name: drupal | |
3 | Version: 4.6.0 | |
3128c8e1 | 4 | Release: 0.31 |
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 |
6c37b393 ER |
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 | |
3128c8e1 ER |
16 | Patch5: %{name}-sitesdir.patch |
17 | Patch6: %{name}-topdir.patch | |
412d0f01 | 18 | URL: http://drupal.org/ |
6c37b393 ER |
19 | BuildRequires: rpmbuild(macros) >= 1.194 |
20 | BuildRequires: sed >= 4.0 | |
3128c8e1 ER |
21 | Requires: apache >= 1.3.33-3 |
22 | Requires: apache(mod_dir) | |
23 | Requires: apache(mod_access) | |
24 | Requires: apache(mod_expires) | |
25 | Requires: apache(mod_rewrite) | |
26 | Requires: apache(mod_alias) | |
6c37b393 ER |
27 | Requires: php >= 3:4.3.3 |
28 | Requires: php-mysql | |
29 | #Requires: php-pgsql | |
30 | #Requires: php-xml | |
412d0f01 ER |
31 | BuildArch: noarch |
32 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
33 | ||
34 | %define _appdir %{_datadir}/%{name} | |
35 | %define _sysconfdir /etc/%{name} | |
36 | ||
37 | %description | |
38 | Drupal is software that allows an individual or a community of users | |
39 | to easily publish, manage and organize a great variety of content on a | |
40 | website. Tens of thousands of people and organizations have used | |
41 | Drupal 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 | ||
49 | Drupal 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 | ||
58 | and 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 | ||
74 | find -name '*~' | xargs -r rm -v | |
412d0f01 ER |
75 | |
76 | %install | |
77 | rm -rf $RPM_BUILD_ROOT | |
78 | install -d $RPM_BUILD_ROOT{%{_appdir}/htdocs,%{_sysconfdir}} | |
79 | ||
80 | cp -a *.ico index.php $RPM_BUILD_ROOT%{_appdir}/htdocs | |
6c37b393 | 81 | cp -a misc $RPM_BUILD_ROOT%{_appdir}/htdocs |
412d0f01 ER |
82 | |
83 | cp -a cron.php $RPM_BUILD_ROOT%{_appdir} | |
f4ab86cb | 84 | cp -a includes modules scripts $RPM_BUILD_ROOT%{_appdir} |
6c37b393 | 85 | cp -a sites $RPM_BUILD_ROOT%{_sysconfdir} |
412d0f01 | 86 | |
f4ab86cb ER |
87 | cp -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} | |
90 | mv $RPM_BUILD_ROOT%{_appdir}/{htdocs/,}themes/engines | |
91 | ||
54439521 ER |
92 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache-%{name}.conf |
93 | ||
6c37b393 | 94 | %post |
3128c8e1 | 95 | if [ "$1" = 1 ]; then |
6c37b393 ER |
96 | %banner -e %{name} <<EOF |
97 | If this is your first install of Drupal, you need to create drupal database: | |
98 | shell$ mysqladmin create drupal | |
99 | ||
100 | and import initial schema: | |
101 | shell$ zcat %{_docdir}/%{name}-%{version}/database/database.mysql.gz | mysql drupal | |
102 | ||
103 | (anyway, read INSTALL file from documentation). | |
104 | ||
105 | EOF | |
3128c8e1 | 106 | fi |
6c37b393 | 107 | |
412d0f01 ER |
108 | %clean |
109 | rm -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 |