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

(-)Makefile (-37 / +22 lines)
Lines 11-17 Link Here
11
MAINTAINER=	ehaupt@FreeBSD.org
11
MAINTAINER=	ehaupt@FreeBSD.org
12
COMMENT=	Client for Cisco 3000 VPN Concentrator
12
COMMENT=	Client for Cisco 3000 VPN Concentrator
13
13
14
LICENSE=	GPLv2 BSD2CLAUSE
14
LICENSE=	GPLv2+ BSD2CLAUSE
15
LICENSE_COMB=	multi
15
LICENSE_COMB=	multi
16
LICENSE_FILE=	${WRKSRC}/COPYING
16
LICENSE_FILE=	${WRKSRC}/COPYING
17
17
Lines 29-65 Link Here
29
SHEBANG_FILES=	makeman.pl
29
SHEBANG_FILES=	makeman.pl
30
30
31
PORTDOCS=	README TODO
31
PORTDOCS=	README TODO
32
MANPAGE8=	vpnc.8
33
32
34
MAKE_ENV+=	BINS="${EXTRABUILDS}"
33
MAKE_ENV=	BINS="${EXTRABUILDS}"
35
34
36
OPTIONS_DEFINE=	DECRYPT SSL CISCOVERSION DOCS
35
OPTIONS_DEFINE=	DECRYPT SSL CISCOVERSION DOCS
36
OPTIONS_DEFAULT=DECRYPT
37
OPTIONS_SUB=	yes
37
38
38
DECRYPT_DESC=		cisco-decypt password decrypt utility
39
CISCOVERSION_DESC=	Mask linux presentation string
39
CISCOVERSION_DESC=	Mask linux presentation string
40
CISCOVERSION_CFLAGS=	-DCISCO_PATCH_VERSION
40
41
41
OPTIONS_DEFAULT=DECRYPT
42
DECRYPT_DESC=	cisco-decypt password decrypt utility
43
DECRYPT_VARS=	EXTRABUILDS+=cisco-decrypt
42
44
43
.include <bsd.port.options.mk>
45
SSL_VARS=	NO_PACKAGE="binary linked against OpenSSL must not be redistributed"
46
SSL_CFLAGS=	-DOPENSSL_GPL_VIOLATION
47
SSL_LDFLAGS=	-lcrypto
44
48
45
.if ${PORT_OPTIONS:MDECRYPT}
46
MANPAGE1=	cisco-decrypt.1
47
EXTRABUILDS+=	cisco-decrypt
48
PLIST_SUB+=	DECRYPT=""
49
.else
50
PLIST_SUB+=	DECRYPT="@comment "
51
.endif
52
53
.if ${PORT_OPTIONS:MSSL}
54
NO_PACKAGE=	binary linked against OpenSSL must not be redistributed
55
CFLAGS+=	-DOPENSSL_GPL_VIOLATION
56
LDFLAGS+=	-lcrypto
57
.endif
58
59
.if ${PORT_OPTIONS:MCISCOVERSION}
60
CFLAGS+=	-DCISCO_PATCH_VERSION
61
.endif
62
63
post-patch:
49
post-patch:
64
	@${REINPLACE_CMD} \
50
	@${REINPLACE_CMD} \
65
		-e 's|.*%%FREEBSD_IPLEN_FIX%%.*|#define NEED_IPLEN_FIX 1|' \
51
		-e 's|.*%%FREEBSD_IPLEN_FIX%%.*|#define NEED_IPLEN_FIX 1|' \
Lines 66-88 Link Here
66
		${WRKSRC}/sysdep.h
52
		${WRKSRC}/sysdep.h
67
	@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|' ${WRKSRC}/config.c
53
	@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|' ${WRKSRC}/config.c
68
	@${REINPLACE_CMD} -e 's|\(/etc/vpnc\)|${PREFIX}\1|' \
54
	@${REINPLACE_CMD} -e 's|\(/etc/vpnc\)|${PREFIX}\1|' \
69
		${WRKSRC}/${MANPAGE8}.template
55
		${WRKSRC}/vpnc.8.template
70
56
71
do-install:
57
do-install:
72
	${INSTALL_PROGRAM} -m 751 ${WRKSRC}/vpnc ${STAGEDIR}${PREFIX}/sbin/vpnc
58
	${INSTALL_PROGRAM} ${WRKSRC}/vpnc ${STAGEDIR}${PREFIX}/sbin/vpnc
73
.if ${PORT_OPTIONS:MDECRYPT}
59
	${INSTALL_SCRIPT} ${WRKSRC}/vpnc-disconnect \
74
	${INSTALL_PROGRAM} ${WRKSRC}/cisco-decrypt ${STAGEDIR}${PREFIX}/bin
75
	${INSTALL_MAN} ${WRKSRC}/${MANPAGE1} ${STAGEDIR}${MANPREFIX}/man/man1
76
.endif
77
	${INSTALL_SCRIPT} -m 751 ${WRKSRC}/vpnc-disconnect \
78
		${STAGEDIR}${PREFIX}/sbin/vpnc-disconnect
60
		${STAGEDIR}${PREFIX}/sbin/vpnc-disconnect
79
	${INSTALL_DATA} -m 600 ${WRKSRC}/vpnc.conf \
61
	${INSTALL_DATA} ${WRKSRC}/vpnc.conf \
80
		${STAGEDIR}${PREFIX}/etc/vpnc.conf.sample
62
		${STAGEDIR}${PREFIX}/etc/vpnc.conf.sample
81
.if !exists(${STAGEDIR}${PREFIX}/etc/vpnc.conf)
63
	${INSTALL_MAN} ${WRKSRC}/vpnc.8 ${STAGEDIR}${MANPREFIX}/man/man8
82
	${INSTALL_DATA} -m 600 ${WRKSRC}/vpnc.conf ${STAGEDIR}${PREFIX}/etc
64
83
.endif
65
do-install-DOCS-on:
84
	${INSTALL_MAN} ${WRKSRC}/${MANPAGE8} ${STAGEDIR}${MANPREFIX}/man/man8
85
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
66
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
86
	@cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
67
	cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
87
68
69
do-install-DECRYPT-on:
70
	${INSTALL_PROGRAM} ${WRKSRC}/cisco-decrypt ${STAGEDIR}${PREFIX}/bin
71
	${INSTALL_MAN} ${WRKSRC}/cisco-decrypt.1 ${STAGEDIR}${MANPREFIX}/man/man1
72
88
.include <bsd.port.mk>
73
.include <bsd.port.mk>
(-)pkg-plist (-1 / +1 lines)
Lines 3-6 Link Here
3
man/man8/vpnc.8.gz
3
man/man8/vpnc.8.gz
4
%%DECRYPT%%bin/cisco-decrypt
4
%%DECRYPT%%bin/cisco-decrypt
5
%%DECRYPT%%man/man1/cisco-decrypt.1.gz
5
%%DECRYPT%%man/man1/cisco-decrypt.1.gz
6
@sample etc/vpnc.conf.sample
6
@sample(,,700) etc/vpnc.conf.sample

Return to bug 234787