summaryrefslogtreecommitdiff
path: root/security/isakmpd/Makefile
blob: 10f3debeed091e8747c0bc6fd1d8edee7f6f5078 (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
53
54
55
56
57
58
59
# $NetBSD: Makefile,v 1.44 2010/01/17 12:02:40 wiz Exp $
#

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

MAINTAINER=		pkgsrc-users@NetBSD.org
COMMENT=		OpenBSD IKE daemon

PKG_DESTDIR_SUPPORT=	user-destdir

# 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

BUILD_TARGET=		depend all

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

PKG_SYSCONFSUBDIR=	isakmpd

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

SUBST_CLASSES+=		ssl
SUBST_STAGE.ssl=	pre-configure
SUBST_MESSAGE.ssl=	Fixing references to buildlink directories
SUBST_FILES.ssl=	sysdep/netbsd/Makefile.sysdep
SUBST_VARS.ssl=		BUILDLINK_PREFIX.openssl

SUBST_CLASSES+=		cfg
SUBST_STAGE.cfg=	pre-configure
SUBST_MESSAGE.cfg=	Fixing references to configuration directory
SUBST_FILES.cfg=	conf.h policy.h ike_auth.h
SUBST_SED.cfg=		-e "s+/etc/isakmpd+${PKG_SYSCONFDIR}+g"

SUBST_CLASSES+=		man
SUBST_STAGE.man=	pre-configure
SUBST_MESSAGE.man=	Fixing manual page references
SUBST_FILES.man=	isakmpd.8 isakmpd.conf.5 isakmpd.policy.5
SUBST_SED.man=		-e "s+/usr/share/ipsec+${PREFIX}/share/examples+g"
SUBST_SED.man+=		-e "s+/etc/isakmpd+${PKG_SYSCONFDIR}+g"

SUBST_CLASSES+=		destdir
SUBST_STAGE.destdir=	pre-configure
SUBST_MESSAGE.destdir=	Fixing ownership for DESTDIR installations
SUBST_FILES.destdir=	Makefile apps/certpatch/Makefile
SUBST_VARS.destdir=	BINOWN BINGRP MANOWN MANGRP

INSTALLATION_DIRS+=	sbin ${PKGMANDIR}/man5 ${PKGMANDIR}/cat5
INSTALLATION_DIRS+=	${PKGMANDIR}/man8 ${PKGMANDIR}/cat8

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