summaryrefslogtreecommitdiff
path: root/www/usermanager/Makefile
blob: 633d4ddba97950664741e1993e0027c7e4c8f4ce (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
# Created by: Daniel Gerzo <danger@FreeBSD.org>
# $FreeBSD$

PORTNAME=	UserManager
PORTVERSION=	2.1
CATEGORIES=	www ftp
MASTER_SITES=	http://machiel.generaal.net/files/pureftpd/
DISTNAME=	ftp_v${PORTVERSION}

MAINTAINER=	danger@FreeBSD.org
COMMENT=	Easily create, change, or delete virtual PureFTPd users

WRKSRC=		${WRKDIR}/ftp

USE_PHP=	mysql pcre posix session

NO_BUILD=	yes

PKGMESSAGE=	${WRKDIR}/pkg-message
PLIST_SUB+=	INSTALLDIR=${INSTALLDIR}

_INSTDIR=	www/data/UserManager
INSTALLDIR?=	${_INSTDIR}

pre-fetch:
.if ${INSTALLDIR} == ${_INSTDIR}
	@${ECHO_MSG} ""
	@${ECHO_MSG} "Define INSTALLDIR to override default of '${_INSTDIR}'."
	@${ECHO_MSG} ""
.endif

post-patch:
	@${SED} -e 's|%%PREFIX%%|${PREFIX}|g' \
	 -e 's|%%INSTALLDIR%%|${INSTALLDIR}|g' ${FILESDIR}/pkg-message.in > ${PKGMESSAGE}

do-install:
	@${MKDIR} ${STAGEDIR}${PREFIX}/${INSTALLDIR}
	@${CP} -Rp ${WRKSRC}/* ${STAGEDIR}${PREFIX}/${INSTALLDIR}
	@${CHMOD} 666 ${STAGEDIR}${PREFIX}/${INSTALLDIR}/config.php
	@${MV} ${STAGEDIR}${PREFIX}/${INSTALLDIR}/config.php \
		${STAGEDIR}${PREFIX}/${INSTALLDIR}/config.php.sample

.include <bsd.port.mk>