View | Details | Raw Unified | Return to bug 73317
Collapse All | Expand All

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

Return to bug 73317