1 |
spuhler |
4613 |
%define name horde |
2 |
|
|
%define version 3.3.8 |
3 |
|
|
%define release %mkrel 3 |
4 |
|
|
|
5 |
|
|
%define _requires_exceptions pear(Horde/Kolab/FreeBusy.php) |
6 |
|
|
|
7 |
|
|
Name: %{name} |
8 |
|
|
Version: %{version} |
9 |
|
|
Release: %{release} |
10 |
|
|
Summary: The Horde framework |
11 |
|
|
License: GPL |
12 |
|
|
Group: System/Servers |
13 |
|
|
Source0: ftp://ftp.horde.org/pub/horde/%{name}-%{version}.tar.gz |
14 |
|
|
############################ |
15 |
|
|
# domxml php4 - php5 wrapper |
16 |
|
|
# Written by Alexandre Alapetite |
17 |
|
|
# Licence: Creative Commons "Attribution-ShareAlike 2.0 France" BY-SA (FR) |
18 |
|
|
# http://alexandre.alapetite.net/doc-alex/domxml-php4-php5 |
19 |
|
|
Source1: http://alexandre.alapetite.net/doc-alex/domxml-php4-php5/domxml-php4-to-php5.php.txt |
20 |
|
|
############################ |
21 |
|
|
Patch2: %{name}-3.3.2-better-default-configuration.patch |
22 |
|
|
Patch4: %{name}-3.3.5-registry.patch |
23 |
|
|
Patch6: horde-3.2-usr_local.patch |
24 |
|
|
URL: http://www.horde.org/ |
25 |
|
|
Requires: horde-dimp |
26 |
|
|
Requires: horde-gollem |
27 |
|
|
Requires: horde-ingo |
28 |
|
|
Requires: horde-mimp |
29 |
|
|
Requires: horde-nag |
30 |
|
|
Requires: horde-turba |
31 |
|
|
Requires: horde-passwd |
32 |
|
|
Requires: horde-kronolith |
33 |
|
|
Requires: horde-imp |
34 |
|
|
Requires: horde-vacation |
35 |
|
|
Requires: apache-mod_php |
36 |
|
|
Requires: php-imagick |
37 |
|
|
Requires: php-xml |
38 |
|
|
Requires: php-dom |
39 |
|
|
# webapp macros and scriptlets |
40 |
|
|
%if %mdkversion < 200700 |
41 |
|
|
%define _webconfdir %{_sysconfdir}/httpd/conf |
42 |
|
|
%define _webappconfdir %_webconfdir/webapps.d |
43 |
|
|
Requires(post): rpm-helper |
44 |
|
|
Requires(postun): rpm-helper |
45 |
|
|
BuildRequires: rpm-helper |
46 |
|
|
BuildRequires: rpm-mandriva-setup |
47 |
|
|
%else |
48 |
|
|
Requires(post): rpm-helper >= 0.16 |
49 |
|
|
Requires(postun): rpm-helper >= 0.16 |
50 |
|
|
BuildRequires: rpm-helper >= 0.16 |
51 |
|
|
BuildRequires: rpm-mandriva-setup >= 1.23 |
52 |
|
|
%endif |
53 |
|
|
Conflicts: horde-accounts <= 2.1.2 |
54 |
|
|
Conflicts: horde-forwards <= 2.2.2 |
55 |
|
|
Conflicts: horde-password <= 2.2.2 |
56 |
|
|
Conflicts: horde-vacation <= 2.2.2 |
57 |
|
|
BuildArch: noarch |
58 |
|
|
|
59 |
|
|
%description |
60 |
|
|
The Horde Framework provides a common structure and interface for Horde |
61 |
|
|
applications (such as IMP, a web-based mail program). This RPM is required |
62 |
|
|
for all other Horde module RPMS. |
63 |
|
|
|
64 |
|
|
The Horde Project writes web applications in PHP and releases them under |
65 |
|
|
the GNU Public License. For more information (including help with Horde |
66 |
|
|
and its modules) please visit http://www.horde.org/. |
67 |
|
|
|
68 |
|
|
%prep |
69 |
|
|
%setup -q |
70 |
|
|
%patch2 -p 1 |
71 |
|
|
%patch4 -p 1 |
72 |
|
|
%patch6 -p 1 |
73 |
|
|
|
74 |
|
|
# fix perms |
75 |
|
|
chmod 755 scripts/*.{php,sh,cron} |
76 |
|
|
|
77 |
|
|
# nuke patch backup files |
78 |
|
|
find . -type f -name "*.orig" | xargs rm -f |
79 |
|
|
|
80 |
|
|
%build |
81 |
|
|
|
82 |
|
|
%install |
83 |
|
|
rm -rf %{buildroot} |
84 |
|
|
|
85 |
|
|
# apache configuration |
86 |
|
|
install -d -m 755 %{buildroot}%{_webappconfdir} |
87 |
|
|
cat > %{buildroot}%{_webappconfdir}/%{name}.conf <<EOF |
88 |
|
|
# %{name} Apache configuration file |
89 |
|
|
Alias /%{name} %{_datadir}/%{name} |
90 |
|
|
<Directory %{_datadir}/%{name}> |
91 |
|
|
Order allow,deny |
92 |
|
|
Allow from localhost |
93 |
|
|
</Directory> |
94 |
|
|
|
95 |
|
|
<Directory %{_datadir}/%{name}/lib> |
96 |
|
|
Order allow,deny |
97 |
|
|
Deny from all |
98 |
|
|
</Directory> |
99 |
|
|
|
100 |
|
|
<Directory %{_datadir}/%{name}/locale> |
101 |
|
|
Order allow,deny |
102 |
|
|
Deny from all |
103 |
|
|
</Directory> |
104 |
|
|
|
105 |
|
|
<Directory %{_datadir}/%{name}/scripts> |
106 |
|
|
Order allow,deny |
107 |
|
|
Deny from all |
108 |
|
|
</Directory> |
109 |
|
|
|
110 |
|
|
<Directory %{_datadir}/%{name}/templates> |
111 |
|
|
Order allow,deny |
112 |
|
|
Deny from all |
113 |
|
|
</Directory> |
114 |
|
|
EOF |
115 |
|
|
|
116 |
|
|
# remove .htaccess files |
117 |
|
|
find . -name .htaccess -exec rm -f {} \; |
118 |
|
|
|
119 |
|
|
# install files |
120 |
|
|
install -d -m 755 %{buildroot}%{_datadir}/%{name} |
121 |
|
|
cp -pR *.php %{buildroot}%{_datadir}/%{name} |
122 |
|
|
cp -pR admin %{buildroot}%{_datadir}/%{name} |
123 |
|
|
cp -pR js %{buildroot}%{_datadir}/%{name} |
124 |
|
|
cp -pR services %{buildroot}%{_datadir}/%{name} |
125 |
|
|
cp -pR themes %{buildroot}%{_datadir}/%{name} |
126 |
|
|
cp -pR util %{buildroot}%{_datadir}/%{name} |
127 |
|
|
cp -pR lib %{buildroot}%{_datadir}/%{name} |
128 |
|
|
cp -pR locale %{buildroot}%{_datadir}/%{name} |
129 |
|
|
cp -pR scripts %{buildroot}%{_datadir}/%{name} |
130 |
|
|
cp -pR templates %{buildroot}%{_datadir}/%{name} |
131 |
|
|
|
132 |
|
|
install -d -m 755 %{buildroot}%{_sysconfdir} |
133 |
|
|
cp -pR config %{buildroot}%{_sysconfdir}/%{name} |
134 |
|
|
pushd %{buildroot}%{_datadir}/%{name} |
135 |
|
|
ln -s ../../..%{_sysconfdir}/%{name} config |
136 |
|
|
popd |
137 |
|
|
|
138 |
|
|
# put domxml-php4-to-php5.php in place |
139 |
|
|
install -m0644 %{SOURCE1} %{buildroot}%{_datadir}/%{name}/lib/Horde/domxml-php4-to-php5.php |
140 |
|
|
|
141 |
|
|
# activate configuration files |
142 |
|
|
for file in %{buildroot}%{_sysconfdir}/%{name}/*.dist; do |
143 |
|
|
mv $file ${file%.dist} |
144 |
|
|
done |
145 |
|
|
|
146 |
|
|
# fix script shellbang |
147 |
|
|
for file in `find %{buildroot}%{_datadir}/%{name}/scripts`; do |
148 |
|
|
perl -pi -e 's|/usr/local/bin/php|/usr/bin/php|' $file |
149 |
|
|
done |
150 |
|
|
|
151 |
|
|
# registry dir |
152 |
|
|
install -d -m 755 %{buildroot}%{_sysconfdir}/%{name}/registry.d |
153 |
|
|
|
154 |
|
|
# logs |
155 |
|
|
install -d -m 755 %{buildroot}%{_var}/log/%{name} |
156 |
|
|
install -d -m 755 %{buildroot}%{_sysconfdir}/logrotate.d |
157 |
|
|
cat > %{buildroot}%{_sysconfdir}/logrotate.d/%{name} <<EOF |
158 |
|
|
%{_var}/log/%{name}/*.log { |
159 |
|
|
missingok |
160 |
|
|
compress |
161 |
|
|
} |
162 |
|
|
EOF |
163 |
|
|
|
164 |
|
|
cat > README.mdv <<EOF |
165 |
|
|
Mandriva RPM specific notes |
166 |
|
|
|
167 |
|
|
setup |
168 |
|
|
----- |
169 |
|
|
The setup used here differs from default one, to achieve better FHS compliance. |
170 |
|
|
- the configuration files are in /etc/horde |
171 |
|
|
- the log files are in /var/log/horde |
172 |
|
|
- the constant files are in /usr/share/horde |
173 |
|
|
|
174 |
|
|
post-installation |
175 |
|
|
----------------- |
176 |
|
|
You have to either use a browser to http://your.server.url/horde, so as to |
177 |
|
|
configure proper configuration. |
178 |
|
|
|
179 |
|
|
Additional useful packages |
180 |
|
|
-------------------------- |
181 |
|
|
- either a SQL database (MySQL or PostgreSQL), an LDAP (openldap) or a Kolab |
182 |
|
|
server for storing preferences |
183 |
|
|
- php-mcrypt for better encryption |
184 |
|
|
- php-iconv and php-mbstring for better utf8 support |
185 |
|
|
- php-gd for image manipulations |
186 |
|
|
- php-pear-File for CVS import support |
187 |
|
|
- php-Date to deal with calendar data |
188 |
|
|
- php-Services_Weather to the weather.com block on the portal page |
189 |
|
|
|
190 |
|
|
|
191 |
|
|
Additional horde applications |
192 |
|
|
----------------------------- |
193 |
|
|
They are all packaged as horde-<application>. Warning, some have still not been |
194 |
|
|
ported to horde 3, and have been removed from the distribution (vacation, |
195 |
|
|
forwards and accounts notably). |
196 |
|
|
EOF |
197 |
|
|
|
198 |
|
|
%clean |
199 |
|
|
rm -rf %{buildroot} |
200 |
|
|
|
201 |
|
|
%post |
202 |
|
|
%if %mdkversion < 201010 |
203 |
|
|
%_post_webapp |
204 |
|
|
%endif |
205 |
|
|
|
206 |
|
|
if [ $1 = 1 ]; then |
207 |
|
|
# configuration |
208 |
|
|
%create_ghostfile %{_sysconfdir}/%{name}/conf.php.bak apache apache 644 |
209 |
|
|
fi |
210 |
|
|
|
211 |
|
|
%postun |
212 |
|
|
%if %mdkversion < 201010 |
213 |
|
|
%_postun_webapp |
214 |
|
|
%endif |
215 |
|
|
|
216 |
|
|
%files |
217 |
|
|
%defattr(-,root,root) |
218 |
|
|
%doc README README.mdv COPYING docs scripts/SCRIPTS |
219 |
|
|
%config(noreplace) %{_webappconfdir}/%{name}.conf |
220 |
|
|
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name} |
221 |
|
|
%config(noreplace) %{_sysconfdir}/%{name} |
222 |
|
|
%attr(-,apache,apache) %config(noreplace) %{_sysconfdir}/%{name}/conf.php |
223 |
|
|
%{_datadir}/%{name} |
224 |
|
|
%attr(-,apache,apache) %{_var}/log/%{name} |
225 |
|
|
|
226 |
|
|
|
227 |
|
|
|
228 |
|
|
|