Merge commit 'ad9d95cca240fa0edd8e033126877ec58ed848d8'
[feed/routing.git] / mcproxy / Makefile
1 #
2 # Copyright (C) 2014 Alvaro Fernandez Rojas <noltari@gmail.com>
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:=mcproxy
11 PKG_VERSION:=1.1.0
12
13 PKG_RELEASE=$(PKG_SOURCE_VERSION)
14
15 PKG_SOURCE_PROTO:=git
16 PKG_SOURCE_URL:=git://github.com/mcproxy/mcproxy.git
17 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
18 PKG_SOURCE_VERSION:=df2d117dd67a7948f86d7effc5b9ea8f372466d8
19 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/mcproxy
24 SECTION:=net
25 CATEGORY:=Network
26 SUBMENU:=Routing and Redirection
27 TITLE:=Multicast Proxy for IGMP/MLD
28 URL:=http://mcproxy.realmv6.org/
29 DEPENDS:=+libpthread +libstdcpp @(!GCC_VERSION_4_4&&!GCC_VERSION_4_6)
30 endef
31
32 define Package/mcproxy/description
33 mcproxy is a free & open source implementation of the IGMP/MLD proxy
34 function (see RFC4605) for Linux systems. It operates on the kernel
35 tables for multicast routing and allows for multiple instantiations,
36 as well as dynamically changing downstream interfaces.
37
38 The current design was motivated by research and IETF standardization
39 activities in the MULTIMOB group (see RFC6224 and
40 draft-ietf-multimob-pmipv6-source) and shall serve as a test and
41 experimentation tool for the research community.
42 endef
43
44 define Build/Configure
45 $(CP) ./src/Makefile $(PKG_BUILD_DIR)/mcproxy/
46 endef
47
48 TARGET_CXXFLAGS += -pipe -std=c++11 -O2 -Wall -W -fPIE
49 TARGET_LFLAGS += -Wl,-O1
50 TARGET_INCPATH += -I.
51 TARGET_LIBS += -lpthread
52
53 define Build/Compile
54 $(MAKE) -C $(PKG_BUILD_DIR)/mcproxy \
55 CXX="$(TARGET_CXX)" \
56 CFLAGS="$(TARGET_CFLAGS)" \
57 CXXFLAGS="$(TARGET_CXXFLAGS)" \
58 LFLAGS="$(TARGET_LFLAGS)" \
59 INCPATH="$(TARGET_INCPATH)" \
60 LIBS="$(TARGET_LIBS)"
61 endef
62
63 define Package/mcproxy/install
64 $(INSTALL_DIR) $(1)/etc $(1)/etc/init.d $(1)/usr/sbin
65 $(INSTALL_CONF) ./files/mcproxy.conf $(1)/etc/mcproxy.conf
66 $(INSTALL_BIN) ./files/mcproxy.init $(1)/etc/init.d/mcproxy
67 $(INSTALL_BIN) $(PKG_BUILD_DIR)/mcproxy/mcproxy $(1)/usr/sbin
68 endef
69
70 $(eval $(call BuildPackage,mcproxy))