From a20f777fc019699e3afd06a0874c03d7e75e1d2a Mon Sep 17 00:00:00 2001 From: Gabor Juhos Date: Sun, 20 Oct 2013 15:58:28 +0000 Subject: [PATCH] packages: xupnpd: add new package MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Package based on: http://tsdemuxer.googlecode.com/svn/trunk/xupnpd/src/contrib/OpenWrt/ Light DLNA Media Server which provides services for sharing IPTV unicast streams over local area network. Signed-off-by: Álvaro Fernández Rojas Signed-off-by: Gabor Juhos SVN-Revision: 38481 --- multimedia/xupnpd/Makefile | 70 +++++++++++++++++++ multimedia/xupnpd/files/xupnpd.init | 23 ++++++ .../xupnpd/patches/100-default_config.patch | 15 ++++ 3 files changed, 108 insertions(+) create mode 100644 multimedia/xupnpd/Makefile create mode 100644 multimedia/xupnpd/files/xupnpd.init create mode 100644 multimedia/xupnpd/patches/100-default_config.patch diff --git a/multimedia/xupnpd/Makefile b/multimedia/xupnpd/Makefile new file mode 100644 index 0000000000..3d3f015420 --- /dev/null +++ b/multimedia/xupnpd/Makefile @@ -0,0 +1,70 @@ +# +# Copyright (C) 2013 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:=xupnpd +PKG_REV:=387 +PKG_VERSION:=$(PKG_REV) +PKG_RELEASE:=5 + +PKG_SOURCE_PROTO:=svn +PKG_SOURCE_VERSION:=$(PKG_REV) +PKG_SOURCE_SUBDIR:=xupnpd-$(PKG_VERSION) +PKG_SOURCE_URL:=http://tsdemuxer.googlecode.com/svn/trunk/xupnpd/src/ +PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz + +include $(INCLUDE_DIR)/package.mk + +LUA_FLAGS:=-llua + +define Build/Compile + (cd $(PKG_BUILD_DIR); $(TARGET_CC) -v $(LUA_FLAGS) $(TARGET_CFLAGS) -fno-exceptions -fno-rtti -DWITH_URANDOM $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS) -lm -ldl -lcrypt -o xupnpd *.c *.cpp) +endef + +define Package/xupnpd + SECTION:=multimedia + CATEGORY:=Multimedia + DEPENDS:=+liblua + TITLE:=eXtensible UPnP agent + URL:=http://xupnpd.org/ +endef + +define Package/xupnpd/conffiles +/usr/share/xupnpd/xupnpd.lua +/usr/share/xupnpd/config +/usr/share/xupnpd/playlists +endef + +define Package/xupnpd/description +xupnpd - eXtensible UPnP agent +This program is a light DLNA Media Server which provides ContentDirectory:1 service for sharing IPTV unicast streams over local area network (with udpxy for multicast to HTTP unicast conversion). +The program shares UTF8-encoded M3U playlists with links over local area network as content of the directory. +You can watch HDTV broadcasts (multicast or unicast) and listen Internet Radio in IP network without transcoding and PC. +endef + +define Package/xupnpd/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/xupnpd $(1)/usr/bin + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/xupnpd.init $(1)/etc/init.d/xupnpd + $(INSTALL_DIR) $(1)/usr/share/xupnpd + $(CP) $(PKG_BUILD_DIR)/*.lua $(1)/usr/share/xupnpd + $(INSTALL_DIR) $(1)/usr/share/xupnpd/ui + $(CP) $(PKG_BUILD_DIR)/ui/* $(1)/usr/share/xupnpd/ui + $(INSTALL_DIR) $(1)/usr/share/xupnpd/www + $(CP) $(PKG_BUILD_DIR)/www/* $(1)/usr/share/xupnpd/www + $(INSTALL_DIR) $(1)/usr/share/xupnpd/playlists + $(INSTALL_DIR) $(1)/usr/share/xupnpd/plugins + $(CP) $(PKG_BUILD_DIR)/plugins/* $(1)/usr/share/xupnpd/plugins + $(INSTALL_DIR) $(1)/usr/share/xupnpd/config + $(INSTALL_DIR) $(1)/etc/xupnpd + (cd $(1)/etc/xupnpd; ln -s ../../usr/share/xupnpd/config ./; ln -s ../../usr/share/xupnpd/xupnpd.lua ./) + $(INSTALL_DIR) $(1)/usr/share/xupnpd/localmedia +endef + +$(eval $(call BuildPackage,xupnpd)) diff --git a/multimedia/xupnpd/files/xupnpd.init b/multimedia/xupnpd/files/xupnpd.init new file mode 100644 index 0000000000..eddd0f4974 --- /dev/null +++ b/multimedia/xupnpd/files/xupnpd.init @@ -0,0 +1,23 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2013 OpenWrt.org + +START=99 +STOP=99 + +SERVICE_DAEMONIZE=1 +SERVICE_WRITE_PID=1 + +XUPNPDROOTDIR=/usr/share/xupnpd +XUPNPD=/usr/bin/xupnpd + +start() { + service_start $XUPNPD +} + +stop() { + service_stop $XUPNPD +} + +reload() { + service_reload $XUPNPD +} diff --git a/multimedia/xupnpd/patches/100-default_config.patch b/multimedia/xupnpd/patches/100-default_config.patch new file mode 100644 index 0000000000..89958c7fe6 --- /dev/null +++ b/multimedia/xupnpd/patches/100-default_config.patch @@ -0,0 +1,15 @@ +--- a/xupnpd.lua ++++ b/xupnpd.lua +@@ -1,10 +1,10 @@ + cfg={} + + -- multicast interface for SSDP exchange, 'eth0', 'br0', 'br-lan' for example +-cfg.ssdp_interface='lo' ++cfg.ssdp_interface='br-lan' + + -- 'cfg.ssdp_loop' enables multicast loop (if player and server in one host) +-cfg.ssdp_loop=1 ++cfg.ssdp_loop=0 + + -- SSDP announcement interval + cfg.ssdp_notify_interval=15 -- 2.30.2