/[packages]/updates/3/drupal/current/SPECS/drupal.spec
ViewVC logotype

Contents of /updates/3/drupal/current/SPECS/drupal.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 797948 - (show annotations) (download)
Thu Nov 20 14:26:52 2014 UTC (9 years, 5 months ago) by luigiwalser
File size: 6014 byte(s)
7.34
1 %define drupaldatadir %{_datadir}/%{name}
2 %define drupalsysconfdir %{_sysconfdir}/%{name}
3 %define drupalstatedir %{_localstatedir}/lib/%{name}
4 %define drupaltmpdir %{drupalstatedir}/tmp
5 %define drupaldocdir %{_defaultdocdir}/%{name}
6
7 Name: drupal
8 Version: 7.34
9 Release: %mkrel 1
10 Epoch: 0
11 Summary: Open source content management platform
12 License: GPLv2+
13 Group: Networking/WWW
14 Url: http://www.drupal.org/
15 BuildArch: noarch
16
17 Source0: http://ftp.drupal.org/files/projects/%{name}-%{version}.tar.gz
18 Source1: README.urpmi
19 Source2: %{name}.conf
20
21 Patch0: %{name}-7.4-baseurl.patch
22 Patch1: %{name}-7.8-scripts-remove-shebang.patch
23 Patch3: %{name}-7.14-fc-fix-path-disclosure-vulnerability.patch
24
25 BuildRequires: php-cli
26
27 Requires: apache
28 Requires: apache-mod_php
29 Requires: php-xml
30 Requires: php-mbstring
31 Requires: php-gd
32 Suggests: php-uploadprogress
33 Requires: %{name}-database-storage = %{version}-%{release}
34
35 %description
36 Drupal is a free software package that allows an individual or a
37 community of users to easily publish, manage and organize a wide variety
38 of content on a website. Tens of thousands of people and organizations
39 have used Drupal to power scores of different web sites, including
40
41 * Community web portals
42 * Discussion sites
43 * Corporate web sites
44 * Intranet applications
45 * Personal web sites or blogs
46 * Aficionado sites
47 * E-commerce applications
48 * Resource directories
49 * Social Networking sites
50
51 %package mysql
52 Summary: mysql storage for drupal
53 Group: Networking/WWW
54 Provides: %{name}-database-storage = %{version}-%{release}
55 Requires: %{name} = %{epoch}:%{version}-%{release}
56 Requires: php-pdo_mysql
57 Obsoletes: %{name}-mysqli < 0:7.10
58
59 %description mysql
60 This package requires needed packages for using mysql as storage backend
61 for drupal.
62
63 %package postgresql
64 Summary: postgresql storage for drupal
65 Group: Networking/WWW
66 Provides: %{name}-database-storage = %{version}-%{release}
67 Requires: %{name} = %{epoch}:%{version}-%{release}
68 Requires: php-pdo_pgsql
69
70 %description postgresql
71 This package requires needed packages for using postgresql as storage backend
72 for drupal.
73
74 %package sqlite
75 Summary: sqlite storage for drupal
76 Group: Networking/WWW
77 Provides: %{name}-database-storage = %{version}-%{release}
78 Requires: %{name} = %{epoch}:%{version}-%{release}
79 Requires: php-pdo_sqlite
80
81 %description sqlite
82 This package requires needed packages for using sqlite as storage backend
83 for drupal.
84
85 %prep
86 %setup -q
87 %patch0 -p0
88 %patch1 -p0 -b .remove_shebang
89 %patch3 -p1
90
91 chmod -x scripts/drupal.sh
92 chmod -x scripts/password-hash.sh
93 chmod -x scripts/run-tests.sh
94
95 %install
96 mkdir -p %{buildroot}%{drupaldatadir}
97 mkdir -p %{buildroot}%{drupalsysconfdir}
98 cp -a * %{buildroot}%{drupaldatadir}
99 rm -f %{buildroot}%{drupaldatadir}/*.txt %{buildroot}%{drupaldatadir}/web.config
100
101 cp -a robots.txt %{buildroot}%{drupalsysconfdir}
102 (cd %{buildroot}%{drupaldatadir}
103 ln -s ../../..%{drupalsysconfdir}/robots.txt .
104 cd -)
105
106 install -D -m 644 %{SOURCE2} %{buildroot}%{_webappconfdir}/%{name}.conf
107
108 mv %{buildroot}%{drupaldatadir}/sites %{buildroot}%{drupalsysconfdir}
109 (cd %{buildroot}%{drupaldatadir}
110 ln -s ../../..%{drupalsysconfdir}/sites .
111 cd -)
112
113 mkdir -p %{buildroot}%{drupalstatedir}/files/default
114 (cd %{buildroot}%{drupaldatadir}/sites/default
115 ln -s ../../../../..%{drupalstatedir}/files/default files
116 cd -)
117 cat > %{buildroot}%{drupalstatedir}/files/default/.htaccess << EOF
118 # Turn off all options we don't need.
119 Options None
120 Options +FollowSymLinks
121
122 # Set the catch-all handler to prevent scripts from being executed.
123 SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
124 <Files *>
125 # Override the handler again if we're run later in the evaluation list.
126 SetHandler Drupal_Security_Do_Not_Remove_See_SA_2013_003
127 </Files>
128
129 # If we know how to do it safely, disable the PHP engine entirely.
130 <IfModule mod_php5.c>
131 php_flag engine off
132 </IfModule>
133 EOF
134
135 mkdir -p %{buildroot}%{drupaltmpdir}
136 cat > %{buildroot}%{drupaltmpdir}/.htaccess << EOF
137 <Directory %{drupaltmpdir}>
138
139 <IfModule mod_authz_core.c>
140 # Apache 2.4
141 <RequireAny>
142 Require all denied
143 </RequireAny>
144 </IfModule>
145 <IfModule !mod_authz_core.c>
146 # Apache 2.2
147 Order Deny,Allow
148 Deny from All
149 Allow from None
150 </IfModule>
151
152 # Turn off all options we don't need.
153 Options None
154 Options +FollowSymLinks
155
156 # Set the catch-all handler to prevent scripts from being executed.
157 SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
158 <Files *>
159 # Override the handler again if we're run later in the evaluation list.
160 SetHandler Drupal_Security_Do_Not_Remove_See_SA_2013_003
161 </Files>
162
163 # If we know how to do it safely, disable the PHP engine entirely.
164 <IfModule mod_php5.c>
165 php_flag engine off
166 </IfModule>
167
168 </Directory>
169 EOF
170
171 cat >> %{buildroot}%{drupalsysconfdir}/sites/default/default.settings.php << EOF
172
173 /** preset file_temporary_path so it's under apache acl (SA-CORE-2013-003) **/
174 \$conf['file_temporary_path'] = '%{drupaltmpdir}';
175 EOF
176
177 install -m0644 %SOURCE1 .
178
179 %files
180 %doc *.txt README.urpmi
181 %dir %{_datadir}/%{name}
182 %{_datadir}/%{name}/includes
183 %{_datadir}/%{name}/misc
184 %{_datadir}/%{name}/modules
185 %{_datadir}/%{name}/profiles
186 %{_datadir}/%{name}/scripts
187 %{_datadir}/%{name}/themes
188 %{_datadir}/%{name}/*php
189 %{_datadir}/%{name}/sites
190 %{_datadir}/%{name}/robots.txt
191 %dir %{drupalstatedir}
192 %dir %{drupalstatedir}/files
193 %attr(0755,apache,apache) %dir %{drupalstatedir}/files/default
194 %config(noreplace) %attr(0644,apache,apache) %{drupalstatedir}/files/default/.htaccess
195 %attr(0755,apache,apache) %dir %{drupaltmpdir}
196 %config(noreplace) %attr(0644,apache,apache) %{drupaltmpdir}/.htaccess
197 %attr(710,root,apache) %dir %{_sysconfdir}/%{name}
198 %attr(0755,apache,apache) %{_sysconfdir}/%{name}/sites
199 %config(noreplace) %{_webappconfdir}/%{name}.conf
200 %config(noreplace) %{_sysconfdir}/%{name}/robots.txt
201
202 %files mysql
203
204 %files postgresql
205
206 %files sqlite

  ViewVC Help
Powered by ViewVC 1.1.30