summaryrefslogtreecommitdiff
path: root/sysutils/gosa/Makefile
blob: ed420a418b9868592de9c266e4964535b5add574 (plain)
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
# Created by: Denis Shaposhnikov <dsh@wizard.volgograd.ru>
# $FreeBSD$

PORTNAME=	gosa
PORTVERSION=	2.6.10
DISTVERSIONPREFIX=	combined-
PORTREVISION=	1
CATEGORIES=	sysutils www
MASTER_SITES=	http://oss.gonicus.de/pub/gosa/ \
		http://oss.gonicus.de/pub/gosa/archive/

MAINTAINER=	ports@FreeBSD.org
COMMENT=	Web Based LDAP Administration Program

BROKEN=		requires magic quotes option (PHP < 5.4, no longer available)
DEPRECATED=	this version of gosa cannot be fixed (requires PHP < 5.4)
EXPIRATION_DATE=	2016-11-19

LICENSE=	GPLv2+
LICENSE_FILE=	${WRKSRC}/COPYING

RUN_DEPENDS=	p5-Crypt-SmbHash>=0.12:security/p5-Crypt-SmbHash \
		pecl-imagick>=2.2.2:graphics/pecl-imagick

USES=		tar:bzip2
USE_PHP=	gettext iconv imap ldap mbstring hash mysql pcre posix \
		session spl xml zlib

NO_BUILD=	yes
NO_ARCH=	yes
PKGMESSAGE=	${WRKDIR}/pkg-message
REINPLACE_ARGS=	-i ""
SUB_FILES=	pkg-message
SUB_LIST=	WWWOWN=${WWWOWN} WWWGRP=${WWWGRP}
PLIST_SUB=	WWWOWN=${WWWOWN} WWWGRP=${WWWGRP}

OPTIONS_DEFINE=	DOCS

post-patch:
	@${REINPLACE_CMD} \
		-e 's!"/etc/gosa"!"${ETCDIR}"!g' \
		-e 's!"../contrib"!"${EXAMPLESDIR}/contrib"!g' \
		-e 's!"/var/cache/gosa/tmp"!"/tmp"!g' \
		${WRKSRC}/include/functions.inc

	@${REINPLACE_CMD} \
		-e 's!/usr/bin/php!${PREFIX}/bin/php!g' \
		-e 's!("GOSA_HOME", dirname(__FILE__));!("GOSA_HOME", "${WWWDIR}");!g' \
		${WRKSRC}/update-gosa

.for i in doc/core/guide.xml html/helpviewer.php include/functions_helpviewer.inc
	@${REINPLACE_CMD} -e 's!"../doc/!"${DOCSDIR}/!g' ${WRKSRC}/$i
.endfor

	@${MV} -f ${WRKSRC}/contrib/gosa.conf.5 ${WRKSRC}
	@${FIND} ${WRKSRC} -type f -name '*.orig' -exec ${RM} {} +

do-install:
	@${MKDIR} ${STAGEDIR}${WWWDIR}
	(cd ${WRKSRC} && ${COPYTREE_SHARE} \
		"html ihtml include locale plugins setup" ${STAGEDIR}${WWWDIR})
	${INSTALL_SCRIPT} ${WRKSRC}/update-gosa ${STAGEDIR}${PREFIX}/sbin
	${INSTALL_MAN} ${WRKSRC}/update-gosa.1 ${STAGEDIR}${MANPREFIX}/man/man1
	${INSTALL_MAN} ${WRKSRC}/gosa.conf.5 ${STAGEDIR}${MANPREFIX}/man/man5
	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
	(cd ${WRKSRC} && ${COPYTREE_SHARE} contrib ${STAGEDIR}${EXAMPLESDIR})
	@${MKDIR} ${STAGEDIR}/var/spool/gosa
	@${MKDIR} ${STAGEDIR}${ETCDIR}

do-install-DOCS-on:
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
	(cd ${WRKSRC}/doc && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR})
	(cd ${WRKSRC} && ${INSTALL_DATA} AUTHORS Changelog FAQ \
		INSTALL README README.safemode ${STAGEDIR}${DOCSDIR})

.include <bsd.port.mk>