]>
Commit | Line | Data |
---|---|---|
412d0f01 ER |
1 | Summary: Open source content management platform |
2 | Name: drupal | |
3 | Version: 4.6.0 | |
6c37b393 | 4 | Release: 0.20 |
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 | |
412d0f01 | 16 | URL: http://drupal.org/ |
6c37b393 ER |
17 | BuildRequires: rpmbuild(macros) >= 1.194 |
18 | BuildRequires: sed >= 4.0 | |
19 | Requires: php >= 3:4.3.3 | |
20 | Requires: php-mysql | |
21 | #Requires: php-pgsql | |
22 | #Requires: php-xml | |
23 | #Requires: apache(mod_rewrite) | |
412d0f01 ER |
24 | BuildArch: noarch |
25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
26 | ||
27 | %define _appdir %{_datadir}/%{name} | |
28 | %define _sysconfdir /etc/%{name} | |
29 | ||
30 | %description | |
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 | |
37 | - personal web sites | |
38 | - afficionado sites | |
39 | - e-commerce applications | |
40 | - resource directories | |
41 | ||
42 | Drupal 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 | ||
51 | and 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 |
61 | grep -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 | |
66 | rm -rf $RPM_BUILD_ROOT | |
67 | install -d $RPM_BUILD_ROOT{%{_appdir}/htdocs,%{_sysconfdir}} | |
68 | ||
69 | cp -a *.ico index.php $RPM_BUILD_ROOT%{_appdir}/htdocs | |
6c37b393 | 70 | cp -a misc $RPM_BUILD_ROOT%{_appdir}/htdocs |
412d0f01 ER |
71 | |
72 | cp -a cron.php $RPM_BUILD_ROOT%{_appdir} | |
6c37b393 ER |
73 | cp -a includes modules scripts themes $RPM_BUILD_ROOT%{_appdir} |
74 | cp -a sites $RPM_BUILD_ROOT%{_sysconfdir} | |
412d0f01 | 75 | |
54439521 ER |
76 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache-%{name}.conf |
77 | ||
6c37b393 ER |
78 | %post |
79 | %banner -e %{name} <<EOF | |
80 | If this is your first install of Drupal, you need to create drupal database: | |
81 | shell$ mysqladmin create drupal | |
82 | ||
83 | and import initial schema: | |
84 | shell$ zcat %{_docdir}/%{name}-%{version}/database/database.mysql.gz | mysql drupal | |
85 | ||
86 | (anyway, read INSTALL file from documentation). | |
87 | ||
88 | EOF | |
89 | ||
412d0f01 ER |
90 | %clean |
91 | rm -rf $RPM_BUILD_ROOT | |
92 | ||
54439521 ER |
93 | %triggerin -- apache1 >= 1.3.33-2 |
94 | %apache_config_install -v 1 -c %{_sysconfdir}/apache-%{name}.conf | |
95 | ||
96 | %triggerun -- apache1 >= 1.3.33-2 | |
97 | %apache_config_uninstall -v 1 | |
98 | ||
99 | %triggerin -- apache >= 2.0.0 | |
100 | %apache_config_install -v 2 -c %{_sysconfdir}/apache-%{name}.conf | |
101 | ||
102 | %triggerun -- apache >= 2.0.0 | |
103 | %apache_config_uninstall -v 2 | |
104 | ||
412d0f01 ER |
105 | %files |
106 | %defattr(644,root,root,755) | |
107 | %doc *.txt database | |
54439521 ER |
108 | |
109 | %attr(750,root,http) %dir %{_sysconfdir} | |
110 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache-%{name}.conf | |
111 | ||
6c37b393 ER |
112 | %attr(750,root,http) %dir %{_sysconfdir}/sites |
113 | %attr(750,root,http) %dir %{_sysconfdir}/sites/default | |
114 | %config(noreplace) %verify(not md5 mtime size) %attr(640,root,http) %dir %{_sysconfdir}/sites/default/* | |
115 | ||
412d0f01 ER |
116 | %dir %{_appdir} |
117 | %{_appdir}/*.php | |
118 | %{_appdir}/htdocs | |
119 | %{_appdir}/includes | |
120 | %{_appdir}/modules | |
121 | %{_appdir}/scripts | |
6c37b393 | 122 | %{_appdir}/themes |