]> git.pld-linux.org Git - packages/drupal.git/blob - drupal.spec
- put static theme content to htdocs
[packages/drupal.git] / drupal.spec
1 Summary:        Open source content management platform
2 Name:           drupal
3 Version:        4.6.0
4 Release:        0.21
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
10 Source1:        %{name}.conf
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
20 Requires:       php-mysql
21 #Requires:      php-pgsql
22 #Requires:      php-xml
23 #Requires:      apache(mod_rewrite)
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
55 %patch0 -p1
56 %patch1 -p1
57 %patch2 -p1
58 %patch3 -p1
59 %patch4 -p1
60
61 grep -rl 'include_once .includes/' . | xargs sed -i -e '
62         s,include_once \(.\)includes/,include_once \1%{_appdir}/includes/,g
63 '
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
70 cp -a misc $RPM_BUILD_ROOT%{_appdir}/htdocs
71
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}
75
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
80
81 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache-%{name}.conf
82
83 %post
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
87
88 and import initial schema:
89 shell$ zcat %{_docdir}/%{name}-%{version}/database/database.mysql.gz | mysql drupal
90
91 (anyway, read INSTALL file from documentation).
92
93 EOF
94
95 %clean
96 rm -rf $RPM_BUILD_ROOT
97
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
110 %files
111 %defattr(644,root,root,755)
112 %doc *.txt database
113
114 %attr(750,root,http) %dir %{_sysconfdir}
115 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache-%{name}.conf
116
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
121 %dir %{_appdir}
122 %{_appdir}/*.php
123 %{_appdir}/htdocs
124 %{_appdir}/includes
125 %{_appdir}/modules
126 %{_appdir}/scripts
127 %{_appdir}/themes
This page took 0.043452 seconds and 4 git commands to generate.