2012-01-19 14:26:55 +01:00
|
|
|
# $NetBSD: Makefile,v 1.44 2012/01/19 13:26:55 adam Exp $
|
2004-02-10 13:39:17 +01:00
|
|
|
|
2012-01-19 14:26:55 +01:00
|
|
|
DISTNAME= openvpn-2.2.2
|
2005-08-17 21:55:57 +02:00
|
|
|
CATEGORIES= net
|
2010-11-30 09:50:17 +01:00
|
|
|
MASTER_SITES= http://swupdate.openvpn.net/community/releases/
|
2004-02-10 13:39:17 +01:00
|
|
|
|
2006-03-04 22:28:51 +01:00
|
|
|
MAINTAINER= pkgsrc-users@NetBSD.org
|
2005-08-17 21:55:57 +02:00
|
|
|
HOMEPAGE= http://openvpn.net/
|
|
|
|
COMMENT= Easy-to-use SSL VPN daemon
|
2009-05-19 10:59:00 +02:00
|
|
|
LICENSE= gnu-gpl-v2
|
2004-02-10 13:39:17 +01:00
|
|
|
|
2008-02-20 05:24:17 +01:00
|
|
|
PKG_DESTDIR_SUPPORT= user-destdir
|
|
|
|
|
2005-08-17 21:55:57 +02:00
|
|
|
USE_LIBTOOL= yes
|
2011-04-28 09:27:24 +02:00
|
|
|
USE_TOOLS+= grep:run
|
|
|
|
GNU_CONFIGURE= yes
|
|
|
|
CONFIGURE_ARGS+= --disable-debug
|
|
|
|
CONFIGURE_ARGS+= --disable-dependency-tracking
|
|
|
|
CONFIGURE_ARGS+= --enable-password-save
|
|
|
|
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
|
|
|
|
|
2005-08-17 21:55:57 +02:00
|
|
|
USE_OLD_DES_API= yes
|
|
|
|
TEST_TARGET= check
|
2004-02-10 13:39:17 +01:00
|
|
|
|
2005-08-17 21:55:57 +02:00
|
|
|
PKG_SYSCONFSUBDIR= openvpn
|
|
|
|
DATADIR= ${PREFIX}/share/${PKGBASE}
|
|
|
|
EGDIR= ${PREFIX}/share/examples/${PKGBASE}
|
2007-06-21 23:44:42 +02:00
|
|
|
EASYRSADIR= ${DATADIR}/easy-rsa
|
2005-08-17 21:55:57 +02:00
|
|
|
RCD_SCRIPTS= openvpn
|
2004-02-10 13:39:17 +01:00
|
|
|
|
2011-04-28 09:27:24 +02:00
|
|
|
INSTALLATION_DIRS= ${DATADIR}/easy-rsa
|
|
|
|
INSTALLATION_DIRS+= ${EGDIR}/config
|
|
|
|
INSTALLATION_DIRS+= ${EGDIR}/keys
|
|
|
|
INSTALLATION_DIRS+= ${EGDIR}/scripts
|
2005-08-17 21:55:57 +02:00
|
|
|
|
2008-02-20 05:24:17 +01:00
|
|
|
REPLACE_SH= easy-rsa/2.0/*
|
2007-06-21 23:44:42 +02:00
|
|
|
SUBST_CLASSES+= pkitool
|
|
|
|
SUBST_STAGE.pkitool= post-build
|
|
|
|
SUBST_MESSAGE.pkitool= Fixing up default paths to grep & openssl in pkitool.
|
|
|
|
SUBST_FILES.pkitool= easy-rsa/2.0/pkitool
|
2009-09-21 14:33:31 +02:00
|
|
|
SUBST_SED.pkitool= -e "s|\\(GREP\\)=.*|\\1=\""${GREP:Q}"\"|"
|
2010-09-05 22:33:48 +02:00
|
|
|
SUBST_SED.pkitool+= -e "s|\\(OPENSSL\\)=.*|\\1=\""${SSLBASE:Q}/bin/openssl"\"|"
|
2005-08-17 21:55:57 +02:00
|
|
|
|
2011-08-03 10:33:32 +02:00
|
|
|
.include "../../mk/bsd.prefs.mk"
|
|
|
|
|
|
|
|
OPENVPN_USER?= openvpn
|
|
|
|
OPENVPN_GROUP?= openvpn
|
|
|
|
PKG_GROUPS= ${OPENVPN_GROUP}
|
|
|
|
PKG_USERS= ${OPENVPN_USER}:${OPENVPN_GROUP}
|
|
|
|
PKG_GECOS.${OPENVPN_USER}= OpenVPN\ server\ user
|
|
|
|
|
2009-10-30 20:06:06 +01:00
|
|
|
post-install: post-install-pam
|
2010-09-05 22:33:48 +02:00
|
|
|
set -e; cd ${WRKSRC}/easy-rsa/2.0; for file in [a-zR]*; do \
|
2005-08-17 21:55:57 +02:00
|
|
|
case $$file in \
|
2011-07-08 12:15:31 +02:00
|
|
|
*.orig|tmp) ;; \
|
2007-06-21 23:44:42 +02:00
|
|
|
[A-Z]*|*.cnf|vars) \
|
2010-09-05 22:33:48 +02:00
|
|
|
${INSTALL_DATA} $$file ${DESTDIR}${EASYRSADIR} ;; \
|
|
|
|
*) ${INSTALL_SCRIPT} $$file ${DESTDIR}${EASYRSADIR} ;; \
|
2005-08-17 21:55:57 +02:00
|
|
|
esac; \
|
|
|
|
done
|
2010-09-05 22:33:48 +02:00
|
|
|
set -e; cd ${WRKSRC}/sample-config-files; for file in *; do \
|
|
|
|
${INSTALL_DATA} $$file ${DESTDIR}${EGDIR}/config; \
|
2005-08-17 21:55:57 +02:00
|
|
|
done
|
2010-09-05 22:33:48 +02:00
|
|
|
set -e; cd ${WRKSRC}/sample-scripts; for file in *; do \
|
|
|
|
${INSTALL_DATA} $$file ${DESTDIR}${EGDIR}/scripts; \
|
2005-08-17 21:55:57 +02:00
|
|
|
done
|
2010-09-05 22:33:48 +02:00
|
|
|
set -e; cd ${WRKSRC}/sample-keys; for file in *; do \
|
|
|
|
${INSTALL_DATA} $$file ${DESTDIR}${EGDIR}/keys; \
|
2005-08-17 21:55:57 +02:00
|
|
|
done
|
|
|
|
|
2009-09-21 14:33:31 +02:00
|
|
|
.include "options.mk"
|
2011-04-28 09:27:24 +02:00
|
|
|
|
|
|
|
# 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"
|
|
|
|
|
|
|
|
.include "../../mk/bsd.prefs.mk"
|
|
|
|
.if ${OPSYS} == "SunOS"
|
|
|
|
.include "../../net/solaris-tap/buildlink3.mk"
|
|
|
|
.endif
|
|
|
|
.include "../../archivers/lzo/buildlink3.mk"
|
|
|
|
.include "../../security/openssl/buildlink3.mk"
|
|
|
|
.include "../../mk/pthread.buildlink3.mk"
|
2004-02-10 13:39:17 +01:00
|
|
|
.include "../../mk/bsd.pkg.mk"
|