File:  [cvs.NetBSD.org] / pkgsrc / net / openvpn / Makefile
Revision 1.77: download - view: text, annotated - select for diffs
Fri May 22 10:56:30 2020 UTC (4 years, 6 months ago) by adam
Branches: MAIN
CVS tags: pkgsrc-2020Q3-base, pkgsrc-2020Q3, pkgsrc-2020Q2-base, pkgsrc-2020Q2, HEAD
revbump after updating security/nettle

# $NetBSD: Makefile,v 1.77 2020/05/22 10:56:30 adam Exp $

DISTNAME=	${OPENVPN_DISTNAME}
PKGREVISION=	1
CATEGORIES=	net
MASTER_SITES=	${OPENVPN_MASTER_SITES}
EXTRACT_SUFX=	.tar.xz

MAINTAINER=	pkgsrc-users@NetBSD.org
HOMEPAGE=	https://openvpn.net/
COMMENT=	Easy-to-use SSL VPN daemon
LICENSE=	gnu-gpl-v2

PKG_DESTDIR_SUPPORT=	user-destdir

USE_LIBTOOL=		yes
USE_TOOLS+=		grep:run pkg-config
GNU_CONFIGURE=		yes
CONFIGURE_ARGS+=	--disable-debug
CONFIGURE_ARGS+=	--disable-dependency-tracking
CONFIGURE_ARGS+=	--sysconfdir=${PKG_SYSCONFDIR}

TEST_TARGET=		check

PKG_SYSCONFSUBDIR=	openvpn
EGDIR=			${PREFIX}/share/examples/${PKGBASE}
RCD_SCRIPTS=		openvpn

INSTALLATION_DIRS+=	${EGDIR}/config
INSTALLATION_DIRS+=	${EGDIR}/keys
INSTALLATION_DIRS+=	${EGDIR}/scripts

SMF_METHODS=	openvpn

.include "../../mk/bsd.prefs.mk"

PKG_GROUPS=		${OPENVPN_GROUP}
PKG_USERS=		${OPENVPN_USER}:${OPENVPN_GROUP}
PKG_GECOS.${OPENVPN_USER}= OpenVPN\ server\ user

MESSAGE_SUBST+=	OPENVPN_PLUGINSDIR=${PREFIX}/${OPENVPN_PLUGINSDIR}

post-install:
	${RUN} cd ${WRKSRC}/sample/sample-config-files; for file in *; do \
		${INSTALL_DATA} $$file ${DESTDIR}${EGDIR}/config;	   \
	done
	${RUN} cd ${WRKSRC}/sample/sample-scripts; for file in *; do	   \
		${INSTALL_DATA} $$file ${DESTDIR}${EGDIR}/scripts;	   \
	done
	${RUN} cd ${WRKSRC}/sample/sample-keys; for file in *; do	   \
		${INSTALL_DATA} $$file ${DESTDIR}${EGDIR}/keys;		   \
	done

.include "options.mk"
.include "../../net/openvpn/Makefile.common"

# OpenVPN 2.x has a shared module "plugin" architecture that allows
# inserting callbacks into the server for various tasks.
DL_AUTO_VARS=		yes
.include "../../mk/dlopen.buildlink3.mk"

.if ${OPSYS} == "SunOS"
.include "../../net/solaris-tap/buildlink3.mk"
.endif
.include "../../archivers/lz4/buildlink3.mk"
.include "../../archivers/lzo/buildlink3.mk"
.include "../../security/openssl/buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

CVSweb <webmaster@jp.NetBSD.org>