summaryrefslogtreecommitdiff
path: root/net/ppp-mppe/Makefile
blob: 5ba3e5587915c6da7b32594ac9fd7317681abd71 (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
60
61
62
63
64
65
66
67
68
69
# $NetBSD: Makefile,v 1.26 2004/05/23 15:09:06 heinz Exp $

DISTNAME=	ppp-2.3.9
PKGNAME=	ppp-mppe-2.3.9
PKGREVISION=	3
CATEGORIES=	net
MASTER_SITES=	ftp://cs.anu.edu.au/pub/software/ppp/

MAINTAINER=	cube@NetBSD.org
HOMEPAGE=	http://www.moretonbay.com/vpn/releases/
COMMENT=	PPP daemon and LKM with MPPE - Microsoft Point-to-Point Encryption

CONFLICTS+=	ppp-2.*

ONLY_FOR_PLATFORM=	NetBSD-*-*

OPENSSL_VERS=	0.9.6m
OPENSSL_SRC=	${_PKGSRCDIR}/security/openssl/${WRKDIR:T}/openssl-${OPENSSL_VERS}

HAS_CONFIGURE=  yes
MANCOMPRESSED_IF_MANZ=	yes

.include "../../mk/bsd.prefs.mk"

BUILD_DEFS+=	MANINSTALL

post-extract:
	if [ ! -r ${OPENSSL_SRC}/crypto/rc4 ]; then			\
		cd ../../security/openssl && ${MAKE} extract;		\
	fi
	@${LN} -sf ${OPENSSL_SRC}/include/openssl ${WRKSRC}/pppd/openssl
	@${CP} ${OPENSSL_SRC}/crypto/md32_common.h ${WRKSRC}/pppd/md32_common.h
	@${CP} ${OPENSSL_SRC}/crypto/sha/sha.h ${WRKSRC}/pppd/sha.h
	@${CP} ${OPENSSL_SRC}/crypto/sha/sha1dgst.c ${WRKSRC}/pppd/sha1dgst.c
	@${CP} ${OPENSSL_SRC}/crypto/sha/sha_locl.h ${WRKSRC}/pppd/sha_locl.h
	@${MV} ${WRKSRC}/pppd/md4.h ${WRKSRC}/pppd/md4.h.hide
	@${MV} ${WRKSRC}/pppd/md5.h ${WRKSRC}/pppd/md5.h.hide

	@${MKDIR} ${WRKSRC}/netbsd-1.4
	@${CP} ${OPENSSL_SRC}/crypto/rc4/rc4_skey.c ${WRKSRC}/netbsd-1.4/rc4_skey.c
	@${CP} ${OPENSSL_SRC}/crypto/rc4/rc4.h ${WRKSRC}/netbsd-1.4/rc4.h
	@${CP} ${OPENSSL_SRC}/crypto/rc4/rc4_locl.h ${WRKSRC}/netbsd-1.4/rc4_locl.h
	@${CP} ${OPENSSL_SRC}/crypto/rc4/rc4_enc.c ${WRKSRC}/netbsd-1.4/rc4_enc.c
	@${CP} ${OPENSSL_SRC}/crypto/sha/sha1dgst.c ${WRKSRC}/netbsd-1.4/sha1dgst.c
	@${CP} ${OPENSSL_SRC}/crypto/sha/sha_locl.h ${WRKSRC}/netbsd-1.4/sha_locl.h
	@${CP} ${OPENSSL_SRC}/crypto/sha/sha.h ${WRKSRC}/netbsd-1.4/sha.h

pre-install:
	${INSTALL_PROGRAM_DIR} ${PREFIX}/lkm

pre-clean:
	cd ../../security/openssl && ${MAKE} clean

SYSDIR?=	${BSDSRCDIR}/sys
MAKE_ENV+=	SYSDIR="${SYSDIR}"

# until PR 5377 is addressed, we need kernel src around to build lkm's
pre-build:
.if !exists(${SYSDIR}/lib/libkern/libkern.h)
	@${ECHO} "This package requires the kernel source to build its lkm."
	@${ECHO} "Install it in ${SYSDIR} or set the SYSDIR variable to its location."
	@${FALSE}
.endif

.include "../../mk/bsd.pkg.mk"

.for OPT in ${MANINSTALL}
PLIST_SRC+=	${PKGDIR}/PLIST.${OPT}
.endfor