blob: 0a367f81bb719f149f9136962605913f9d213f1b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
|
# Ports collection makefile for: horde3
# Date created: Sun Oct 07, 2001
# Whom: Thierry Thomas (<thierry@thomas.as>)
#
# $FreeBSD$
#
PORTNAME= horde
DISTVERSION= 3.1.4-rc1
CATEGORIES= www
MASTER_SITES= HORDE
PKGNAMESUFFIX= -base
MAINTAINER= beech@alaskaparadise.com
COMMENT= A common code-base used by Horde applications, written in PHP
#----------------------------------------------------------------------------
# You may define these options:
#
# - WITHOUT_SUPPORTED_DB: if you run a database not in the ports tree.
#
# - WITHOUT_MYSQL: this port is built with MySQL by default
# but you might choose any other database
# supported by PHP (e.g. WITH_POSTGRESQL / WITH_SQLITE).
#
# - WITHOUT_IMAP: this port uses IMAP as a default authentication
# backend; use this knob if for
# example you only need Chora.
#
# - WITHOUT_LDAP: if you do not need OpenLDAP.
#
# - WITHOUT_FTP: if you do not need the VFS FTP driver.
#
# - WITH_MCAL: for mcal authentication back-end (deprecated).
#
# - WITH_IMSP: use IMSP as a preferences backend.
#
# - WITHOUT_FILEINFO: use native code to perform MIME magic lookups.
#
# - WITHOUT_GD: don't perform manipulations on image data with gd.
#
# - WITHOUT_ZLIB: don't compress pages and don't handle zip or gz data.
#
# - WITH_MAGICK: use ImageMagick to perform these image manipulations.
#
# - WITHOUT_ICONV: remove support for UTF-8 character sets.
# - WITHOUT_MBSTRING:
#
# - WITHOUT_WV if your users never receive MS-Word docs;
#
# - WITHOUT_XL if your users never receive MS-Excel sheets
# (or .ppt presentations);
#
# - WITHOUT_GEOIP don't activate MaxMind GeoIP Hostname to Country lookup.
#
# - WITHOUT_SW don't use the weather.com block on the portal page.
#
# - WITHOUT_WEBCPP: don't highlight sources with webcpp.
#
# - WITH_SRCHIGH: highlight sources with source-highlight.
#
# - WITH_ENSCRIPT: highlight sources with enscript.
#
# - WITH_RPM: handle RPM packages.
#
# - WITH_DEB: handle Debian packages.
#
# - WITH_SUPHP: Install appropriately for use with the www/suphp port.
#
#----------------------------------------------------------------------------
RUN_DEPENDS+= ${PEARDIR}/Date.php:${PORTSDIR}/devel/pear-Date \
${PEARDIR}/Log.php:${PORTSDIR}/sysutils/pear-Log \
${PEARDIR}/Mail/RFC822.php:${PORTSDIR}/mail/pear-Mail \
${PEARDIR}/Mail/mime.php:${PORTSDIR}/mail/pear-Mail_Mime \
${PEARDIR}/DB.php:${PORTSDIR}/databases/pear-DB \
${PEARDIR}/File.php:${PORTSDIR}/sysutils/pear-File \
${PEARDIR}/Net/SMTP.php:${PORTSDIR}/net/pear-Net_SMTP
CONFLICTS= horde-2.*
NO_BUILD= yes
USE_APACHE= 1.3+
USE_GETTEXT= yes # Already implied by USE_PHP =gettext, to pet portlint
USE_PHP= ctype gettext session
SUB_FILES= pkg-message pkg-deinstall pkg-install
PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
PKGINSTALL= ${WRKDIR}/pkg-install
PKGMESSAGE= ${WRKDIR}/pkg-message
.if defined(WITH_SUPHP) && !defined(WITHOUT_SUPHP)
RUN_DEPENDS+= ${LOCALBASE}/sbin/suphp:${PORTSDIR}/www/suphp
WANT_PHP_CGI= yes
HORDEADMUSR?= horde
SUB_LIST= WITH_SUPHP=yes
.else
WANT_PHP_WEB= yes
.endif
.if !defined(WITHOUT_FILEINFO)
USE_PHP+= fileinfo
.endif
.if !defined(WITHOUT_FTP)
USE_PHP+= ftp
.endif
.if !defined(WITHOUT_GD)
USE_PHP+= gd
.endif
.if !defined(WITHOUT_ICONV)
USE_PHP+= iconv
.endif
.if !defined(WITHOUT_IMAP)
USE_PHP+= imap
.endif
.if !defined(WITHOUT_LDAP)
USE_PHP+= ldap
.endif
.if !defined(WITHOUT_MBSTRING)
USE_PHP+= mbstring
.endif
.if !defined(NOCRYPT)
USE_PHP+= mcrypt
.endif
.if !defined(WITHOUT_SUPPORTED_DB)
. if !defined(WITHOUT_MYSQL)
USE_PHP+= mysql
. endif
. if defined(WITH_POSTGRESQL) || defined(WITH_PGSQL)
USE_PHP+= pgsql
. endif
. if defined(WITH_SQLITE)
USE_PHP+= sqlite
. endif
.endif
.if !defined(WITHOUT_ZLIB)
USE_PHP+= zlib
.endif
.if defined(WITH_MAGICK)
RUN_DEPENDS+= convert:${PORTSDIR}/graphics/ImageMagick
.endif
.if defined(WITH_IMSP)
RUN_DEPENDS+= imspd:${PORTSDIR}/databases/cyrus-imspd
.endif
.if !defined(WITHOUT_X11)
. if !defined(WITHOUT_WV)
RUN_DEPENDS+= ${LOCALBASE}/bin/wvHtml:${PORTSDIR}/textproc/wv
. endif
. if !defined(WITHOUT_XL)
RUN_DEPENDS+= ${LOCALBASE}/bin/xlhtml:${PORTSDIR}/textproc/xlhtml
. endif
.endif
.if !defined(WITHOUT_WEBCPP)
RUN_DEPENDS+= webcpp:${PORTSDIR}/textproc/webcpp
.endif
.if exists(${LOCALBASE}/bin/source-highlight)
WITH_SRCHIGH= yes
.endif
.if defined(WITH_SRCHIGH)
RUN_DEPENDS+= source-highlight:${PORTSDIR}/textproc/source-highlight
.endif
.if exists(${LOCALBASE}/bin/enscript)
WITH_ENSCRIPT= yes
.endif
.if defined(WITH_ENSCRIPT)
. if defined(A4)
RUN_DEPENDS+= enscript:${PORTSDIR}/print/enscript-a4
. elif defined(DJ)
RUN_DEPENDS+= enscript:${PORTSDIR}/print/enscript-letterdj
. else
RUN_DEPENDS+= enscript:${PORTSDIR}/print/enscript-letter
. endif
.endif
.if exists(${LOCALBASE}/bin/rpm)
WITH_RPM= yes
.endif
.if defined(WITH_RPM)
RUN_DEPENDS+= rpm:${PORTSDIR}/archivers/rpm4
.endif
.if exists(${LOCALBASE}/bin/dpkg)
WITH_DEB= yes
.endif
.if defined(WITH_DEB)
RUN_DEPENDS+= dpkg:${PORTSDIR}/archivers/dpkg
.endif
.if !defined(WITHOUT_SW)
RUN_DEPENDS+= ${PEARDIR}/Services/Weather.php:${PORTSDIR}/misc/pear-Services_Weather
.endif
.if !defined(WITHOUT_GEOIP)
RUN_DEPENDS+= ${LOCALBASE}/share/GeoIP/GeoIP.dat:${PORTSDIR}/net/GeoIP
.endif
REINPLACE_ARGS= -i.beforeHorde
PORTDOCS= README CHANGES CODING_STANDARDS CONTRIBUTING CREDITS HACKING INSTALL \
PERFORMANCE RELEASE_NOTES SECURITY TODO TRANSLATIONS UPGRADING
CONFFILE= conf.php hooks.php mime_drivers.php motd.php nls.php prefs.php registry.php
SUB_DIRS= admin config js lib locale po scripts services templates themes util
LHORDEDIR?= www/horde
LHORDESBIN?= sbin
PLIST_SUB= HORDEDIR=${LHORDEDIR} HORDESBIN=${LHORDESBIN} \
HORDE_INC=${LHORDE_INC}
SUB_LIST+= HORDEDIR=${HORDEDIR} APACHE_CONF=${APACHE_CONF} \
HORDESBIN=${HORDESBIN} HORDEADMUSR=${HORDEADMUSR} HORDEGRP=${WWWGRP}
HORDEDIR= ${PREFIX}/${LHORDEDIR}
HORDESBIN= ${PREFIX}/${LHORDESBIN}
CONFDIR= ${HORDEDIR}/config
APACHE_CONF= ${APACHE_CNFDIR}/httpd.conf
PEARDIR?= ${LOCALBASE}/share/pear
LOG_FILE?= /var/log/horde.log
PATCHES2RM= po/translation.php config/conf.xml scripts/sql/README \
config/mime_drivers.php.dist config/registry.php.dist
SEDIN2RM= lib/Horde/Auth/mcal.php config/conf.xml docs/INSTALL \
config/mime_drivers.php.dist
.include <bsd.port.pre.mk>
.if ${PHP_VER} == 5
USE_PHP+= dom
.else
USE_PHP+= domxml
. if defined(WITH_MCAL)
USE_PHP+= mcal
. endif
.endif
.if ${APACHE_VERSION} >= 20
APACHE_CNFDIR= ${LOCALBASE}/etc/apache${APACHE_VERSION:S/20/2/}
HORDE_INC= ${APACHE_CNFDIR}/Includes
LHORDE_INC= ${HORDE_INC:S|^${LOCALBASE}/||}
PLIST_SUB+= RMDIRINC="@comment "
.else
APACHE_CNFDIR= ${LOCALBASE}/etc/apache
HORDE_INC= ${PREFIX}/etc/horde
LHORDE_INC= ${HORDE_INC:S|^${PREFIX}/||}
PLIST_SUB+= RMDIRINC=""
.endif
post-extract:
@${MV} ${WRKSRC}/README ${WRKSRC}/docs/
pre-configure:
@${RM} ${PATCHES2RM:S|^|${WRKSRC}/|:S|$|.orig|}
@${SED} -e "s:/home/httpd/html/horde:${HORDEDIR}:" \
-e "s:php_value auto_prepend_file:# php_value auto_prepend_file:" \
-e "s:/home/httpd/phplib:${PEARDIR}:" \
${FILESDIR}/httpd.conf.horde > ${WRKDIR}/httpd-horde.conf
.if ${PHP_VER} == 5
@${REINPLACE_CMD} -e "s:mod_php4.c:mod_php5.c:" ${WRKDIR}/httpd-horde.conf
.endif
.if ${APACHE_VERSION} >= 22
@${REINPLACE_CMD} -e "s:IfModule mod_\([^ ]*\)\.c:IfModule \1_module:" \
${WRKDIR}/httpd-horde.conf
.endif
@${REINPLACE_CMD} -e "s:%%LOCALBASE%%:${LOCALBASE}:" ${WRKSRC}/config/mime_drivers.php.dist
.if !defined(WITHOUT_X11)
. if !defined(WITHOUT_WV)
@${REINPLACE_CMD} -e "s://UNCOMMENTIFWV::" ${WRKSRC}/config/mime_drivers.php.dist
. endif
. if !defined(WITHOUT_XL)
@${REINPLACE_CMD} -e "s://UNCOMMENTIFXL::" ${WRKSRC}/config/mime_drivers.php.dist
. endif
.endif
.if !defined(WITHOUT_WEBCPP)
@${REINPLACE_CMD} -e "s://UNCOMMENTIFWCPP::" ${WRKSRC}/config/mime_drivers.php.dist
.endif
.if defined(WITH_SRCHIGH)
@${REINPLACE_CMD} -e "s://UNCOMMENTIFSRCHIGH::" ${WRKSRC}/config/mime_drivers.php.dist
.endif
.if defined(WITH_ENSCRIPT)
@${REINPLACE_CMD} -e "s://UNCOMMENTIFES::" ${WRKSRC}/config/mime_drivers.php.dist
.endif
.if defined(WITH_RPM)
@${REINPLACE_CMD} -e "s://UNCOMMENTIFRPM::" ${WRKSRC}/config/mime_drivers.php.dist
.endif
.if defined(WITH_DEB)
@${REINPLACE_CMD} -e "s://UNCOMMENTIFDEB::" ${WRKSRC}/config/mime_drivers.php.dist
.endif
.if !defined(WITHOUT_GEOIP)
@${REINPLACE_CMD} -e "s:GeoIP lookup will not be performed.\"/>:GeoIP lookup will not be performed.\">${LOCALBASE}/share/GeoIP/GeoIP.dat</configstring>:" \
${WRKSRC}/config/conf.xml
.endif
@${REINPLACE_CMD} -e "s:/tmp/horde.log:${LOG_FILE}:" ${WRKSRC}/config/conf.xml
@${REINPLACE_CMD} -e "s:/etc/mpasswd:${LOCALBASE}/etc/mpasswd:g" \
${WRKSRC}/lib/Horde/Auth/mcal.php
@${REINPLACE_CMD} -e "s:/usr/local/apache/htdocs:${PREFIX}/www:g" \
${WRKSRC}/docs/INSTALL
@${RM} ${SEDIN2RM:S|^|${WRKSRC}/|:S|$|.beforeHorde|}
@(cd ${WRKSRC}/scripts && \
${FIND} . -name "*.php" -exec \
${REINPLACE_CMD} -e "s:/usr/local/bin/php: ${LOCALBASE}/bin/php:;s:/usr/bin/php: ${LOCALBASE}/bin/php:" {} \; && \
${FIND} . -name "*.beforeHorde" -delete)
pre-install:
.if !defined(WITHOUT_SUPPORTED_DB) && exists(${LOCALBASE}/bin/php)
@if ! php -m 2>&1 | ${GREP} -q -e "mysql" ; then \
if ! php -m 2>&1 | ${GREP} -q -e "pgsql" ; then \
if ! php -m 2>&1 | ${GREP} -q -e "sybase" ; then \
if ! php -m 2>&1 | ${GREP} -q -e "SQLite" ; then \
${ECHO_MSG} "" ; \
${ECHO_MSG} "Please configure PHP with a database support." ; \
${ECHO_MSG} "MySQL, PostgreSQL, SQLite and Sybase (CTLIB or DBLIB)" ; \
${ECHO_MSG} "can be used with PHP AND Horde." ; \
${ECHO_MSG} "" ; \
${ECHO_MSG} "(If everything will run on this machine, do not" ; \
${ECHO_MSG} " forget to install the database server-side!)" ; \
${ECHO_MSG} "" ; \
${FALSE} ; \
fi ; \
fi ; \
fi ; \
fi
.endif
.if defined(WITH_SUPHP)
${SETENV} ${SCRIPTS_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
.endif
# Copy RCSID tag from conf.xml into conf.php to stop Horde complaining
@if ! ${GREP} -q -e "$$Horde.*conf\.xml" ${WRKSRC}/config/conf.php.dist; then \
${GREP} -h "$$Horde.*conf\.xml" ${WRKSRC} ${WRKSRC}/config/conf.xml \
| ${SED} -e 's#^ *<!--#//#' -e 's# *--> *$$##g' \
>> ${WRKSRC}/config/conf.php.dist; \
fi
do-install:
@${MKDIR} ${HORDEDIR}
.for REP in ${SUB_DIRS}
@${CP} -Rp ${WRKSRC}/${REP} ${HORDEDIR}
.endfor
@${CP} -p ${WRKSRC}/*.php ${HORDEDIR}
@${CP} ${WRKSRC}/scripts/set_perms.sh ${HORDESBIN}/horde_set_perms.sh
@${CHMOD} u+x ${HORDESBIN}/horde_set_perms.sh
.if ${APACHE_VERSION} >= 20
${INSTALL_DATA} ${WRKDIR}/httpd-horde.conf ${HORDE_INC}
.else
@${MKDIR} ${HORDE_INC}
@${INSTALL_DATA} ${WRKDIR}/httpd-horde.conf ${HORDE_INC}
. if !defined(PACKAGE_BUILDING)
@(if [ -f ${APACHE_CONF} ] ; then \
${ECHO_MSG} "===> Updating ${APACHE_CONF}..." ; \
${CP} -p ${APACHE_CONF} ${APACHE_CONF}.beforeHorde ; \
${ECHO_CMD} "# Horde's include directory" >> ${APACHE_CONF} ; \
${ECHO_CMD} "Include ${HORDE_INC}" >> ${APACHE_CONF} ; \
fi)
. endif
.endif
@${CHOWN} -R ${WWWOWN}:${WWWGRP} ${HORDEDIR}
@${CHMOD} -R o-rwx ${CONFDIR}
@${TOUCH} ${LOG_FILE}
@${CHOWN} ${WWWOWN}:${WWWGRP} ${LOG_FILE}
.if !defined(NOPORTDOCS)
@${INSTALL} -d ${DOCSDIR}/
@${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/docs/|} ${DOCSDIR}/
@${ECHO_MSG} "===> Documentation installed in ${DOCSDIR}."
.endif
post-install:
@${SETENV} ${SCRIPTS_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
@${ECHO_MSG}
@${CAT} ${PKGMESSAGE}
@${ECHO_MSG}
.include <bsd.port.post.mk>
|