# Created by: Alexander Moisseev <moiseev@mezonplus.ru>
# $FreeBSD: tags/RELEASE_10_2_0/mail/roundcube-contextmenu/Makefile 384355 2015-04-20 12:45:20Z robak $

PORTNAME=	contextmenu
PORTVERSION=	2.1.2
CATEGORIES=	mail
PKGNAMEPREFIX=	roundcube-

MAINTAINER=	moiseev@mezonplus.ru
COMMENT=	RoundCube webmail contextmenu plugin

LICENSE=	GPLv3

RUN_DEPENDS=	roundcube>=1.1:${PORTSDIR}/mail/roundcube

NO_BUILD=	yes

USE_GITHUB=	yes
GH_ACCOUNT=	JohnDoh
GH_PROJECT=	Roundcube-Plugin-Context-Menu

PLUGINDIR=	${WWWDIR:S,/${PORTNAME}$$,,}/roundcube/plugins/${PORTNAME}
RCDIR_REL=	${WWWDIR_REL:S,/${PORTNAME}$$,,}/roundcube
PLIST_SUB=	RCDIR_REL="${RCDIR_REL}"

# This target is only meant to be used by the port maintainer.
x-generate-plist: build
	make makeplist | \
	${SED} \
	    -e "s,^\(@dirrm\)try\( %%RCDIR_REL%%/plugins/contextmenu\),\1\2," \
	    >${.CURDIR}/pkg-plist.tmp

do-install:
	${MKDIR} ${STAGEDIR}${PLUGINDIR}
	cd ${WRKSRC} && ${COPYTREE_SHARE} \* ${STAGEDIR}${PLUGINDIR}

.include <bsd.port.mk>
