mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-27 00:57:50 +00:00
- replace FILESDIR/patch-* with REINPLACE_CMD ...
- replace pkg-plist with PORTDOCS and PLIST_FILES - add USE_RC_SUBR support - rndcontrol retired on 5.x already, so only show messages on 4.x PR: 73317 Submitted by: leeym Approved by: maintainer timeout
This commit is contained in:
parent
42991629a0
commit
a63390009c
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=134072
@ -17,33 +17,38 @@ COMMENT= VPN daemon offering transparent blowfish encryption between networks
|
||||
WRKSRC= ${WRKDIR}/${PORTNAME}
|
||||
HAS_CONFIGURE= yes
|
||||
USE_REINPLACE= yes
|
||||
USE_RC_SUBR= yes
|
||||
|
||||
DOCFILES= README FAQ.TXT SPEED.TXT VERSIONS
|
||||
PLIST_FILES= sbin/vpnd etc/rc.d/vpnd.sh etc/vpnd.conf.sample etc/vpnd.chat.sample
|
||||
PORTDOCS= README FAQ.TXT SPEED.TXT VERSIONS
|
||||
|
||||
post-patch:
|
||||
@${MV} ${WRKSRC}/Makefile.FreeBSD.in ${WRKSRC}/Makefile.FreeBSD.in_tmp
|
||||
@${SED} -e "s:^ETC_DIR=:ETC_DIR= ${PREFIX}/etc:" \
|
||||
< ${WRKSRC}/Makefile.FreeBSD.in_tmp > ${WRKSRC}/Makefile.FreeBSD.in
|
||||
|
||||
pre-configure:
|
||||
${REINPLACE_CMD} -e "s@-O3@${CFLAGS}@g; s@gcc@${CC}@g" \
|
||||
${WRKSRC}/configure
|
||||
.for f in README globals.c vpnd.c vpnd.conf
|
||||
@${REINPLACE_CMD} -e 's,/etc,${PREFIX}/etc,g' ${WRKSRC}/${f}
|
||||
.endfor
|
||||
@${REINPLACE_CMD} -e "s,machine/param.h,sys/param.h,g" ${WRKSRC}/vpnd.h
|
||||
@${REINPLACE_CMD} -e "s@-O3@${CFLAGS}@g; s@gcc@${CC}@g" ${WRKSRC}/${CONFIGURE_SCRIPT}
|
||||
|
||||
do-install:
|
||||
@${INSTALL_PROGRAM} ${WRKSRC}/vpnd ${PREFIX}/sbin/vpnd
|
||||
@${INSTALL_SCRIPT} ${FILESDIR}/vpnd.sh ${PREFIX}/etc/rc.d/vpnd.sh
|
||||
@${INSTALL_DATA} ${WRKSRC}/vpnd.conf ${PREFIX}/etc/vpnd.conf.sample
|
||||
@${INSTALL_DATA} ${WRKSRC}/vpnd.chat ${PREFIX}/etc/vpnd.chat.sample
|
||||
.if !defined(NOPORTDOCS)
|
||||
@${INSTALL} -d -m 0755 ${DOCSDIR}
|
||||
.for i in ${DOCFILES}
|
||||
.for i in ${PORTDOCS}
|
||||
@${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR}
|
||||
.endfor
|
||||
.endif
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
post-install:
|
||||
.if ${OSVERSION} < 500000
|
||||
@${ECHO} "================================================================================"
|
||||
@${ECHO} "Make sure you set up a few IRQ's for random generation with rndcontrol before"
|
||||
@${ECHO} "trying to generate a master key file."
|
||||
@${ECHO} "================================================================================"
|
||||
.endif
|
||||
|
||||
.include <bsd.port.mk>
|
||||
.include <bsd.port.post.mk>
|
||||
|
@ -1,13 +0,0 @@
|
||||
--- Makefile.FreeBSD.in.orig Fri Nov 19 17:50:24 1999
|
||||
+++ Makefile.FreeBSD.in Sun Mar 25 01:39:56 2001
|
||||
@@ -5,7 +5,9 @@
|
||||
CRYPTOFLG=
|
||||
.endif
|
||||
|
||||
-CFLAGS=-c $(CBASE) $(DEBUG) $(CRYPTOFLG) -DMD5_HMAC_FAST -DSHA1_HMAC_FAST -DRMD160_HMAC_FAST
|
||||
+ETC_DIR=
|
||||
+
|
||||
+CFLAGS=-c $(CBASE) $(DEBUG) $(CRYPTOFLG) -DMD5_HMAC_FAST -DSHA1_HMAC_FAST -DRMD160_HMAC_FAST -DETC_DIR=\"$(ETC_DIR)\"
|
||||
|
||||
OBJS1=vpnd.o globals.o parse.o slip.o route.o chatter.o serial.o die.o \
|
||||
signal.o tcp.o external.o syslog.o sequencer.o icmp.o rxtx.o crypto.o \
|
@ -1,12 +0,0 @@
|
||||
--- README.old Sun Mar 25 03:05:42 2001
|
||||
+++ README Sun Mar 25 03:06:04 2001
|
||||
@@ -370,8 +370,8 @@
|
||||
========
|
||||
|
||||
Copy vpnd (and randomd if it is required) to any directory you like.
|
||||
-Copy vpnd.conf and vpnd.chat to /etc or copy those files to any other
|
||||
-directory when you use the -f option of vpnd (see later). Note that
|
||||
+Copy vpnd.conf and vpnd.chat to /usr/local/etc or copy those files to any
|
||||
+other directory when you use the -f option of vpnd (see later). Note that
|
||||
vpnd.conf and vpnd.chat must be at least mode 644 and be owned by
|
||||
root:root.
|
@ -1,14 +0,0 @@
|
||||
--- globals.c.old Sun Mar 25 01:19:51 2001
|
||||
+++ globals.c Sun Mar 25 01:20:58 2001
|
||||
@@ -69,9 +69,9 @@
|
||||
anchor->pty=anchor->tty=anchor->peer=anchor->server=anchor->ping=
|
||||
anchor->serial=anchor->lock=-1;
|
||||
anchor->speed=B115200;
|
||||
- anchor->conffile="/etc/vpnd.conf";
|
||||
+ anchor->conffile=ETC_DIR "/vpnd.conf";
|
||||
anchor->randomdev="/dev/random";
|
||||
- anchor->keyfile="/etc/vpnd.key";
|
||||
+ anchor->keyfile=ETC_DIR "/vpnd.key";
|
||||
anchor->lkeyfile="vpnd.lcl.key";
|
||||
anchor->rkeyfile="vpnd.rmt.key";
|
||||
anchor->cipher=BLOWFISH;
|
@ -1,21 +0,0 @@
|
||||
--- vpnd.c.old Sun Mar 25 01:58:06 2001
|
||||
+++ vpnd.c Sun Mar 25 03:02:26 2001
|
||||
@@ -41,7 +41,8 @@
|
||||
" vpnd -c <extended-master-key-file>\n" \
|
||||
USAGE1 \
|
||||
" -h prints this info\n" \
|
||||
- " -m creates master key file (default is /etc/vpnd.key),\n" \
|
||||
+ " -m creates master key file (default is " ETC_DIR \
|
||||
+ "/vpnd.key),\n" \
|
||||
" note that the file must not yet exist\n" \
|
||||
" -x creates extended master key files named vpnd.lcl.key\n" \
|
||||
" and vpnd.rmt.key in the given directory,\n" \
|
||||
@@ -65,7 +66,7 @@
|
||||
" -l allow dns lookups so host names can be used\n" \
|
||||
" -n do not become daemon\n" \
|
||||
" -t do modem init chat test\n" \
|
||||
- " -f use configfile instead of /etc/vpnd.conf\n" \
|
||||
+ " -f use configfile instead of " ETC_DIR "/vpnd.conf\n" \
|
||||
COMPRESSINFO
|
||||
|
||||
/*
|
@ -1,56 +0,0 @@
|
||||
--- vpnd.conf.old Sun Mar 25 03:04:06 2001
|
||||
+++ vpnd.conf Sun Mar 25 03:04:43 2001
|
||||
@@ -121,7 +121,7 @@
|
||||
# which is called asynchonously when the vpn
|
||||
# link is established
|
||||
#
|
||||
-# example: linkup /etc/vpnd.linkup
|
||||
+# example: linkup /usr/local/etc/vpnd.linkup
|
||||
#
|
||||
# linkdown <process-pathname>
|
||||
#
|
||||
@@ -129,7 +129,7 @@
|
||||
# which is called asynchonously when the vpn
|
||||
# link is terminated
|
||||
#
|
||||
-# example: linkdown /etc/vpnd.linkdown
|
||||
+# example: linkdown /usr/local/etc/vpnd.linkdown
|
||||
#
|
||||
# ---------------------------------------------------
|
||||
# basic operation mode
|
||||
@@ -170,7 +170,7 @@
|
||||
#
|
||||
# optional, defines the pathname of the shared secret file which
|
||||
# must be created with the -m option of vpnd, if not given default
|
||||
-# of /etc/vpnd.key is used
|
||||
+# of /usr/local/etc/vpnd.key is used
|
||||
#
|
||||
# example: keyfile /var/adm/mysecret.key
|
||||
#
|
||||
@@ -285,7 +285,7 @@
|
||||
# interface is established, the SLIP interface
|
||||
# name is the parameter for the process
|
||||
#
|
||||
-# example: slipup /etc/vpnd.slipup
|
||||
+# example: slipup /usr/local/etc/vpnd.slipup
|
||||
#
|
||||
# slipdown <process-pathname>
|
||||
#
|
||||
@@ -294,7 +294,7 @@
|
||||
# link is terminated, the SLIP interface
|
||||
# name is the parameter for the process
|
||||
#
|
||||
-# example: slipdown /etc/vpnd.slipdown
|
||||
+# example: slipdown /usr/local/etc/vpnd.slipdown
|
||||
#
|
||||
#
|
||||
# ---------------------------------------------------
|
||||
@@ -334,7 +334,7 @@
|
||||
# optional, pathname of file containing modem initialization
|
||||
# chat sequence, default is not to perform init chat
|
||||
#
|
||||
-# example: modemchat /etc/vpnd.chat
|
||||
+# example: modemchat /usr/local/etc/vpnd.chat
|
||||
#
|
||||
# ---------------------------------------------------
|
||||
# TCP/IP parameters (available with version 1.0.2)
|
@ -1,11 +0,0 @@
|
||||
--- vpnd.h.orig Sun Oct 20 14:36:45 2002
|
||||
+++ vpnd.h Sun Oct 20 14:37:04 2002
|
||||
@@ -52,7 +52,7 @@
|
||||
#include <net/if.h>
|
||||
#include <net/slip.h>
|
||||
#include <net/if_var.h>
|
||||
-#include <machine/param.h>
|
||||
+#include <sys/param.h>
|
||||
#include <sys/mbuf.h>
|
||||
#include <net/slcompress.h>
|
||||
#include <net/if_slvar.h>
|
24
security/vpnd/files/vpnd.sh
Normal file
24
security/vpnd/files/vpnd.sh
Normal file
@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# PROVIDE: vpnd
|
||||
# REQUIRE: NETWORKING SERVERS
|
||||
# BEFORE: DAEMON
|
||||
# KEYWORD: FreeBSD shutdown
|
||||
#
|
||||
# Note:
|
||||
# Set "vpnd_enable=yes" in either /etc/rc.conf, /etc/rc.conf.local or
|
||||
# /etc/rc.conf.d/vpnd to make this script actually do something.
|
||||
#
|
||||
# Please see rc.conf(5) and rc(8) for further details.
|
||||
#
|
||||
|
||||
vpnd_enable=${vpnd_enable:-"NO"}
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name=vpnd
|
||||
command=/usr/local/sbin/vpnd
|
||||
rcvar=`set_rcvar`
|
||||
load_rc_config ${name}
|
||||
|
||||
run_rc_command "$1"
|
@ -1,8 +0,0 @@
|
||||
sbin/vpnd
|
||||
etc/vpnd.conf.sample
|
||||
etc/vpnd.chat.sample
|
||||
%%PORTDOCS%%share/doc/vpnd/README
|
||||
%%PORTDOCS%%share/doc/vpnd/FAQ.TXT
|
||||
%%PORTDOCS%%share/doc/vpnd/SPEED.TXT
|
||||
%%PORTDOCS%%share/doc/vpnd/VERSIONS
|
||||
%%PORTDOCS%%@dirrm share/doc/vpnd
|
Loading…
Reference in New Issue
Block a user