aboutsummaryrefslogtreecommitdiff
path: root/sysutils/ldap-account-manager/Makefile
blob: 45cab7e7f1d039c9cfcc17b28cd9276561a83cf9 (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
# New ports collection makefile for:   	ldap-account-manager
# Date created:				August, 2nd 2003
# Whom:                			Clement Laforet <sheepkiller@cultdeadsheep.org>
#
# $FreeBSD$
#

PORTNAME=	ldap-account-manager
PORTVERSION=	3.7
PORTREVISION=	1
CATEGORIES=	sysutils www
MASTER_SITES=	SF/${SHORTNAME}/LAM/${PORTVERSION}

MAINTAINER=	basil@vpm.net.ua
COMMENT=	Webfrontend for managing accounts stored in an OpenLDAP server

LICENSE=	GPLv2

RUN_DEPENDS=	${SITE_PERL}/${PERL_ARCH}/Quota.pm:${PORTSDIR}/sysutils/p5-Quota \
		${SITE_PERL}/Net/LDAP.pm:${PORTSDIR}/net/p5-perl-ldap

NO_BUILD=	yes
USE_GETTEXT=	yes
USE_PERL5=	yes
USE_PHP=	gettext hash iconv ldap mcrypt pcre session simplexml spl xml json zip
WANT_PHP_WEB=	yes
DEFAULT_PHP_VER=	5

SHORTNAME=	lam
PORTDOCS=	docs COPYING HISTORY README copyright
LAMDATA=	config graphics help lib locale sess style templates tmp VERSION index.html
WWWDIR?=	${PREFIX}/www/${SHORTNAME}
SUB_FILES=	pkg-message

.include <bsd.port.pre.mk>

do-configure:
	@${RM} ${WRKSRC}/config/shells

do-install:
	-@${MKDIR} ${WWWDIR}
	@cd ${WRKSRC} && ${COPYTREE_SHARE} "${LAMDATA}" ${WWWDIR}
.if !defined(NOPORTDOCS)
	-@${MKDIR} ${DOCSDIR}
	@cd ${WRKSRC} && ${COPYTREE_SHARE} "${PORTDOCS}" ${DOCSDIR}
.endif

post-install:
	@if [ ! -f ${WWWDIR}/config/config.cfg ]; then \
	    ${CP} -p ${WWWDIR}/config/config.cfg_sample ${WWWDIR}/config/config.cfg ; \
	fi
	@if [ ! -f ${WWWDIR}/config/lam.conf ]; then \
	    ${CP} -p ${WWWDIR}/config/lam.conf_sample ${WWWDIR}/config/lam.conf ; \
	fi
	@${FIND} ${WWWDIR} -type f -exec ${CHMOD} 644 {} \;
	@${FIND} ${WWWDIR} -type d -exec ${CHMOD} 755 {} \;
	@${CHOWN} -R ${WWWOWN}:${WWWGRP} ${WWWDIR}/config ${WWWDIR}/sess ${WWWDIR}/tmp
	@${CHMOD} 755 ${WWWDIR}/lib/lamdaemon.pl
	@${LN} -sf /etc/shells ${WWWDIR}/config/shells
	@${CAT} ${PKGMESSAGE}

.include <bsd.port.post.mk>