summaryrefslogtreecommitdiff
path: root/net/phpldapadmin/Makefile
blob: c22381fd834867941ff3a853cf3416b60c558c3e (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
PORTNAME=	phpldapadmin
PORTVERSION=	1.2.6.3
PORTREVISION=	1
CATEGORIES=	net www
PKGNAMESUFFIX=	${PHP_PKGNAMESUFFIX}

MAINTAINER=	ports@bsdserwis.com
COMMENT=	PHP application to administer LDAP over the web

LICENSE=	GPLv2
LICENSE_FILE=	${WRKSRC}/LICENSE

USES=		cpe php:web,flavors tar:tgz
CPE_VENDOR=	phpldapadmin_project
USE_GITHUB=	yes
GH_ACCOUNT=	leenooks
GH_PROJECT=	phpLDAPadmin
USE_PHP=	gettext hash iconv ldap openssl pcre session xml

NO_ARCH=	yes
NO_BUILD=	yes

OPTIONS_DEFINE=	MCRYPT

MCRYPT_DESC=	Use pecl-mcrypt for password hashing
MCRYPT_USE=	PHP=mcrypt

.include <bsd.port.options.mk>

GROUPS?=	${WWWGRP}
CFGDIR=		config
CFGFILE=	config.php

PLIST=		${WRKDIR}/plist
PLIST_FILES=	'@sample(,${GROUPS},640) ${WWWDIR_REL}/config/config.php.example ${WWWDIR_REL}/config/config.php'

SUB_LIST+=	PKGNAME=${PKGNAME}
SUB_FILES+=	pkg-message

.SILENT:

.include <bsd.port.pre.mk>

post-patch:
	cd ${WRKSRC} ;							    \
	${CP} lib/Attribute.php lib/PLAAttribute.php;			    \
	${FIND} . ! -type d ! -name ${CFGFILE}.example ! -name .cvsignore   \
	    ! -name .gitignore ! -name *.orig 				    \
	    ! -name Attribute.php | ${SORT} |				    \
	    ${SED} -e "s!^\.!${WWWDIR_REL}!"			>${PLIST} ;

do-install:
	cd ${WRKSRC} ;					 \
	for src in $$( ${FIND} . ! -name .cvsignore	 \
		! -name .gitignore ! -name *.orig	 \
		! -name Attribute.php) ; do		 \
	    dst=${STAGEDIR}${WWWDIR}$${src#.} ;		 \
	    if ${TEST} -d $$src ; then			 \
		${MKDIR} $$dst ;			 \
	    else					 \
		${INSTALL_DATA} $$src $$dst ;		 \
	    fi						 \
	done

.include <bsd.port.post.mk>