summaryrefslogtreecommitdiff
path: root/net/radius/Makefile
blob: 11502b9e90aca4f5bbef7e392e4eaf6a6bda5df5 (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.1.1.1 1999/03/22 03:15:09 kim Exp $
#

DISTNAME=	radius-3.6B
CATEGORIES=	net
MASTER_SITES=	ftp://ftp.merit.edu/radius/releases/ \
		http://www.mr.net/~bradley/radius/
DISTFILES=	${EXTRACT_ONLY} ${EXTRA_FILES}

MAINTAINER=	kim@tac.nyc.ny.us
HOMEPAGE=	http://www.merit.edu/aaa/

EXTRACT_ONLY=	radius.3.6B.basic.tar.gz \
		radius.3.6B-skey.tar.gz
EXTRA_FILES=	radius.3.6B-ftp.tar \
		radius.3.6B-simultd.tar

DIST_SUBDIR=	radius
NO_WRKSUBDIR=	yes

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

.ifmake do-build
.if exists(/usr/lib/libkrb.a) && \
    (defined(MAKE_EBONES) || defined(MAKE_KERBEROS4))
CFLAGS+=	-DM_KERB -I/usr/include/kerberosIV
RADLIBS=	-lkrb -ldes
.endif
.endif

post-extract:
	@cd ${WRKSRC} ; \
	for i in ${EXTRA_FILES} ; \
	do \
	    ${GTAR} -xf ${_DISTDIR}/$${i} ; \
	done

pre-patch:
	@cd ${WRKSRC} ; \
	${PATCH} -sp < prediff.diff ; \
	for i in ftp simult skey ; \
	do \
	    ${PATCH} -sp < rad.$${i}.diff ; \
	done

EXAMPLE_DIR=	${PREFIX}/share/examples/radius

do-install:
	@cd ${WRKSRC} ; \
	${MAKE} man-install ; \
	${MAKE} install ; \
	${MAKE} util-install ; \
	${MKDIR} ${EXAMPLE_DIR} ; \
	${MAKE} config-install RADDB_INSDIR=${EXAMPLE_DIR}

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

.ifmake do-build
CFLAGS+=	-DHAVE_SETVBUF -DNOSHADOW

MAKE_ENV+=	RADLIBS="${RADLIBS} -lskey"
MAKE_ENV+=	LIBS=-lcrypt

MAKE_ENV+=	GNUZIP="`${ECHO} ${GZIP_CMD} | ${AWK} '{print $$1}'`"
.endif

.ifmake do-install
MAKE_ENV+=	INSTALL="${INSTALL} -c"
.endif