summaryrefslogtreecommitdiff
path: root/mail/roundcube/Makefile.common
blob: c945a2cb4be8f9f340e8d53cd2768e496a63ac0f (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
# $NetBSD: Makefile.common,v 1.3 2016/12/05 16:13:51 taca Exp $
#
# used by mail/roundcube/Makefile
# used by mail/roundcube/plugins.mk

DISTNAME=	roundcubemail-${RC_VERS}
CATEGORIES=	mail
MASTER_SITES=	${MASTER_SITE_GITHUB:=roundcube/}
GITHUB_PROJECT=	roundcubemail
HOMEPAGE=	http://roundcube.net/

RC_VERS=	1.2.3

USE_LANGUAGES=		# none
USE_TOOLS+=		pax
NO_BUILD=		yes

PKG_SYSCONFSUBDIR?=	roundcube

PKG_GROUPS_VARS+=	WWW_GROUP
PKG_USERS_VARS=		WWW_USER
BUILD_DEFS+=		VARBASE WWW_USER WWW_GROUP APACHE_USER APACHE_GROUP

RCDIR=			share/roundcube
EGDIR=			share/examples/roundcube
DOCDIR=			share/doc/roundcube

MESSAGE_SUBST+=		DOCDIR="${PREFIX}/${DOCDIR}" \
			 PKG_SYSCONFDIR=${PKG_SYSCONFDIR}
MESSAGE_SUBST+=		VARBASE=${VARBASE} RCDIR="${PREFIX}/${RCDIR}"
FILES_SUBST+=		RCDIR="${PREFIX}/${RCDIR}"

.for d in ${CONF_PLUGINS}
INSTALLATION_DIRS+=	${EGDIR}/plugins/${d}
.endfor

.include "../../mail/roundcube/options.mk"
.include "../../lang/php/phpversion.mk"

post-install:
.for f in ${CONF_PLUGINS}
	cd ${DESTDIR}${PREFIX} && \
	${TEST} -f ${EGDIR}/plugins/${f}/config.inc.php || \
		${MV} ${RCDIR}/plugins/${f}/config.inc.php.dist \
			${EGDIR}/plugins/${f}/config.inc.php
.endfor