Merge pull request #26 from Noltari/mcproxy-next
[feed/routing.git] / mrd6 / Makefile
1 #
2 # Copyright (C) 2006-2011 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=mrd6
11 PKG_SOURCE_VERSION:=c805eb33255dbc0b6647d463c6c67d1c9d3105a0
12 PKG_VERSION:=2013-11-30-$(PKG_SOURCE_VERSION)
13 PKG_RELEASE:=1
14
15 PKG_SOURCE_PROTO:=git
16 PKG_SOURCE_URL:=git://github.com/hugosantos/mrd6.git
17 PKG_MAINTAINER:=Steven Barth <cyrus@openwrt.org>
18
19 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
20 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
21
22 PKG_BUILD_PARALLEL:=1
23 PKG_INSTALL:=1
24
25 include $(INCLUDE_DIR)/package.mk
26
27 define Package/mrd6
28 SECTION:=net
29 CATEGORY:=Network
30 TITLE:=IPv6 multicast routing daemon
31 URL:=http://fivebits.net/proj/mrd6
32 DEPENDS:=@IPV6 +libstdcpp
33 endef
34
35 define Package/mrd6/description
36 Multicast is becoming a major component in next generation networks, used
37 in several scenarios, from video broadcasting to multimedia conferencing.
38 In order to be implemented, new technology needs supporting hardware and
39 software across a set of devices and systems. MRD6 is an implementation of
40 a modular IPv6 Multicast Routing Framework for the Linux operating system
41 and provides MLDv2 (as well as MLDv1), PIM-SM and MBGP support.
42 endef
43
44 MRD6_MAKEFLAGS:= \
45 $(TARGET_CONFIGURE_OPTS) \
46 OPTIMIZE=yes \
47 SPACE_OPTIMIZE=yes \
48 FULL_STATIC=no \
49 CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -DNO_INET6_OPTION -fno-builtin -fno-rtti" \
50 LDFLAGS="$(TARGET_LDFLAGS) -ldl -lm" \
51 MODULE_CXX="\$$$$(CC) -shared \$$$$(CXXFLAGS) \$$$$(LDFLAGS)" \
52 DESTDIR="$(PKG_INSTALL_DIR)" \
53 PREFIX="/usr"
54
55 define Build/Compile
56 +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/src $(MRD6_MAKEFLAGS) all
57 endef
58
59 define Build/Install
60 $(MAKE) -C $(PKG_BUILD_DIR)/src $(MRD6_MAKEFLAGS) install
61 endef
62
63 define Package/mrd6/conffiles
64 /etc/mrd6.conf
65 endef
66
67 define Package/mrd6/install
68 $(INSTALL_DIR) $(1)/etc/init.d
69 $(INSTALL_CONF) ./files/mrd6.conf $(1)/etc
70 $(INSTALL_BIN) ./files/mrd6.init $(1)/etc/init.d/mrd6
71 $(INSTALL_DIR) $(1)/usr/sbin
72 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mrd $(1)/usr/sbin/mrd6
73 $(INSTALL_DIR) $(1)/usr/bin
74 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mrd6sh $(1)/usr/bin/mrd6sh
75 $(INSTALL_DIR) $(1)/usr/lib/mrd6
76 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/mrd6/bgp.so $(1)/usr/lib/mrd6/bgp.so
77 endef
78
79 $(eval $(call BuildPackage,mrd6))