generated from gaoyang3513/SDK_RK3288
[Mod] First commit
This commit is contained in:
12
package/smcroute/Config.in
Normal file
12
package/smcroute/Config.in
Normal file
@ -0,0 +1,12 @@
|
||||
config BR2_PACKAGE_SMCROUTE
|
||||
bool "smcroute"
|
||||
depends on BR2_USE_MMU # fork()
|
||||
help
|
||||
SMCRoute is a command line tool to manipulate the multicast
|
||||
routes of a UNIX kernel. It supports both IPv4 and IPv6
|
||||
multicast routing. SMCRoute can be used as an alternative to
|
||||
dynamic multicast routers like mrouted or pimd in setups
|
||||
where static multicast routes should be maintained and/or no
|
||||
proper IGMP or MLD signaling exists.
|
||||
|
||||
https://github.com/troglobit/smcroute
|
||||
48
package/smcroute/S41smcroute
Executable file
48
package/smcroute/S41smcroute
Executable file
@ -0,0 +1,48 @@
|
||||
#!/bin/sh
|
||||
|
||||
NAME="smcroute"
|
||||
DAEMON="smcrouted"
|
||||
PIDFILE="/var/run/$NAME.pid"
|
||||
|
||||
# shellcheck source=/dev/null
|
||||
[ -r "/etc/default/$NAME" ] && . "/etc/default/$NAME"
|
||||
|
||||
cmd()
|
||||
{
|
||||
start-stop-daemon -q -p "$PIDFILE" -x "/usr/sbin/$DAEMON" "$@"
|
||||
status=$?
|
||||
if [ $status -eq 0 ]; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "FAIL"
|
||||
fi
|
||||
return $status
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
printf 'Starting %s: ' "$DAEMON"
|
||||
# shellcheck disable=SC2086 # we need the word splitting
|
||||
cmd -S -- $SMCROUTED_ARGS
|
||||
;;
|
||||
|
||||
stop)
|
||||
printf 'Stopping %s: ' "$DAEMON"
|
||||
cmd -K
|
||||
;;
|
||||
|
||||
restart)
|
||||
$0 stop
|
||||
sleep 1
|
||||
$0 start
|
||||
;;
|
||||
|
||||
reload)
|
||||
printf 'Reloading %s: ' "$DAEMON"
|
||||
cmd -K -s HUP
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|reload}"
|
||||
exit 1
|
||||
esac
|
||||
5
package/smcroute/smcroute.hash
Normal file
5
package/smcroute/smcroute.hash
Normal file
@ -0,0 +1,5 @@
|
||||
# Upstream .sha256 from GitHub
|
||||
sha256 2569cd97fa2047df14203a7144be53a1b32928cb460421a302bbcce381b42bc3 smcroute-2.5.5.tar.gz
|
||||
|
||||
# Locally generated
|
||||
sha256 ab15fd526bd8dd18a9e77ebc139656bf4d33e97fc7238cd11bf60e2b9b8666c6 COPYING
|
||||
40
package/smcroute/smcroute.mk
Normal file
40
package/smcroute/smcroute.mk
Normal file
@ -0,0 +1,40 @@
|
||||
################################################################################
|
||||
#
|
||||
# smcroute
|
||||
#
|
||||
################################################################################
|
||||
|
||||
SMCROUTE_VERSION = 2.5.5
|
||||
SMCROUTE_SITE = https://github.com/troglobit/smcroute/releases/download/$(SMCROUTE_VERSION)
|
||||
SMCROUTE_LICENSE = GPL-2.0+
|
||||
SMCROUTE_LICENSE_FILES = COPYING
|
||||
SMCROUTE_CPE_ID_VENDOR = troglobit
|
||||
|
||||
SMCROUTE_CONF_OPTS = --enable-mrdisc
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBCAP),y)
|
||||
SMCROUTE_DEPENDENCIES += libcap
|
||||
SMCROUTE_CONF_OPTS += --with-libcap
|
||||
else
|
||||
SMCROUTE_CONF_OPTS += --without-libcap
|
||||
endif
|
||||
|
||||
define SMCROUTE_INSTALL_INIT_SYSV
|
||||
$(INSTALL) -m 755 -D package/smcroute/S41smcroute \
|
||||
$(TARGET_DIR)/etc/init.d/S41smcroute
|
||||
endef
|
||||
|
||||
define SMCROUTE_PRUNE_COMPAT_SCRIPT
|
||||
rm -f $(TARGET_DIR)/usr/sbin/smcroute
|
||||
endef
|
||||
|
||||
SMCROUTE_POST_INSTALL_TARGET_HOOKS += SMCROUTE_PRUNE_COMPAT_SCRIPT
|
||||
|
||||
# We will asume that CONFIG_NET and CONFIG_INET are already
|
||||
# set in the kernel configuration provided by the user.
|
||||
define SMCROUTE_LINUX_CONFIG_FIXUPS
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_IP_MULTICAST)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_IP_MROUTE)
|
||||
endef
|
||||
|
||||
$(eval $(autotools-package))
|
||||
Reference in New Issue
Block a user