summaryrefslogtreecommitdiff
path: root/package/quagga/Makefile
blob: 95cf6e288bb0410cf98da6d9f15c64c44584ae59 (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
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
# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.

include $(ADK_TOPDIR)/rules.mk

PKG_NAME:=		quagga
PKG_VERSION:=		1.2.0
PKG_RELEASE:=		1
PKG_HASH:=		1043644d37975d9f920b76c593368cbe36ca43e27eb57cff316ee80ccb31dce3
PKG_DESCR:=		routing software package
PKG_SECTION:=		net/route
PKG_BUILDDEP:=		readline ncurses c-ares
PKG_DEPENDS:=		c-ares
PKG_NEEDS:=		threads
PKG_URL:=		http://www.quagga.net/
PKG_SITES:=		http://download.savannah.gnu.org/releases/quagga/

DISTFILES:=		$(PKG_NAME)-$(PKG_VERSION).tar.gz

PKG_SUBPKGS:=		QUAGGA QUAGGA_BGPD QUAGGA_OSPFD QUAGGA_OSPF6D
PKG_SUBPKGS+=		QUAGGA_RIPNGD QUAGGA_RIPD QUAGGA_VTYSH
PKGSD_QUAGGA_BGPD:=	bgp daemon
PKGSN_QUAGGA_BGPD:=	quagga
PKGSD_QUAGGA_OSPFD:=	ospf daemon
PKGSN_QUAGGA_OSPFD:=	quagga
PKGSD_QUAGGA_OSPF6D:=	ospf ipv6 daemon
PKGSN_QUAGGA_OSPF6D:=	quagga
PKGSD_QUAGGA_RIPNGD:=	ripng daemon
PKGSN_QUAGGA_RIPNGD:=	quagga
PKGSD_QUAGGA_RIPD:=	rip daemon
PKGSN_QUAGGA_RIPD:=	quagga
PKGSD_QUAGGA_VTYSH:=	vtysh utility
PKGSN_QUAGGA_VTYSH:=	quagga

PKG_CFLINE_QUAGGA:=	select BUSYBOX_PIDOF

include $(ADK_TOPDIR)/mk/package.mk

$(eval $(call PKG_template,QUAGGA,quagga,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKG_DESCR),$(PKG_SECTION)))
$(eval $(call PKG_template,QUAGGA_BGPD,quagga-bgpd,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKGSD_QUAGGA_BGPD),$(PKG_SECTION)))
$(eval $(call PKG_template,QUAGGA_OSPFD,quagga-ospfd,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKGSD_QUAGGA_OSPFD),$(PKG_SECTION)))
$(eval $(call PKG_template,QUAGGA_OSPF6D,quagga-ospf6d,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKGSD_QUAGGA_OSPF6D),$(PKG_SECTION)))
$(eval $(call PKG_template,QUAGGA_RIPNGD,quagga-ripngd,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKGSD_QUAGGA_RIPNGD),$(PKG_SECTION)))
$(eval $(call PKG_template,QUAGGA_RIPD,quagga-ripd,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKGSD_QUAGGA_RIPD),$(PKG_SECTION)))
$(eval $(call PKG_template,QUAGGA_VTYSH,quagga-vtysh,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKGSD_QUAGGA_VTYSH),$(PKG_SECTION)))

CONFIGURE_ENV+=		quagga_cv_ipforward_method="proc"
CONFIGURE_ARGS+=	--localstatedir=/var/run/quagga \
			--sysconfdir=/etc/quagga \
			--enable-vtysh \
			--enable-user=quagga \
			--enable-group=quagga \
			--disable-pie \
			--disable-babeld \
			--disable-doc \
			--enable-multipath=8

quagga-install:
	$(INSTALL_DIR) $(IDIR_QUAGGA)/etc/quagga
	$(INSTALL_DIR) $(IDIR_QUAGGA)/usr/lib
	$(INSTALL_DIR) $(IDIR_QUAGGA)/usr/sbin
	$(CP) $(WRKINST)/usr/lib/libzebra.so.* $(IDIR_QUAGGA)/usr/lib/
	$(INSTALL_BIN) $(WRKINST)/usr/sbin/zebra \
		$(WRKINST)/usr/sbin/watchquagga $(IDIR_QUAGGA)/usr/sbin/
	$(CP) $(WRKINST)/etc/quagga/zebra.conf.sample \
		$(IDIR_QUAGGA)/etc/quagga/zebra.conf

quagga-bgpd-install:
	$(INSTALL_DIR) $(IDIR_QUAGGA_BGPD)/usr/sbin
	$(CP) $(WRKINST)/usr/sbin/bgpd $(IDIR_QUAGGA_BGPD)/usr/sbin/
	$(CP) $(WRKINST)/etc/quagga/bgpd.conf.sample \
		$(IDIR_QUAGGA)/etc/quagga/bgpd.conf

quagga-ospfd-install:
	$(INSTALL_DIR) $(IDIR_QUAGGA_OSPFD)/usr/lib
	$(INSTALL_DIR) $(IDIR_QUAGGA_OSPFD)/usr/sbin
	$(CP) $(WRKINST)/usr/lib/libospf.so.* $(IDIR_QUAGGA_OSPFD)/usr/lib/
	$(CP) $(WRKINST)/usr/sbin/ospfd $(IDIR_QUAGGA_OSPFD)/usr/sbin/
	$(CP) $(WRKINST)/etc/quagga/ospfd.conf.sample \
		$(IDIR_QUAGGA)/etc/quagga/ospfd.conf

quagga-ospf6d-install:
	$(INSTALL_DIR) $(IDIR_QUAGGA_OSPF6D)/usr/sbin
	$(CP) $(WRKINST)/usr/sbin/ospf6d $(IDIR_QUAGGA_OSPF6D)/usr/sbin/

quagga-ripngd-install:
	$(INSTALL_DIR) $(IDIR_QUAGGA_RIPNGD)/usr/sbin
	$(CP) $(WRKINST)/usr/sbin/ripngd $(IDIR_QUAGGA_RIPNGD)/usr/sbin/

quagga-ripd-install:
	$(INSTALL_DIR) $(IDIR_QUAGGA_RIPD)/usr/sbin
	$(CP) $(WRKINST)/usr/sbin/ripd $(IDIR_QUAGGA_RIPD)/usr/sbin/

quagga-vtysh-install:
	$(INSTALL_DIR) $(IDIR_QUAGGA_VTYSH)/usr/bin
	$(CP) $(WRKINST)/usr/bin/vtysh $(IDIR_QUAGGA_VTYSH)/usr/bin/

include $(ADK_TOPDIR)/mk/pkg-bottom.mk