summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsbyx2014-11-06 06:15:42 +0000
committersbyx2014-11-06 06:15:42 +0000
commit67e007138a28e9d5e06bc854e40efcaeda3c5ce3 (patch)
treef5d487711ab2773a6d49199b8735ea872e8d6797
parent3f11a2a9db65b51d31a1f5275fb6ba38b9789b08 (diff)
parent250c990ab66b22e64149b77de37bfb19114aa426 (diff)
downloadrouting-67e007138a28e9d5e06bc854e40efcaeda3c5ce3.tar.gz
Merge pull request #62 from lbschenkel/smcroute
smcroute: Add package for version 2.0.0.
-rw-r--r--smcroute/Makefile56
-rw-r--r--smcroute/files/smcroute.init11
2 files changed, 67 insertions, 0 deletions
diff --git a/smcroute/Makefile b/smcroute/Makefile
new file mode 100644
index 0000000..523afb3
--- /dev/null
+++ b/smcroute/Makefile
@@ -0,0 +1,56 @@
+#
+# Copyright (C) 2014 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=smcroute
+PKG_VERSION:=2.0.0
+PKG_RELEASE:=1
+PKG_LICENSE:=GPL-2.0+
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_URL:=ftp://troglobit.com/smcroute/
+PKG_MD5SUM:=cbf478e52ab9ae411adca41b9d22f68a
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/smcroute
+ SECTION:=net
+ CATEGORY:=Network
+ SUBMENU:=Routing and Redirection
+ TITLE:=Static Multicast Routing Daemon
+ URL:=http://troglobit.com/smcroute.html
+ MAINTAINER:=Leonardo Brondani Schenkel <leonardo@schenkel.net>
+endef
+
+define Package/smcroute/description
+ SMCRoute is a command line tool to manipulate the multicast routes of the Linux kernel.
+endef
+
+ifeq ($(HOST_OS),FreeBSD)
+ TARGET_CFLAGS += -fno-builtin-log
+ TARGET_LDFLAGS += -fno-builtin-log
+endif
+
+define Build/Compile
+ $(MAKE) CC="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS)" -C $(PKG_BUILD_DIR) all
+endef
+
+define Package/smcroute/conffiles
+ /etc/smcproxy.conf
+endef
+
+define Package/smcroute/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_DIR) $(1)/etc/init.d/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/smcroute $(1)/usr/sbin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/mcsender $(1)/usr/bin/
+ $(INSTALL_CONF) $(PKG_BUILD_DIR)/smcroute.conf $(1)/etc
+ $(INSTALL_BIN) ./files/smcroute.init $(1)/etc/init.d/smcroute
+endef
+
+$(eval $(call BuildPackage,smcroute))
diff --git a/smcroute/files/smcroute.init b/smcroute/files/smcroute.init
new file mode 100644
index 0000000..3e36272
--- /dev/null
+++ b/smcroute/files/smcroute.init
@@ -0,0 +1,11 @@
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2010 OpenWrt.org
+START=50
+
+start() {
+ smcroute -d
+}
+
+stop() {
+ smcroute -k
+}