mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-28 13:46:32 +00:00
babeld: New package
Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com> [Thomas: use $(INSTALL) instead of install.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
parent
321ee11c1a
commit
7c8c6e1b87
@ -1394,6 +1394,7 @@ menu "Networking applications"
|
|||||||
source "package/autossh/Config.in"
|
source "package/autossh/Config.in"
|
||||||
source "package/avahi/Config.in"
|
source "package/avahi/Config.in"
|
||||||
source "package/axel/Config.in"
|
source "package/axel/Config.in"
|
||||||
|
source "package/babeld/Config.in"
|
||||||
source "package/bandwidthd/Config.in"
|
source "package/bandwidthd/Config.in"
|
||||||
source "package/batctl/Config.in"
|
source "package/batctl/Config.in"
|
||||||
source "package/bcusdk/Config.in"
|
source "package/bcusdk/Config.in"
|
||||||
|
7
package/babeld/Config.in
Normal file
7
package/babeld/Config.in
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
config BR2_PACKAGE_BABELD
|
||||||
|
bool "babeld"
|
||||||
|
help
|
||||||
|
Babel is a loop-avoiding distance-vector routing protocol for IPv6
|
||||||
|
and IPv4 with fast convergence properties.
|
||||||
|
|
||||||
|
http://www.pps.univ-paris-diderot.fr/~jch/software/babel/
|
40
package/babeld/S50babeld
Normal file
40
package/babeld/S50babeld
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# Starts babeld.
|
||||||
|
#
|
||||||
|
|
||||||
|
# Allow a few customizations from a config file
|
||||||
|
test -r /etc/default/babeld && . /etc/default/babeld
|
||||||
|
|
||||||
|
start() {
|
||||||
|
printf "Starting babeld: "
|
||||||
|
start-stop-daemon -S -q -p /run/babeld.pid \
|
||||||
|
--exec /usr/sbin/babeld -- $DAEMON_ARGS
|
||||||
|
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||||
|
}
|
||||||
|
stop() {
|
||||||
|
printf "Stopping babeld: "
|
||||||
|
start-stop-daemon -K -q -p /run/babeld.pid
|
||||||
|
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||||
|
}
|
||||||
|
restart() {
|
||||||
|
stop
|
||||||
|
start
|
||||||
|
}
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
start
|
||||||
|
;;
|
||||||
|
stop)
|
||||||
|
stop
|
||||||
|
;;
|
||||||
|
restart|reload)
|
||||||
|
restart
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start|stop|restart}"
|
||||||
|
exit 1
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit $?
|
2
package/babeld/babeld.hash
Normal file
2
package/babeld/babeld.hash
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Locally computed
|
||||||
|
sha256 2c955e7d4ad971da1e860e5cedbaf1dd79903468ff6488b3f67102b2a8d087b6 babeld-1.7.1.tar.gz
|
36
package/babeld/babeld.mk
Normal file
36
package/babeld/babeld.mk
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
################################################################################
|
||||||
|
#
|
||||||
|
# babeld
|
||||||
|
#
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
BABELD_VERSION = 1.7.1
|
||||||
|
BABELD_SITE = http://www.pps.univ-paris-diderot.fr/~jch/software/files
|
||||||
|
BALELD_LICENSE = MIT
|
||||||
|
BALELD_LICENSE_FILES = LICENSE
|
||||||
|
|
||||||
|
define BABELD_BUILD_CMDS
|
||||||
|
$(MAKE) -C $(@D) CC="$(TARGET_CC)" \
|
||||||
|
PLATFORM_DEFINES="$(TARGET_CFLAGS) $(TARGET_LDFLAGS)"
|
||||||
|
endef
|
||||||
|
|
||||||
|
define BABELD_INSTALL_TARGET_CMDS
|
||||||
|
$(INSTALL) -D -m 755 $(@D)/babeld $(TARGET_DIR)/usr/sbin/babeld
|
||||||
|
endef
|
||||||
|
|
||||||
|
define BABELD_INSTALL_INIT_SYSV
|
||||||
|
$(INSTALL) -D -m 755 package/babeld/S50babeld \
|
||||||
|
$(TARGET_DIR)/etc/init.d/S50babeld
|
||||||
|
endef
|
||||||
|
|
||||||
|
define BABELD_INSTALL_INIT_SYSTEMD
|
||||||
|
$(INSTALL) -D -m 644 package/babeld/babeld.service \
|
||||||
|
$(TARGET_DIR)/usr/lib/systemd/system/babeld.service
|
||||||
|
|
||||||
|
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
|
||||||
|
|
||||||
|
ln -fs ../../../../usr/lib/systemd/system/babeld.service \
|
||||||
|
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/babeld.service
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(generic-package))
|
10
package/babeld/babeld.service
Normal file
10
package/babeld/babeld.service
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Babel daemon
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
EnvironmentFile=-/etc/default/babeld
|
||||||
|
ExecStart=/usr/sbin/babeld $DAEMON_ARGS
|
||||||
|
ExecReload=/bin/kill -HUP $MAINPID
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
Loading…
x
Reference in New Issue
Block a user