Merge pull request #268 from dedeckeh/pr_nat46_upstep
[lede-routing/.git] / smcroute / Makefile
1 #
2 # Copyright (C) 2014 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 include $(TOPDIR)/rules.mk
8
9 PKG_NAME:=smcroute
10 PKG_VERSION:=2.0.0
11 PKG_RELEASE:=1
12 PKG_LICENSE:=GPL-2.0+
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
15 PKG_SOURCE_URL:=ftp://troglobit.com/smcroute/
16 PKG_MD5SUM:=cbf478e52ab9ae411adca41b9d22f68a
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/smcroute
21         SECTION:=net
22         CATEGORY:=Network
23         SUBMENU:=Routing and Redirection
24         TITLE:=Static Multicast Routing Daemon
25         URL:=http://troglobit.com/smcroute.html
26         MAINTAINER:=Leonardo Brondani Schenkel <leonardo@schenkel.net>
27 endef
28
29 define Package/smcroute/description
30         SMCRoute is a command line tool to manipulate the multicast routes of the Linux kernel.
31 endef
32
33 ifeq ($(HOST_OS),FreeBSD)
34         TARGET_CFLAGS += -fno-builtin-log
35         TARGET_LDFLAGS += -fno-builtin-log
36 endif
37
38 define Build/Compile
39         $(MAKE) CC="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS)" -C $(PKG_BUILD_DIR) all
40 endef
41
42 define Package/smcroute/conffiles
43         /etc/smcroute.conf
44 endef
45
46 define Package/smcroute/install
47         $(INSTALL_DIR) $(1)/usr/sbin
48         $(INSTALL_DIR) $(1)/usr/bin
49         $(INSTALL_DIR) $(1)/etc/init.d/
50         $(INSTALL_BIN) $(PKG_BUILD_DIR)/smcroute $(1)/usr/sbin/
51         $(INSTALL_BIN) $(PKG_BUILD_DIR)/mcsender $(1)/usr/bin/
52         $(INSTALL_CONF) $(PKG_BUILD_DIR)/smcroute.conf $(1)/etc
53         $(INSTALL_BIN) ./files/smcroute.init $(1)/etc/init.d/smcroute
54 endef
55
56 $(eval $(call BuildPackage,smcroute))