Merge from vendor branch TNF:
[pkgsrc.git] / security / isakmpd / Makefile
1 # $NetBSD: Makefile,v 1.43 2008/12/19 21:09:11 heinz Exp $
2 #
3
4 DISTNAME=               isakmpd-20030903
5 PKGREVISION=            6
6 CATEGORIES=             security net
7 MASTER_SITES=           ftp://ftp.NetBSD.org/pub/NetBSD/packages/distfiles/LOCAL_PORTS/
8
9 MAINTAINER=             pkgsrc-users@NetBSD.org
10 COMMENT=                OpenBSD IKE daemon
11
12 PKG_DESTDIR_SUPPORT=    user-destdir
13
14 # this is not compatible with cross build - there's no other way
15 .if !exists(/usr/include/netinet6/ipsec.h)
16 PKG_FAIL_REASON+=       "${PKGNAME} requires ipsec-ready ${OPSYS}"
17 .endif
18
19 WRKSRC=                 ${WRKDIR}/isakmpd
20
21 BUILD_TARGET=           depend all
22
23 MAKE_ENV+=              BINDIR=${PREFIX}/sbin MANDIR=${PREFIX}/${PKGMANDIR}
24
25 PKG_SYSCONFSUBDIR=      isakmpd
26
27 RCD_SCRIPTS=            isakmpd
28 RCD_SCRIPT_WRK.isakmpd= ${WRKDIR}/isakmpd.sh
29
30 SUBST_CLASSES+=         ssl
31 SUBST_STAGE.ssl=        pre-configure
32 SUBST_MESSAGE.ssl=      Fixing references to buildlink directories
33 SUBST_FILES.ssl=        sysdep/netbsd/Makefile.sysdep
34 SUBST_VARS.ssl=         BUILDLINK_PREFIX.openssl
35
36 SUBST_CLASSES+=         cfg
37 SUBST_STAGE.cfg=        pre-configure
38 SUBST_MESSAGE.cfg=      Fixing references to configuration directory
39 SUBST_FILES.cfg=        conf.h policy.h ike_auth.h
40 SUBST_SED.cfg=          -e "s+/etc/isakmpd+${PKG_SYSCONFDIR}+g"
41
42 SUBST_CLASSES+=         man
43 SUBST_STAGE.man=        pre-configure
44 SUBST_MESSAGE.man=      Fixing manual page references
45 SUBST_FILES.man=        isakmpd.8 isakmpd.conf.5 isakmpd.policy.5
46 SUBST_SED.man=          -e "s+/usr/share/ipsec+${PREFIX}/share/examples+g"
47 SUBST_SED.man+=         -e "s+/etc/isakmpd+${PKG_SYSCONFDIR}+g"
48
49 SUBST_CLASSES+=         destdir
50 SUBST_STAGE.destdir=    pre-configure
51 SUBST_MESSAGE.destdir=  Fixing ownership for DESTDIR installations
52 SUBST_FILES.destdir=    Makefile apps/certpatch/Makefile
53 SUBST_VARS.destdir=     BINOWN BINGRP MANOWN MANGRP
54
55 INSTALLATION_DIRS+=     sbin ${PKGMANDIR}/man5 ${PKGMANDIR}/cat5
56 INSTALLATION_DIRS+=     ${PKGMANDIR}/man8 ${PKGMANDIR}/cat8
57
58 .include "../../security/openssl/buildlink3.mk"
59 .include "../../mk/bsd.pkg.mk"