aboutsummaryrefslogtreecommitdiff
path: root/net/zebra/Makefile
blob: 0cf18f4ed8167f68c45f6426d854d9f268c10d55 (plain) (blame)
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# Created by: Andreas Klemm <andreas@klemm.gtn.com>
# $FreeBSD$

PORTNAME=	zebra
PORTVERSION=	0.95a
PORTREVISION=	2
CATEGORIES=	net ipv6
MASTER_SITES=	ftp://ftp.pop-pr.rnp.br/pub/GNU/ftp.zebra.org/zebra/ \
		ftp://ftp.ripe.net/mirrors/sites/ftp.zebra.org/pub/zebra/ \
		http://ftp.sunet.se/pub/network/zebra/

MAINTAINER=	ports@FreeBSD.org
COMMENT=	Free RIPv1, RIPv2, OSPFv2, BGP4 route software (server/reflector)

LICENSE=	GPLv2 LGPL21
LICENSE_COMB=	multi

CONFLICTS=	openbgpd-[0-9]* quagga-[0-9]* quagga-re-[0-9]* openospfd-[0-9]*

SUB_FILES=	pkg-message zebractl
SUB_LIST=	BGPDARGS=${BGPDARGS} \
		OSPFDARGS=${OSPFDARGS} \
		OSPF6DARGS=${OSPFDARGS} \
		RIPDARGS=${RIPDARGS} \
		RIPNGDARGS=${RIPNGDARGS} \
		ZEBRAARGS=${ZEBRAARGS}
USE_SUBMAKE=	yes
GNU_CONFIGURE=	yes
CONFIGURE_ARGS+=	--sysconfdir=${PREFIX}/etc/zebra
MAKE_JOBS_SAFE=	yes

SCRIPTS_ENV=	WRKDIRPREFIX=${WRKDIRPREFIX}

OPTIONS_DEFINE=	IPV6 PAM OSPFNSSA SNMP TCPZEBRA BGPD OSPF6D OSPFD RIPD RIPNGD VTYSH

PAM_DESC=	PAM authentication for vtysh
OSPFNSSA_DESC=	undergoing NSSA feature
TCPZEBRA_DESC=	TCP/IP socket connection
BGPD_DESC=	BGPD support
OSPF6D_DESC=	OSPF6D support
OSPFD_DESC=	OSPFD support
RIPD_DESC=	RIPD support
RIPNGD_DESC=	RIPNGD support
VTYSH_DESC=	VTYSH support

OPTIONS_DEFAULT=	IPV6 BGPD OSPF6D OSPFD RIPD RIPNGD VTYSH
NO_OPTIONS_SORT=	yes

MAN1=		vtysh.1
MAN8=		bgpd.8 ospf6d.8 ospfd.8 ripd.8 ripngd.8 zebra.8
INFO=		zebra

BGPDARGS?=	-d
OSPFDARGS?=	-d
OSPF6DARGS?=	-d
RIPDARGS?=	-d
RIPNGDARGS?=	-d
ZEBRAARGS?=	-d

.include <bsd.port.options.mk>

.if empty(PORT_OPTIONS:MIPV6)
CONFIGURE_ARGS+=--disable-ipv6
WITHOUT_OSPF6D=	yes
WITHOUT_RIPNGD=	yes
.endif

.if ${PORT_OPTIONS:MPAM}
CONFIGURE_ARGS+=--with-libpam
.endif

.if ${PORT_OPTIONS:MOSPFNSSA}
CONFIGURE_ARGS+=--enable-nssa
.endif

.if ${PORT_OPTIONS:MSNMP}
CONFIGURE_ARGS+=--enable-snmp
LIB_DEPENDS+=snmp.4:${PORTSDIR}/net-mgmt/net-snmp4:install
.endif

.if ${PORT_OPTIONS:MTCPZEBRA}
CONFIGURE_ARGS+=--enable-tcp-zebra
.endif

.if ${PORT_OPTIONS:MBGPD}
PLIST_SUB+=	BGPD=""
.else
CONFIGURE_ARGS+=--disable-bgpd
PLIST_SUB+=	BGPD="@comment "
.endif

.if ${PORT_OPTIONS:MOSPF6D}
PLIST_SUB+=	OSPF6D=""
.else
CONFIGURE_ARGS+=--disable-ospf6d
PLIST_SUB+=	OSPF6D="@comment "
.endif

.if ${PORT_OPTIONS:MOSPFD}
PLIST_SUB+=	OSPF6D=""
PLIST_SUB+=	OSPFD=""
.else
CONFIGURE_ARGS+=--disable-ospfd
PLIST_SUB+=	OSPFD="@comment "
.endif

.if ${PORT_OPTIONS:MRIPD}
PLIST_SUB+=	RIPD=""
.else
CONFIGURE_ARGS+=--disable-ripd
PLIST_SUB+=	RIPD="@comment "
.endif

.if ${PORT_OPTIONS:MRIPNGD}
PLIST_SUB+=	RIPNGD=""
.else
CONFIGURE_ARGS+=--disable-ripngd
PLIST_SUB+=	RIPNGD="@comment "
.endif

.if ${PORT_OPTIONS:MVTYSH}
PLIST_SUB+=	VTYSH=""
CONFIGURE_ARGS+=--enable-vtysh
.else
PLIST_SUB+=	VTYSH="@comment "
.endif

post-install:
	@( cd ${WRKSRC}/doc; ${RM} -f zebra*info*; ${MAKE} zebra.info install )
	@${ECHO_MSG} "===>     installing zebra startup file..."
	${INSTALL_SCRIPT} ${WRKDIR}/zebractl ${PREFIX}/sbin/zebractl
	@${ECHO_MSG} "done."
	@${CAT} ${PKGMESSAGE}

.include <bsd.port.mk>