29 Packager: OpenPKG Foundation e.V. |
29 Packager: OpenPKG Foundation e.V. |
30 Distribution: OpenPKG Community |
30 Distribution: OpenPKG Community |
31 Class: PLUS |
31 Class: PLUS |
32 Group: CMS |
32 Group: CMS |
33 License: GPL |
33 License: GPL |
34 Version: 6.22 |
34 Version: 7.15 |
35 Release: 20110526 |
35 Release: 20120800 |
36 |
36 |
37 # package options |
37 # package options |
38 %option with_mysql yes |
38 %option with_mysql yes |
39 %option with_pgsql no |
39 %option with_pgsql no |
40 %option with_dcron no |
40 %option with_dcron no |
41 |
41 |
42 # checking for option conflicts |
42 # checking for option conflicts |
43 %if "%{with_mysql}" == "no" && "%{with_pgsql}" == "no" |
43 %if "%{with_mysql}" == "no" && "%{with_pgsql}" == "no" |
44 %{error:one of the build-time options 'with_mysql' or 'with_pgsql' have to be enabled} |
44 %{error:one of the buildtime options 'with_mysql' or 'with_pgsql' have to be enabled} |
45 %endif |
45 %endif |
46 %if "%{with_mysql}" == "yes" && "%{with_pgsql}" == "yes" |
46 %if "%{with_mysql}" == "yes" && "%{with_pgsql}" == "yes" |
47 %{error:only one of the build-time options 'with_mysql' or 'with_pgsql' can be enabled at a time} |
47 %{error:only one of the buildtime options 'with_mysql' or 'with_pgsql' can be enabled at a time} |
48 %endif |
48 %endif |
49 |
49 |
50 # list of sources |
50 # list of sources |
51 Source0: http://ftp.drupal.org/files/projects/drupal-%{version}.tar.gz |
51 Source0: ftp://ftp.drupal.org/pub/drupal/files/projects/drupal-%{version}.tar.gz |
52 Source1: drupal-setup.sh |
52 Source1: drupal-setup.sh |
53 Source2: drupal-cron.sh |
53 Source2: drupal-cron.sh |
54 Source3: drupal-apache.conf |
54 Source3: drupal-apache.conf |
55 Source4: rc.drupal |
55 Source4: rc.drupal |
56 Patch0: drupal.patch |
56 Patch0: drupal.patch |
82 PreReq: MTA |
82 PreReq: MTA |
83 |
83 |
84 %description |
84 %description |
85 Drupal is a dynamic web site platform which allows an individual |
85 Drupal is a dynamic web site platform which allows an individual |
86 or community of users to publish, manage and organize a |
86 or community of users to publish, manage and organize a |
87 variety of content, Drupal integrates many popular features of |
87 variety of content. Drupal integrates many popular features of |
88 content management systems, weblogs, collaborative tools and |
88 content management systems, weblogs, collaborative tools and |
89 discussion-based community software into one easy-to-use package. |
89 discussion based community software into one easy to use package. |
90 |
90 |
91 %track |
91 %track |
92 prog drupal = { |
92 prog drupal = { |
93 version = %{version} |
93 version = %{version} |
94 url = http://ftp.drupal.org/files/projects/ |
94 url = http://ftp.drupal.org/files/projects/ |
95 regex = drupal-(6\.\d+)\.tar\.gz |
95 regex = drupal-(\d\.\d+)\.tar\.gz |
96 } |
96 } |
97 |
97 |
98 %prep |
98 %prep |
99 # unpack core distribution |
99 # unpack core distribution |
100 %setup -q -n drupal-%{version} |
100 %setup -q -n drupal-%{version} |
124 |
124 |
125 # install all files (and strip down installation afterwards) |
125 # install all files (and strip down installation afterwards) |
126 cp -rp * .htaccess \ |
126 cp -rp * .htaccess \ |
127 $RPM_BUILD_ROOT%{l_prefix}/share/drupal/ |
127 $RPM_BUILD_ROOT%{l_prefix}/share/drupal/ |
128 |
128 |
129 # pre-configure settings.php |
|
130 %{l_shtool} subst \ |
|
131 %if "%{with_mysql}" == "yes" |
|
132 -e 's|^\( *\$db_url\) *=.*$|\1 = "mysql://drupal:drupal@127.0.0.1/drupal";|' \ |
|
133 %endif |
|
134 %if "%{with_pgsql}" == "yes" |
|
135 -e 's|^\( *\$db_url\) *=.*$|\1 = "pgsql://drupal:drupal@127.0.0.1/drupal";|' \ |
|
136 %endif |
|
137 $RPM_BUILD_ROOT%{l_prefix}/share/drupal/sites/default/default.settings.php |
|
138 |
|
139 # set data location |
129 # set data location |
140 ln -s ../../../../var/drupal/files \ |
130 ln -s ../../../../var/drupal/files \ |
141 $RPM_BUILD_ROOT%{l_prefix}/share/drupal/sites/default/files |
131 $RPM_BUILD_ROOT%{l_prefix}/share/drupal/sites/default/files |
142 |
132 |
143 # install run-command script |
133 # install runcommand script |
144 %if "%{with_dcron}" == "yes" |
134 %if "%{with_dcron}" == "yes" |
145 l_drupal_cron="no" |
135 l_drupal_cron="no" |
146 %else |
136 %else |
147 l_drupal_cron="yes" |
137 l_drupal_cron="yes" |
148 %endif |
138 %endif |