summaryrefslogtreecommitdiff
path: root/security/isakmpd/Makefile
blob: 1701dd561ff07d66fe04e9814ca7038d55a8f336 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# $NetBSD: Makefile,v 1.32 2004/03/26 02:27:52 wiz Exp $
#

DISTNAME=		isakmpd-20030903
PKGREVISION=		2
CATEGORIES=		security net
MASTER_SITES=		ftp://ftp.NetBSD.org/pub/NetBSD/packages/distfiles/LOCAL_PORTS/

MAINTAINER=		itojun@kame.net
COMMENT=		OpenBSD IKE daemon

# this is not compatible with cross build - there's no other way
.if !exists(/usr/include/netinet6/ipsec.h)
PKG_FAIL_REASON+=	"${PKGNAME} requires ipsec-ready ${OPSYS}"
.endif

WRKSRC=			${WRKDIR}/isakmpd

ALL_TARGET=		depend all
USE_BUILDLINK2=		YES
USE_PKGINSTALL=		YES

MAKE_ENV+=		BINDIR=${PREFIX}/sbin MANDIR=${PREFIX}/man

PKG_SYSCONFSUBDIR=	isakmpd

RCD_SCRIPTS=		isakmpd
RCD_SCRIPT_WRK.isakmpd=	${WRKDIR}/isakmpd.sh

pre-configure:
	@${ECHO_MSG} "Fixing references to buildlink directories"
	@for i in ${WRKSRC}/sysdep/netbsd/Makefile.sysdep; do		\
		${MV} $${i} $${i}.unfixed;				\
		${SED} "s+@BUILDLINK_PREFIX.openssl@+${BUILDLINK_PREFIX.openssl}+g" \
			< $${i}.unfixed > $${i};			\
	done
	@${ECHO_MSG} "Fixing references to configuration directory"
	@for i in conf.h policy.h ike_auth.h; do			\
		${MV} ${WRKSRC}/$${i} ${WRKSRC}/$${i}.unfixed;		\
		${SED} "s+/etc/isakmpd+${PKG_SYSCONFDIR}+g"		\
			< ${WRKSRC}/$${i}.unfixed > ${WRKSRC}/$${i};	\
	done
	@${ECHO_MSG} "Fixing manual page references"
	@for i in isakmpd.8 isakmpd.conf.5 isakmpd.policy.5; do		\
		${MV} ${WRKSRC}/$${i} ${WRKSRC}/$${i}.unfixed;		\
		${SED} -e "s+/usr/share/ipsec+${PREFIX}/share/examples+g" \
			-e "s+/etc/isakmpd+${PKG_SYSCONFDIR}+g"		\
			< ${WRKSRC}/$${i}.unfixed > ${WRKSRC}/$${i};	\
	done

.include "../../security/openssl/buildlink2.mk"
.include "../../mk/bsd.pkg.mk"