diff options
author | ehaupt <ehaupt@FreeBSD.org> | 2008-02-28 02:26:36 +0800 |
---|---|---|
committer | ehaupt <ehaupt@FreeBSD.org> | 2008-02-28 02:26:36 +0800 |
commit | 3d061e8abc9bbb8dcae5d26ec4af5b055024ead8 (patch) | |
tree | bc231e9a284a2b72008860f5dab44ccf05f3c2f8 /security/vpnc | |
parent | 7f18ae01781d1a4e281869959b37152b12e720f5 (diff) | |
download | freebsd-ports-gnome-3d061e8abc9bbb8dcae5d26ec4af5b055024ead8.tar.gz freebsd-ports-gnome-3d061e8abc9bbb8dcae5d26ec4af5b055024ead8.tar.zst freebsd-ports-gnome-3d061e8abc9bbb8dcae5d26ec4af5b055024ead8.zip |
- Update to 0.5.1
- Take maintainership
- Optional install cisco-decrypt utility
- Optional build with hybrid support
Diffstat (limited to 'security/vpnc')
-rw-r--r-- | security/vpnc/Makefile | 65 | ||||
-rw-r--r-- | security/vpnc/distinfo | 6 | ||||
-rw-r--r-- | security/vpnc/files/patch-Makefile | 38 | ||||
-rw-r--r-- | security/vpnc/files/patch-config.c | 13 | ||||
-rw-r--r-- | security/vpnc/files/patch-vpnc-script | 10 | ||||
-rw-r--r-- | security/vpnc/pkg-plist | 7 |
6 files changed, 88 insertions, 51 deletions
diff --git a/security/vpnc/Makefile b/security/vpnc/Makefile index dc45c976204b..c3a40b7c9826 100644 --- a/security/vpnc/Makefile +++ b/security/vpnc/Makefile @@ -6,48 +6,67 @@ # PORTNAME= vpnc -PORTVERSION= 0.4.0 -PORTREVISION= 3 +PORTVERSION= 0.5.1 CATEGORIES= security -MASTER_SITES= http://www.unix-ag.uni-kl.de/~massar/vpnc/ +MASTER_SITES= http://www.unix-ag.uni-kl.de/~massar/vpnc/ \ + http://critical.ch/distfiles/ \ + http://energy.critical.ch/distfiles/ -MAINTAINER= ports@FreeBSD.org +MAINTAINER= ehaupt@FreeBSD.org COMMENT= Client for Cisco 3000 VPN Concentrator LIB_DEPENDS= gcrypt.13:${PORTSDIR}/security/libgcrypt USE_GMAKE= yes -ALL_TARGET= vpnc - +USE_PERL5_BUILD=yes USE_RC_SUBR= vpnc -USE_PERL5_BUILD= yes -PLIST_FILES= sbin/vpnc \ - sbin/vpnc-script \ - sbin/vpnc-disconnect \ - etc/vpnc.conf.sample +ALL_TARGET= all PORTDOCS= README TODO MAN8= vpnc.8 +OPTIONS+= DECRYPT "cisco-decypt password decrypt utility" on +OPTIONS+= SSL "OpenSSL certificate support (hybrid only)" off + +MAKE_ENV+= LDFLAGS="${LDFLAGS}" CFLAGS="${CFLAGS}" CC="${CC}" \ + BINS="${EXTRABUILDS}" + .include <bsd.port.pre.mk> +.if defined(WITH_DECRYPT) +MAN1= cisco-decrypt.1 +EXTRABUILDS+= cisco-decrypt +PLIST_SUB+= DECRYPT="" +.else +PLIST_SUB+= DECRYPT="@comment " +.endif + +.if defined(WITH_SSL) +NO_PACKAGE= binary linked against OpenSSL must not be redistributed +CFLAGS+= -DOPENSSL_GPL_VIOLATION +LDFLAGS+= -lcrypto +.endif + post-patch: - @${REINPLACE_CMD} -e \ - 's|%%PREFIX%%|${PREFIX}|' ${WRKSRC}/config.c - @${REINPLACE_CMD} -e \ - 's|%%PREFIX%%|${PREFIX}|;s|%%CC%%|${CC}|;s|%%CFLAGS%%|${CFLAGS}|' \ - ${WRKSRC}/Makefile + @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|' ${WRKSRC}/config.c + @${REINPLACE_CMD} -e 's|\(/etc/vpnc\)|${PREFIX}\1|' \ + ${WRKSRC}/${MAN8}.template do-install: - @${INSTALL_PROGRAM} -m 751 ${WRKSRC}/vpnc ${PREFIX}/sbin/vpnc - @${INSTALL_SCRIPT} -m 751 ${WRKSRC}/vpnc-script ${PREFIX}/sbin/vpnc-script - @${INSTALL_SCRIPT} -m 751 ${WRKSRC}/vpnc-disconnect ${PREFIX}/sbin/vpnc-disconnect - @${INSTALL_DATA} -m 600 ${WRKSRC}/vpnc.conf ${PREFIX}/etc/vpnc.conf.sample -.if !defined(NO_INSTALL_MANPAGES) - @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|' ${WRKSRC}/vpnc.8 - @${INSTALL_MAN} ${WRKSRC}/vpnc.8 ${PREFIX}/man/man8 + ${INSTALL_PROGRAM} -m 751 ${WRKSRC}/vpnc ${PREFIX}/sbin/vpnc +.if defined(WITH_DECRYPT) + ${INSTALL_PROGRAM} ${WRKSRC}/cisco-decrypt ${PREFIX}/bin + ${INSTALL_MAN} ${WRKSRC}/${MAN1} ${MANPREFIX}/man/man1 .endif + ${INSTALL_SCRIPT} -m 751 ${WRKSRC}/vpnc-script ${PREFIX}/sbin/vpnc-script + ${INSTALL_SCRIPT} -m 751 ${WRKSRC}/vpnc-disconnect ${PREFIX}/sbin/vpnc-disconnect + ${INSTALL_DATA} -m 600 ${WRKSRC}/vpnc.conf ${PREFIX}/etc/vpnc.conf.sample +.if !exists(${PREFIX}/etc/vpnc.conf) + ${INSTALL_DATA} -m 600 ${WRKSRC}/vpnc.conf ${PREFIX}/etc +.endif + ${INSTALL_MAN} ${WRKSRC}/${MAN8} ${MANPREFIX}/man/man8 + .if !defined(NOPORTDOCS) ${MKDIR} ${DOCSDIR} @cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR} diff --git a/security/vpnc/distinfo b/security/vpnc/distinfo index e6267c6e0460..2f13312a8d10 100644 --- a/security/vpnc/distinfo +++ b/security/vpnc/distinfo @@ -1,3 +1,3 @@ -MD5 (vpnc-0.4.0.tar.gz) = 604807e7dd90fce00a4e2344ee29c76d -SHA256 (vpnc-0.4.0.tar.gz) = f91c6bc2547cb503fde4f244ba82304553fec3954c65521482f8db2491700586 -SIZE (vpnc-0.4.0.tar.gz) = 75491 +MD5 (vpnc-0.5.1.tar.gz) = 7a8e94dbe94f39a4fd89b72e0125f66f +SHA256 (vpnc-0.5.1.tar.gz) = f63660bd020bbe6a39e8eb67ad60c54d719046c6198a6834371d098947f9a2ed +SIZE (vpnc-0.5.1.tar.gz) = 91496 diff --git a/security/vpnc/files/patch-Makefile b/security/vpnc/files/patch-Makefile index 4fe7fd320930..1f76965f4765 100644 --- a/security/vpnc/files/patch-Makefile +++ b/security/vpnc/files/patch-Makefile @@ -1,21 +1,33 @@ ---- ./Makefile.orig 2007-02-19 21:51:12.000000000 +0100 -+++ ./Makefile 2007-07-24 16:45:36.000000000 +0200 -@@ -20,7 +20,7 @@ - # $Id: Makefile 148 2007-02-19 20:51:14Z Maurice Massar $ +--- Makefile.orig 2007-09-06 22:05:15.000000000 +0200 ++++ Makefile 2008-02-27 19:17:28.000000000 +0100 +@@ -20,14 +20,14 @@ + # $Id: Makefile 236 2007-09-05 20:40:59Z Joerg Mayer $ DESTDIR= -PREFIX=/usr/local -+PREFIX=%%PREFIX%% - ETCDIR=/etc/vpnc +-ETCDIR=/etc/vpnc ++PREFIX?=/usr/local ++ETCDIR=$(PREFIX)/etc/ BINDIR=$(PREFIX)/bin SBINDIR=$(PREFIX)/sbin -@@ -34,8 +34,7 @@ - VERSION := $(shell sh mk-version) - RELEASE_VERSION := $(shell cat VERSION) + MANDIR=$(PREFIX)/share/man + + SRCS = sysdep.c vpnc-debug.c isakmp-pkt.c tunip.c config.c dh.c math_group.c supp.c +-BINS = vpnc cisco-decrypt ++BINS += vpnc + OBJS = $(addsuffix .o,$(basename $(SRCS))) + BINOBJS = $(addsuffix .o,$(BINS)) + BINSRCS = $(addsuffix .c,$(BINS)) +@@ -49,9 +49,9 @@ + #OPENSSL_GPL_VIOLATION = -DOPENSSL_GPL_VIOLATION + #OPENSSLLIBS = -lcrypto -CC=gcc --CFLAGS += -W -Wall -O3 -Wmissing-declarations -Wwrite-strings -g -+CC=%%CC%% - CPPFLAGS = -DVERSION=\"$(VERSION)\" - LDFLAGS = -g $(shell libgcrypt-config --libs) +-CFLAGS ?= -O3 -g +-CFLAGS += -W -Wall -Wmissing-declarations -Wwrite-strings ++CC?=gcc ++#CFLAGS ?= -O3 -g ++#CFLAGS += -W -Wall -Wmissing-declarations -Wwrite-strings CFLAGS += $(shell libgcrypt-config --cflags) + CPPFLAGS += -DVERSION=\"$(VERSION)\" $(OPENSSL_GPL_VIOLATION) + LDFLAGS ?= -g diff --git a/security/vpnc/files/patch-config.c b/security/vpnc/files/patch-config.c index 4bd18adbc238..23dd0b636e1c 100644 --- a/security/vpnc/files/patch-config.c +++ b/security/vpnc/files/patch-config.c @@ -1,6 +1,6 @@ ---- config.c.orig Fri Feb 16 18:22:06 2007 -+++ config.c Tue Mar 13 16:11:53 2007 -@@ -251,12 +251,12 @@ +--- config.c.orig 2007-09-10 22:39:48.000000000 +0200 ++++ config.c 2008-02-26 11:33:02.000000000 +0100 +@@ -267,12 +267,12 @@ static const char *config_def_script(void) { @@ -15,22 +15,21 @@ } static const char *config_def_vendor(void) -@@ -485,7 +485,7 @@ +@@ -538,7 +538,7 @@ { char *realname; - asprintf(&realname, "%s%s%s", index(name, '/') ? "" : "/etc/vpnc/", name, add_dot_conf ? ".conf" : ""); -+ asprintf(&realname, "%s%s%s", index(name, '/') ? "" : "%%PREFIX%%/etc/vpnc/", name, add_dot_conf ? ".conf" : ""); ++ asprintf(&realname, "%s%s%s", index(name, '/') ? "" : "%%PREFIX%%/etc/", name, add_dot_conf ? ".conf" : ""); return realname; } -@@ -701,8 +701,8 @@ +@@ -757,8 +757,7 @@ } if (!got_conffile) { - read_config_file("/etc/vpnc/default.conf", config, 1); - read_config_file("/etc/vpnc.conf", config, 1); -+ read_config_file("%%PREFIX%%/etc/vpnc/default.conf", config, 1); + read_config_file("%%PREFIX%%/etc/vpnc.conf", config, 1); } diff --git a/security/vpnc/files/patch-vpnc-script b/security/vpnc/files/patch-vpnc-script index e1f037b85b00..d4f4e4914d41 100644 --- a/security/vpnc/files/patch-vpnc-script +++ b/security/vpnc/files/patch-vpnc-script @@ -1,6 +1,6 @@ ---- vpnc-script.orig Tue Mar 13 16:03:06 2007 -+++ vpnc-script Tue Mar 13 16:03:24 2007 -@@ -31,8 +31,8 @@ +--- vpnc-script.orig 2008-02-26 00:42:09.000000000 +0100 ++++ vpnc-script 2008-02-26 00:43:41.000000000 +0100 +@@ -56,8 +56,8 @@ ;; esac @@ -8,6 +8,6 @@ -RESOLV_CONF_BACKUP=/var/run/vpnc/resolv.conf-backup +DEFAULT_ROUTE_FILE=/var/run/vpnc.defaultroute +RESOLV_CONF_BACKUP=/var/run/vpnc.resolv.conf-backup + FULL_SCRIPTNAME=/usr/local/sbin/vpnc + SCRIPTNAME=`basename $FULL_SCRIPTNAME` - # some systems, eg. Darwin & FreeBSD, prune /var/run on boot - if ! [ -d "/var/run/vpnc" ]; then diff --git a/security/vpnc/pkg-plist b/security/vpnc/pkg-plist new file mode 100644 index 000000000000..157b58c22756 --- /dev/null +++ b/security/vpnc/pkg-plist @@ -0,0 +1,7 @@ +sbin/vpnc +sbin/vpnc-script +sbin/vpnc-disconnect +%%DECRYPT%%bin/cisco-decrypt +@unexec if cmp -s %D/etc/vpnc.conf %D/etc/vpnc.conf.sample; then rm -f %D/etc/vpnc.conf; fi +etc/vpnc.conf.sample +@exec [ -f %B/vpnc.conf ] || cp %B/%f %B/vpnc.conf |