SSDP managing daemon.
Designed to work with miniupnpc, miniupnpd, minidlna, etc.
http://miniupnp.free.fr/
Signed-off-by: Fabrice Fontaine <fabrice.fontaine@orange.com>
[Thomas:
- remove patch for _GNU_SOURCE, pass it from the .mk file instead
- add dependency on BR2_USE_MMU, fork() is used.
- rename $IF variable in init script/systemd unit file to $IFACE, for
clarity.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
source "package/memcached/Config.in"
source "package/mii-diag/Config.in"
source "package/minidlna/Config.in"
+ source "package/minissdpd/Config.in"
source "package/mjpg-streamer/Config.in"
source "package/modem-manager/Config.in"
source "package/mongrel2/Config.in"
--- /dev/null
+config BR2_PACKAGE_MINISSDPD
+ bool "minissdpd"
+ depends on BR2_USE_MMU # fork()
+ select BR2_PACKAGE_LIBNFNETLINK
+ help
+ SSDP managing daemon. Designed to work with miniupnpc,
+ miniupnpd, minidlna, etc.
+
+ http://miniupnp.free.fr/
--- /dev/null
+#!/bin/sh
+
+NAME=minissdpd
+PIDFILE=/var/run/$NAME.pid
+DAEMON=/usr/sbin/$NAME
+CFGFILE=/etc/default/$NAME
+
+IFACE=eth0
+
+# Read configuration variable file if it is present
+if [ -f $CFGFILE ]; then
+ . $CFGFILE
+fi
+
+DAEMON_ARGS="-i $IFACE"
+
+start() {
+ printf "Starting $NAME: "
+ start-stop-daemon -S -q -m -b -p $PIDFILE --exec $DAEMON -- $DAEMON_ARGS
+ [ $? = 0 ] && echo "OK" || echo "FAIL"
+}
+stop() {
+ printf "Stopping $NAME: "
+ start-stop-daemon -K -q -p $PIDFILE
+ [ $? = 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 $?
--- /dev/null
+# Locally computed:
+sha256 dfd637b185731e1acb412a86faa9718eb93c04ca08280541a6d22d14d1fb890f minissdpd-1.5.tar.gz
--- /dev/null
+################################################################################
+#
+# minissdpd
+#
+################################################################################
+
+MINISSDPD_VERSION = 1.5
+MINISSDPD_SITE = http://miniupnp.free.fr/files
+MINISSDPD_LICENSE = BSD-3c
+MINISSDPD_LICENSE_FILES = LICENSE
+MINISSDPD_DEPENDENCIES = libnfnetlink
+
+define MINISSDPD_BUILD_CMDS
+ $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \
+ CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE" \
+ -C $(@D)
+endef
+
+define MINISSDPD_INSTALL_TARGET_CMDS
+ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
+ PREFIX=$(TARGET_DIR) install
+endef
+
+# Use dedicated init scripts for systemV and systemd instead of using
+# minissdpd.init.d.script as it is not compatible with buildroot init system
+define MINISSDPD_INSTALL_INIT_SYSV
+ $(RM) $(TARGET_DIR)/etc/init.d/minissdpd
+ $(INSTALL) -D -m 0755 package/minissdpd/S50minissdpd \
+ $(TARGET_DIR)/etc/init.d/S50minissdpd
+endef
+
+define MINISSDPD_INSTALL_INIT_SYSTEMD
+ $(INSTALL) -D -m 644 package/minissdpd/minissdpd.service \
+ $(TARGET_DIR)/usr/lib/systemd/system/minissdpd.service
+ mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
+ ln -sf ../../../../usr/lib/systemd/system/minissdpd.service \
+ $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/minissdpd.service
+endef
+
+$(eval $(generic-package))
--- /dev/null
+[Unit]
+Description=SSDP managing daemon
+After=network.target
+
+[Service]
+Environment="IFACE=eth0"
+EnvironmentFile=/etc/default/minissdpd
+ExecStart=/usr/sbin/minissdpd -i $IFACE
+Restart=always
+
+[Install]
+WantedBy=multi-user.target