]> git.webhop.me Git - bs-cst-neutrino-hd.git/commitdiff
xupnpd r404: fix building and patching
authorMarkham <markham001@gmx.de>
Mon, 9 Nov 2015 15:08:42 +0000 (16:08 +0100)
committerMarkham <markham001@gmx.de>
Mon, 9 Nov 2015 15:08:42 +0000 (16:08 +0100)
archive-patches/xupnpd/svnr404/0001-xupnp-Patch-1-use-dynamic-libs.patch [new file with mode: 0644]
archive-patches/xupnpd/svnr404/0002-xupnp-Patch-2.patch [new file with mode: 0644]
archive-patches/xupnpd/svnr404/0003-xupnp-Patch-3.patch [new file with mode: 0644]
archive-patches/xupnpd_cst.diff [deleted file]
make/applications.mk

diff --git a/archive-patches/xupnpd/svnr404/0001-xupnp-Patch-1-use-dynamic-libs.patch b/archive-patches/xupnpd/svnr404/0001-xupnp-Patch-1-use-dynamic-libs.patch
new file mode 100644 (file)
index 0000000..9f1faae
--- /dev/null
@@ -0,0 +1,104 @@
+From fa39d21022a7d6b07e66288100165450b3683619 Mon Sep 17 00:00:00 2001
+From: "M. Liebmann" <tuxcode.bbg@gmail.com>
+Date: Sun, 26 Jan 2014 02:27:01 +0100
+Subject: [PATCH 1/4] xupnp: Patch #1, use dynamic libs
+
+---
+ src/Makefile | 60 ++++++++++++++++--------------------------------------------
+ 1 file changed, 16 insertions(+), 44 deletions(-)
+
+diff --git a/src/Makefile b/src/Makefile
+index 1622fcd..2a5314e 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -1,15 +1,12 @@
+-LUA     = lua-5.1.4
++LUA     = lua-5.2.3
+ #LUA     = lua-5.2.0
+ STATIC  = false
+-CFLAGS  = -fno-exceptions -fno-rtti -O2 -I$(LUA) -L$(LUA)
++CFLAGS  = -fno-exceptions -fno-rtti -O2
+ SRC     = main.cpp soap.cpp mem.cpp mcast.cpp luaxlib.cpp luaxcore.cpp luajson.cpp luajson_parser.cpp
++STAGING_DIR = /u01/home/shocker/staff/openwrt/staging_dir
+ LUAMYCFLAGS = -DLUA_USE_LINUX
+-SDK_8_09 = /u01/home/shocker_old/staff/openwrt_8_09/staging_dir
+-SDK_BACKFIRE = /u01/home/shocker_old/staff/openwrt/staging_dir
+-SDK_BBREAKER = /home/shocker/staff/openwrt/staging_dir
+-
+ ifeq ($(STATIC),true)
+ CFLAGS+=-static
+ LUAMYCFLAGS+=-static
+@@ -36,42 +33,18 @@ x86_bsd:
+ # D-Link DIR-320/DD-WRT (mipsel)
+-bcm947x_ddwrt:
+-      $(MAKE) embedded TARGET=bcm947x-ddwrt SDK=$(SDK_8_09)/toolchain-mipsel_gcc3.4.6/mipsel-linux/bin UTILS=$(SDK_8_09)/toolchain-mipsel_gcc3.4.6/libexec/gcc/mipsel-linux-uclibc/3.4.6 STAGING_DIR=$(SDK_8_09)
++bcm947xx_ddwrt:
++      $(MAKE) embedded TARGET=bcm947xx-ddwrt SDK=/u01/home/shocker/staff/openwrt_8_09/staging_dir/toolchain-mipsel_gcc3.4.6/mipsel-linux/bin PATH=$(PATH):/u01/home/shocker/staff/openwrt_8_09/staging_dir/toolchain-mipsel_gcc3.4.6/libexec/gcc/mipsel-linux-uclibc/3.4.6
+ # OpenWrt Backfire
+-bcm947x_backfire:
+-      $(MAKE) embedded TARGET=bcm947x-bf SDK=$(SDK_BACKFIRE)/toolchain-mipsel_gcc-3.4.6-bcm947xx/mipsel-openwrt-linux/bin UTILS=$(SDK_BACKFIRE)/toolchain-mipsel_gcc-3.4.6-bcm947xx/libexec/gcc/mipsel-openwrt-linux-uclibc/3.4.6 STAGING_DIR=$(SDK_BACKFIRE)
+-
+-ar71xx_backfire:
+-      $(MAKE) embedded TARGET=ar71xx-bf SDK=$(SDK_BACKFIRE)/toolchain-mips_r2_gcc-4.3.3+cs-ar71xx/mips-openwrt-linux/bin UTILS=$(SDK_BACKFIRE)/toolchain-mips_r2_gcc-4.3.3+cs-ar71xx/libexec/gcc/mips-openwrt-linux-uclibc/4.3.3 STAGING_DIR=$(SDK_BACKFIRE)
+-
+-ar231x_backfire:
+-      $(MAKE) embedded TARGET=ar231x-bf SDK=$(SDK_BACKFIRE)/toolchain-mips_gcc-4.3.3+cs-ar231x/mips-openwrt-linux/bin UTILS=$(SDK_BACKFIRE)/toolchain-mips_gcc-4.3.3+cs-ar231x/libexec/gcc/mips-openwrt-linux-uclibc/4.3.3 STAGING_DIR=$(SDK_BACKFIRE)
+-
+-
+-# OpenWrt Barrier Breaker
++bcm947xx:
++      $(MAKE) embedded TARGET=bcm947xx SDK=$(STAGING_DIR)/toolchain-mipsel_gcc-3.4.6-bcm947xx/mipsel-openwrt-linux/bin PATH=$(PATH):$(STAGING_DIR)/toolchain-mipsel_gcc-3.4.6-bcm947xx/libexec/gcc/mipsel-openwrt-linux-uclibc/3.4.6 STAGING_DIR=$(STAGING_DIR)
+-# Broadcom BCM2708/BCM2835
+-bcm2708:
+-      $(MAKE) embedded TARGET=bcm2708 SDK=$(SDK_BBREAKER)/toolchain-arm_arm1176jzf-s+vfp_gcc-4.8-linaro-bcm2708/arm-openwrt-linux/bin UTILS=$(SDK_BBREAKER)/toolchain-arm_arm1176jzf-s+vfp_gcc-4.8-linaro-bcm2708/libexec/gcc/arm-openwrt-linux-uclibcgnueabi/4.8.3 STAGING_DIR=$(SDK_BBREAKER)
++ar71xx:
++      $(MAKE) embedded TARGET=ar71xx SDK=$(STAGING_DIR)/toolchain-mips_r2_gcc-4.3.3+cs-ar71xx/mips-openwrt-linux/bin PATH=$(PATH):$(STAGING_DIR)/toolchain-mips_r2_gcc-4.3.3+cs-ar71xx/libexec/gcc/mips-openwrt-linux-uclibc/4.3.3 STAGING_DIR=$(STAGING_DIR)
+-# Broadcom BCM47xx/BCM53xx (MIPS)
+-bcm47xx:
+-      $(MAKE) embedded TARGET=bcm47xx SDK=$(SDK_BBREAKER)/toolchain-mipsel_mips32_gcc-4.8-linaro-bcm47xx/mipsel-openwrt-linux/bin UTILS=$(SDK_BBREAKER)/toolchain-mipsel_mips32_gcc-4.8-linaro-bcm47xx/libexec/gcc/mipsel-openwrt-linux-uclibc/4.8.3 STAGING_DIR=$(SDK_BBREAKER)
+-
+-# Broadcom BCM63xx
+-bcm63xx:
+-      $(MAKE) embedded TARGET=bcm63xx SDK=$(SDK_BBREAKER)/toolchain-mips_mips32_gcc-4.8-linaro-bcm63xx/mips-openwrt-linux/bin UTILS=$(SDK_BBREAKER)/toolchain-mips_mips32_gcc-4.8-linaro-bcm63xx/libexec/gcc/mips-openwrt-linux-uclibc/4.8.3 STAGING_DIR=$(SDK_BBREAKER)
+-
+-# Atheros AR231x/AR5312
+ ar231x:
+-      $(MAKE) embedded TARGET=ar231x SDK=$(SDK_BBREAKER)/toolchain-mips_mips32_gcc-4.8-linaro-ar231x/mips-openwrt-linux/bin UTILS=$(SDK_BBREAKER)/toolchain-mips_mips32_gcc-4.8-linaro-ar231x/libexec/gcc/mips-openwrt-linux-uclibc/4.8.3 STAGING_DIR=$(SDK_BBREAKER)
+-
+-# Atheros AR7xxx/AR9xxx
+-ar7xxx:
+-      $(MAKE) embedded TARGET=ar7xxx SDK=$(SDK_BBREAKER)/toolchain-mips_34kc_gcc-4.8-linaro-ar7xxx/mips-openwrt-linux/bin UTILS=$(SDK_BBREAKER)/toolchain-mips_34kc_gcc-4.8-linaro-ar7xxx/libexec/gcc/mips-openwrt-linux-uclibc/4.8.3 STAGING_DIR=$(SDK_BBREAKER)
+-
++      $(MAKE) embedded TARGET=ar231x SDK=$(STAGING_DIR)/toolchain-mips_gcc-4.3.3+cs-ar231x/mips-openwrt-linux/bin PATH=$(PATH):$(STAGING_DIR)/toolchain-mips_gcc-4.3.3+cs-ar231x/libexec/gcc/mips-openwrt-linux-uclibc/4.3.3 STAGING_DIR=$(STAGING_DIR)
+ # Other
+ samsung_d:
+@@ -85,12 +58,11 @@ dreambox:
+ embedded:
+-      PATH=$(PATH):$(UTILS) make -C $(LUA) CC=$(SDK)/gcc a MYCFLAGS='$(LUAMYCFLAGS)'
+-      $(SDK)/gcc -O2 -c -B$(UTILS) -o md5.o md5c.c
+-      $(SDK)/gcc $(CFLAGS) -B$(UTILS) -DWITH_URANDOM -o xupnpd-$(TARGET) $(SRC) md5.o -llua -lm -ldl
+-      $(SDK)/strip xupnpd-$(TARGET)
++      export PATH
++      export STAGING_DIR
++      $(CC) -O2 -c -o md5.o md5c.c
++      ${CC} ${CFLAGS} ${LUAFLAGS} -DWITH_URANDOM -o xupnpd $(SRC) md5.o -llua -lm -ldl -rdynamic
++      ${STRIP} xupnpd
+ clean:
+-      make -C $(LUA) clean
+-      rm -f $(LUA)/liblua.a
+-      rm -f md5.o
++      rm -f md5.o xupnpd
+-- 
+2.2.2
+
diff --git a/archive-patches/xupnpd/svnr404/0002-xupnp-Patch-2.patch b/archive-patches/xupnpd/svnr404/0002-xupnp-Patch-2.patch
new file mode 100644 (file)
index 0000000..e77f772
--- /dev/null
@@ -0,0 +1,122 @@
+From 3c8f178a5ef7bf9aa3c704449919081088491f15 Mon Sep 17 00:00:00 2001
+From: "M. Liebmann" <tuxcode.bbg@gmail.com>
+Date: Sun, 26 Jan 2014 02:37:36 +0100
+Subject: [PATCH 2/4] xupnp: Patch #2
+
+---
+ src/xupnpd.lua                    |  34 +++++---
+
+diff --git a/src/xupnpd.lua b/src/xupnpd.lua
+index c213d72..c56c942 100644
+--- a/src/xupnpd.lua
++++ b/src/xupnpd.lua
+@@ -1,13 +1,13 @@
+ cfg={}
+ -- multicast interface for SSDP exchange, 'eth0', 'br0', 'br-lan' for example
+-cfg.ssdp_interface='lo'
++cfg.ssdp_interface='any'
+ -- 'cfg.ssdp_loop' enables multicast loop (if player and server in one host)
+ cfg.ssdp_loop=1
+ -- SSDP announcement interval
+-cfg.ssdp_notify_interval=15
++cfg.ssdp_notify_interval=5
+ -- SSDP announcement age
+ cfg.ssdp_max_age=1800
+@@ -19,10 +19,10 @@ cfg.http_port=4044
+ cfg.log_facility='local0'
+ -- 'cfg.daemon' detach server from terminal
+-cfg.daemon=false
++cfg.daemon=true
+ -- silent mode - no logs, no pid file
+-cfg.embedded=false
++cfg.embedded=true
+ -- 'cfg.debug' enables SSDP debug output to stdout (if cfg.daemon=false)
+ -- 0-off, 1-basic, 2-messages
+@@ -32,7 +32,7 @@ cfg.debug=1
+ --cfg.udpxy_url='http://192.168.1.1:4022'
+ -- downstream interface for builtin multicast proxy (comment 'cfg.udpxy_url' for processing 'udp://@...' playlists)
+-cfg.mcast_interface='eth1'
++cfg.mcast_interface='eth0'
+ -- 'cfg.proxy' enables proxy for injection DLNA headers to stream
+ -- 0-off, 1-radio, 2-radio/TV
+@@ -51,13 +51,14 @@ cfg.dlna_notify=true
+ cfg.dlna_subscribe_ttl=1800
+ -- group by 'group-title'
+-cfg.group=true
++cfg.group=false
+ -- sort files
+ cfg.sort_files=false
+ -- Device name
+-cfg.name='UPnP-IPTV'
++--cfg.name='UPnP-IPTV'
++cfg.name=io.popen("uname -n"):read("*l")..'-xupnpd'
+ -- static device UUID, '60bd2fb3-dabe-cb14-c766-0e319b54c29a' for example or nil
+ cfg.uuid='60bd2fb3-dabe-cb14-c766-0e319b54c29a'
+@@ -72,12 +73,14 @@ cfg.cache_ttl=900
+ cfg.default_mime_type='mpeg'
+ -- feeds update interval (seconds, 0 - disabled)
+-cfg.feeds_update_interval=0
++cfg.feeds_update_interval=3600
+ cfg.playlists_update_interval=0
+ -- playlist (m3u file path or path with alias
+ playlist=
+ {
++   { '/media/sda1/movies', 'Local Record Files' },
++   { '/media/sda1/pic', 'Local Picture Files' },
+ --    { './playlists/mozhay.m3u', 'Mozhay.tv' },
+ --    { './localmedia', 'Local Media Files' }
+ --    { './private', 'Private Media Files', '127.0.0.1;192.168.1.1' }  -- only for 127.0.0.1 and 192.168.1.1
+@@ -86,10 +89,10 @@ playlist=
+ -- feeds list (plugin, feed name, feed type)
+ feeds=
+ {
+-    { 'vimeo',          'channel/hd',           'Vimeo HD Channel' },
+-    { 'vimeo',          'channel/hdxs',         'Vimeo Xtreme sports' },
+-    { 'vimeo',          'channel/mtb',          'Vimeo MTB Channel' },
+-    { 'youtube',        'channel/top_rated',    'YouTube Top Rated' },
++--   { 'vimeo',          'channel/hd',           'Vimeo HD Channel' },
++--   { 'vimeo',          'channel/hdxs',         'Vimeo Xtreme sports' },
++--   { 'vimeo',          'channel/mtb',          'Vimeo MTB Channel' },
++--   { 'youtube',        'channel/top_rated',    'YouTube Top Rated' },
+ --    { 'youtube',        'Drift0r',              'Drift0r' },
+ --    { 'youtube',        'XboxAhoy',             'XboxAhoy' },
+ --    { 'ag',             'videos',               'AG - New' },
+@@ -97,6 +100,8 @@ feeds=
+ --    { 'gametrailers',   'ps3',                   'GT - PS3' },
+ --    { 'giantbomb',      'all',                  'GiantBomb - All' },
+ --    { 'dreambox',       'http://192.168.0.1:8001/','Dreambox1' },
++   { 'coolstream',       'localhost', 'Tank' },
++--   { 'coolstream',       '172.16.1.10', 'NEO' },
+ }
+ -- log ident, pid file end www root
+@@ -107,8 +112,9 @@ cfg.www_root='./www/'
+ cfg.tmp_path='/tmp/'
+ cfg.plugin_path='./plugins/'
+ cfg.config_path='./config/'
+-cfg.playlists_path='./playlists/'
+---cfg.feeds_path='/tmp/xupnpd-feeds/'
++cfg.playlists_path='/tmp/playlists/'
++--cfg.playlists_path='./playlists/'
++cfg.feeds_path='/tmp/xupnpd-feeds/'
+ cfg.ui_path='./ui/'
+ cfg.drive=''                    -- reload playlists only if drive state=active/idle, example: cfg.drive='/dev/sda'
+ cfg.profiles='./profiles/'      -- device profiles feature
+-- 
+2.2.2
+
diff --git a/archive-patches/xupnpd/svnr404/0003-xupnp-Patch-3.patch b/archive-patches/xupnpd/svnr404/0003-xupnp-Patch-3.patch
new file mode 100644 (file)
index 0000000..2f6ba2a
--- /dev/null
@@ -0,0 +1,22 @@
+From da180d0a2c88bef403bb93a90a1c859cb160ab66 Mon Sep 17 00:00:00 2001
+From: "M. Liebmann" <tuxcode.bbg@gmail.com>
+Date: Sun, 26 Jan 2014 22:11:50 +0100
+Subject: [PATCH 3/4] xupnp: Patch #3
+
+---
+ src/.gitignore | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 src/.gitignore
+
+diff --git a/src/.gitignore b/src/.gitignore
+new file mode 100644
+index 0000000..f7c3942
+--- /dev/null
++++ b/src/.gitignore
+@@ -0,0 +1,3 @@
++*.o
++*.orig
++xupnpd-*
+-- 
+2.2.2
+
diff --git a/archive-patches/xupnpd_cst.diff b/archive-patches/xupnpd_cst.diff
deleted file mode 100644 (file)
index 267f4f1..0000000
+++ /dev/null
@@ -1,307 +0,0 @@
-diff -Naur src/Makefile src/Makefile
---- src/Makefile       2013-09-16 12:59:07.000000000 +0200
-+++ src/Makefile       2013-09-16 15:51:00.000000000 +0200
-@@ -56,15 +56,16 @@
- dreambox:
-       $(MAKE) embedded TARGET=mipsel_dreambox SDK=/opt/mipsel-unknown-linux-gnu/bin
-+CST:
-+      $(MAKE) embedded 
- embedded:
--      export PATH
--      export STAGING_DIR
--      make -C $(LUA) CC=$(SDK)/gcc a MYCFLAGS='$(LUAMYCFLAGS)'
--      $(SDK)/gcc -O2 -c -o md5.o md5c.c
--      $(SDK)/gcc $(CFLAGS) -DWITH_URANDOM -o xupnpd-$(TARGET) $(SRC) md5.o -llua -lm -ldl
--      $(SDK)/strip xupnpd-$(TARGET)
--
-+#     export PATH
-+#     export STAGING_DIR
-+      make -C $(LUA) CC=arm-cx2450x-linux-gnueabi-gcc a MYCFLAGS='$(LUAMYCFLAGS)'
-+      arm-cx2450x-linux-gnueabi-gcc -O2 -c -o md5.o md5c.c
-+      arm-cx2450x-linux-gnueabi-gcc $(CFLAGS) -DWITH_URANDOM -o xupnpd $(SRC) md5.o -llua -lm -ldl
-+      arm-cx2450x-linux-gnueabi-strip xupnpd
- clean:
-       make -C $(LUA) clean
-       rm -f $(LUA)/liblua.a
-diff -Naur src/plugins/xupnpd_coolstream.lua src/plugins/xupnpd_coolstream.lua
---- src/plugins/xupnpd_coolstream.lua  1970-01-01 01:00:00.000000000 +0100
-+++ src/plugins/xupnpd_coolstream.lua  2013-09-03 13:32:22.000000000 +0200
-@@ -0,0 +1,174 @@
-+-- Plugin for converting channels lists from coolstream receivers
-+-- Author focus.cst@gmail.com
-+-- License GPL v2
-+-- Copyright (C) 2013 CoolStream International Ltd
-+
-+-- flag to test as plain script, without xupnpd - cfg not defined in this case
-+local cst_test =  false
-+
-+if not cfg then
-+cfg={}
-+cfg.tmp_path='/tmp/'
-+cfg.feeds_path='/tmp/'
-+cfg.debug=1
-+cst_test = true
-+end
-+
-+function cst_debug(level, msg)
-+      if cfg.debug>level then
-+              print(msg)
-+      end
-+end
-+
-+function cst_get_bouquets(file)
-+      local btable={}
-+      repeat
-+              local string=file:read()
-+              if string then
-+                      cst_debug(1, "########## bouquet="..string)
-+                      local num = string.match(string, "%d+");
-+                      if num then
-+                              local len = string.len(num);
-+                              local name = string.sub(string, len+1);
-+                              btable[num] = name
-+                              cst_debug(1, "num="..num.." name="..btable[num]);
-+                      end
-+                      --break; -- one bouquet
-+              end
-+      until not string
-+      return btable
-+end
-+
-+function cst_get_channels(file)
-+      local ctable={}
-+      repeat
-+              local string=file:read()
-+              idx = 1;
-+              if string then
-+                      cst_debug(1, "########## channel="..string)
-+                      local num = string.match(string, "%d+");
-+                      if num then
-+                              local len = string.len(num);
-+                              local rest = string.sub(string, len+1);
-+                              local id = string.match(rest, "%x+ ");
-+                              len = string.len(id);
-+                              local name = string.sub(rest, len+2);
-+                              cst_debug(1, "num="..num.." id="..id.." name="..name)
-+                              if id and name then
-+                                      table.insert(ctable, {id, name});
-+                                      idx = idx + 1;
-+                              end
-+                      end
-+              end
-+      until not string        
-+      return ctable
-+end
-+
-+-- all bouquets
-+-- local burl = "getbouquets"
-+-- only favorites
-+local burl = "getbouquets?fav=true"
-+
-+-- without epg
-+-- local curl = "getbouquet?bouquet="
-+-- with epg
-+local curl = "getbouquet?epg=true&bouquet="
-+
-+function cst_updatefeed(feed,friendly_name)
-+      local rc=false
-+      local feedspath = cfg.feeds_path
-+      if not friendly_name then
-+              friendly_name = feed
-+      end
-+      local wget = "wget -q -O- "
-+      local cst_url = 'http://'..feed..'/control/'
-+
-+      cst_debug(0, wget..cst_url..burl)
-+      local bouquetsfile = io.popen(wget..cst_url..burl)
-+      local bouquets = cst_get_bouquets(bouquetsfile)
-+      bouquetsfile:close()
-+
-+      if not bouquets then
-+              return rc
-+      end
-+      local bindex
-+      local bouquett = {}
-+      for bindex,bouquett in pairs(bouquets) do
-+              local cindex
-+              local channelt = {}
-+              cst_debug(0,wget.."\""..cst_url..curl..bindex.."\"")
-+              local xmlbouquetfile = io.popen(wget.."\""..cst_url..curl..bindex.."\"")
-+              local bouquet = cst_get_channels(xmlbouquetfile)
-+              xmlbouquetfile:close()
-+              if bouquet then
-+                      local m3ufilename = cfg.tmp_path.."cst_"..friendly_name.."_bouquet_"..bindex..".m3u"
-+                      cst_debug(0, m3ufilename)
-+                      local m3ufile = io.open(m3ufilename,"w")
-+                      m3ufile:write("#EXTM3U name=\""..bouquett.." ("..friendly_name..")\" plugin=coolstream type=ts\n")
-+                      for cindex,channelt in pairs(bouquet) do
-+                              local id = channelt[1];
-+                              local name = channelt[2];
-+                              m3ufile:write("#EXTINF:0,"..name.."\n")
-+                              -- m3ufile:write(cst_url.."zapto?"..id.."\n")
-+                              m3ufile:write("http://"..feed..":31339/id="..id.."\n")
-+                      end
-+                      m3ufile:close()
-+                      os.execute(string.format('mv %s %s',m3ufilename,feedspath))
-+                      rc=true
-+              end
-+      end
-+      return rc
-+end
-+
-+function cst_read_url(url)
-+      local wget = "wget -q -O- "
-+      local turl = wget..url
-+      cst_debug(0, turl)
-+      local file = io.popen(turl)
-+      local string = file:read()
-+      file:close()
-+      return string
-+end
-+
-+function cst_zapto(urlbase,id)
-+      local zap = urlbase.."/control/zapto?"..id;
-+      cst_read_url(zap)
-+end
-+
-+function cst_sendurl(cst_url,range)
-+      local i,j,baseurl = string.find(cst_url,"(.+):.+")
-+      cst_debug(0, "cst_sendurl: url="..cst_url.." baseurl="..baseurl)
-+
-+      i,j,id = string.find(cst_url,".*id=(.+)")
-+      local surl = baseurl.."/control/standby"
-+      local standby = cst_read_url(surl)
-+
-+      if standby then
-+              cst_debug(0, "standby="..standby)
-+
-+              -- wakeup from standby
-+              if string.find(standby,"on") then
-+                      cst_read_url(surl.."?off")
-+              end
-+      end
-+      -- zap to channel
-+      cst_zapto(baseurl,id)
-+
-+      if not cst_test then
-+              plugin_sendurl(cst_url,cst_url,range)
-+      end
-+end
-+
-+if cst_test then
-+cst_updatefeed("172.16.1.20","tank")
-+-- cst_updatefeed("172.16.1.10","tank")
-+-- cst_sendurl("http://172.16.1.20:31339/id=c1f000010070277a", 0)
-+end
-+
-+if not cst_test then
-+plugins['coolstream']={}
-+plugins.coolstream.name="CoolStream"
-+plugins.coolstream.desc="IP address (example: <i>192.168.0.1</i>)"
-+plugins.coolstream.updatefeed=cst_updatefeed
-+plugins.coolstream.sendurl=cst_sendurl
-+end
-diff -Naur src/xupnpd.lua src/xupnpd.lua
---- src/xupnpd.lua     2013-09-16 12:59:07.000000000 +0200
-+++ src/xupnpd.lua     2013-09-03 13:39:17.000000000 +0200
-@@ -1,13 +1,13 @@
- cfg={}
- -- multicast interface for SSDP exchange, 'eth0', 'br0', 'br-lan' for example
--cfg.ssdp_interface='lo'
-+cfg.ssdp_interface='any'
- -- 'cfg.ssdp_loop' enables multicast loop (if player and server in one host)
- cfg.ssdp_loop=1
- -- SSDP announcement interval
--cfg.ssdp_notify_interval=15
-+cfg.ssdp_notify_interval=5
- -- SSDP announcement age
- cfg.ssdp_max_age=1800
-@@ -19,10 +19,10 @@
- cfg.log_facility='local0'
- -- 'cfg.daemon' detach server from terminal
--cfg.daemon=false
-+cfg.daemon=true
- -- silent mode - no logs, no pid file
--cfg.embedded=false
-+cfg.embedded=true
- -- 'cfg.debug' enables SSDP debug output to stdout (if cfg.daemon=false)
- -- 0-off, 1-basic, 2-messages
-@@ -32,7 +32,7 @@
- --cfg.udpxy_url='http://192.168.1.1:4022'
- -- downstream interface for builtin multicast proxy (comment 'cfg.udpxy_url' for processing 'udp://@...' playlists)
--cfg.mcast_interface='eth1'
-+cfg.mcast_interface='eth0'
- -- 'cfg.proxy' enables proxy for injection DLNA headers to stream
- -- 0-off, 1-radio, 2-radio/TV
-@@ -48,7 +48,7 @@
- cfg.dlna_notify=true
- -- group by 'group-title'
--cfg.group=true
-+cfg.group=false
- -- sort files
- cfg.sort_files=false
-@@ -69,12 +70,14 @@
- cfg.default_mime_type='mpeg'
- -- feeds update interval (seconds, 0 - disabled)
--cfg.feeds_update_interval=0
-+cfg.feeds_update_interval=3600
- cfg.playlists_update_interval=0
- -- playlist (m3u file path or path with alias
- playlist=
- {
-+   { '/media/sda1/movies', 'Local Record Files' },
-+   { '/media/sda1/pic', 'Local Picture Files' },
- --    { './playlists/mozhay.m3u', 'Mozhay.tv' },
- --    { './localmedia', 'Local Media Files' }
- --    { './private', 'Private Media Files', '127.0.0.1;192.168.1.1' }  -- only for 127.0.0.1 and 192.168.1.1
-@@ -83,10 +86,10 @@
- -- feeds list (plugin, feed name, feed type)
- feeds=
- {
--    { 'vimeo',          'channel/hd',           'Vimeo HD Channel' },
--    { 'vimeo',          'channel/hdxs',         'Vimeo Xtreme sports' },
--    { 'vimeo',          'channel/mtb',          'Vimeo MTB Channel' },
--    { 'youtube',        'channel/top_rated',    'YouTube Top Rated' },
-+--   { 'vimeo',          'channel/hd',           'Vimeo HD Channel' },
-+--   { 'vimeo',          'channel/hdxs',         'Vimeo Xtreme sports' },
-+--   { 'vimeo',          'channel/mtb',          'Vimeo MTB Channel' },
-+--   { 'youtube',        'channel/top_rated',    'YouTube Top Rated' },
- --    { 'youtube',        'Drift0r',              'Drift0r' },
- --    { 'youtube',        'XboxAhoy',             'XboxAhoy' },
- --    { 'ag',             'videos',               'AG - New' },
-@@ -94,6 +97,8 @@
- --    { 'gametrailers',   'ps3',                   'GT - PS3' },
- --    { 'giantbomb',      'all',                  'GiantBomb - All' },
- --    { 'dreambox',       'http://192.168.0.1:8001/','Dreambox1' },
-+   { 'coolstream',       'localhost', 'Tank' },
-+--   { 'coolstream',       '172.16.1.10', 'NEO' },
- }
- -- log ident, pid file end www root
-@@ -104,8 +109,9 @@
- cfg.tmp_path='/tmp/'
- cfg.plugin_path='./plugins/'
- cfg.config_path='./config/'
--cfg.playlists_path='./playlists/'
----cfg.feeds_path='/tmp/xupnpd-feeds/'
-+cfg.playlists_path='/tmp/playlists/'
-+--cfg.playlists_path='./playlists/'
-+cfg.feeds_path='/tmp/xupnpd-feeds/'
- cfg.ui_path='./ui/'
- cfg.drive=''                    -- reload playlists only if drive state=active/idle, example: cfg.drive='/dev/sda'
- cfg.profiles='./profiles/'      -- device profiles feature
index 79813ad26d9249a75393c14907af8f06ad5ee94d..382a3317f92568da00481dae15388c78873b3e81 100755 (executable)
@@ -613,21 +613,62 @@ $(D)/libupnp: $(ARCHIVE)/libupnp-1.6.17.tar.bz2 | $(TARGETPREFIX)
        $(REMOVE)/libupnp-1.6.17
        touch $@
 
-$(D)/xupnpd: $(D)/udpxy | $(TARGETPREFIX)
-       set -e; cd $(BUILD_TMP); \
-       rm -rf xupnpd; \
-       svn co http://tsdemuxer.googlecode.com/svn/trunk/xupnpd xupnpd; \
-       pushd $(BUILD_TMP)/xupnpd/src && \
-               $(PATCH)/xupnpd_cst.diff; \
-               $(MAKE) CST && \
-               cp -f $(BUILD_TMP)/xupnpd/src/xupnpd $(TARGETPREFIX)/bin/ && \
-               mkdir -p $(TARGETPREFIX)/share/xupnpd/ && \
-               cp -rf $(BUILD_TMP)/xupnpd/src/playlists $(TARGETPREFIX)/share/xupnpd/ && \
-               cp -rf $(BUILD_TMP)/xupnpd/src/plugins $(TARGETPREFIX)/share/xupnpd/ && \
-               cp -rf $(BUILD_TMP)/xupnpd/src/profiles $(TARGETPREFIX)/share/xupnpd/ && \
-               cp -rf $(BUILD_TMP)/xupnpd/src/www $(TARGETPREFIX)/share/xupnpd/ && \
-               cp -rf $(BUILD_TMP)/xupnpd/src/ui $(TARGETPREFIX)/share/xupnpd/ && \
-               cp -f $(BUILD_TMP)/xupnpd/src/*.lua $(TARGETPREFIX)/share/xupnpd/ && \
+XUPNP_DEFREF = r404
+XUPNP_DL_PATH = http://tsdemuxer.googlecode.com/svn/trunk/xupnpd
+
+$(BUILD_TMP)/xupnpd/src/Makefile:
+       if [ -e $(BUILD_TMP)/xupnpd ]; then \
+               rm -fr $(BUILD_TMP)/xupnpd; \
+       fi; \
+       mkdir -p $(BUILD_TMP)/xupnpd;
+       cd $(BUILD_TMP)/xupnpd; \
+               git svn init $(XUPNP_DL_PATH) --ignore-paths="^src/lua-5" ; \
+               git svn fetch --revision=360:HEAD; \
+               git svn rebase; \
+               ID=$$(git svn find-rev $(XUPNP_DEFREF)); \
+               git checkout $$ID; \
+               git checkout -b work; \
+               git am $(PATCHES)/xupnpd/svn$(XUPNP_DEFREF)/*.patch; \
+               git rebase master
+
+xupnpd-update: $(BUILD_TMP)/xupnpd/src/Makefile | $(TARGETPREFIX)
+       cd $(BUILD_TMP)/xupnpd; \
+               REV1=$$(git svn find-rev master --before HEAD); \
+               git checkout master; \
+               git svn fetch; \
+               git svn rebase; \
+               git checkout work; \
+               REV2=$$(git svn find-rev master --before HEAD); \
+               if [ ! "$$REV1" = "$$REV2" ]; then \
+                       echo "before: r$$REV1, after: r$$REV2"; \
+                       echo "git rebase master"; \
+                       git rebase master; \
+               else \
+                       echo "before: r$$REV1, after: r$$REV2"; \
+                       echo "No changes..."; \
+               fi
+
+$(D)/xupnpd: $(D)/udpxy $(D)/lua $(BUILD_TMP)/xupnpd/src/Makefile | $(TARGETPREFIX)
+       set -e; cd $(BUILD_TMP)/xupnpd; \
+               git checkout work; \
+               cd src; \
+               make clean; \
+               make embedded \
+                       CC=$(TARGET)-gcc \
+                       STRIP=$(TARGET)-strip \
+                       LUAFLAGS="-I$(TARGETPREFIX)/include -L$(TARGETPREFIX)/lib -L$(TARGETPREFIX_BASE)/lib";
+               cp -f $(BUILD_TMP)/xupnpd/src/xupnpd $(TARGETPREFIX)/bin/
+               mkdir -p $(TARGETPREFIX)/share/xupnpd/
+               cp -rf $(SOURCE_DIR)/git/PLUGINS/scripts-lua/xupnpd/xupnpd_18*.lua $(BUILD_TMP)/xupnpd/src/plugins/staff
+               cp -rf $(SOURCE_DIR)/git/PLUGINS/scripts-lua/xupnpd/xupnpd_cc*.lua $(BUILD_TMP)/xupnpd/src/plugins/staff
+               cp -rf $(SOURCE_DIR)/git/PLUGINS/scripts-lua/xupnpd/xupnpd_co*.lua $(BUILD_TMP)/xupnpd/src/plugins
+               cp -rf $(SOURCE_DIR)/git/PLUGINS/scripts-lua/xupnpd/xupnpd_yo*.lua $(BUILD_TMP)/xupnpd/src/plugins
+               cp -rf $(BUILD_TMP)/xupnpd/src/playlists $(TARGETPREFIX)/share/xupnpd/
+               cp -rf $(BUILD_TMP)/xupnpd/src/plugins $(TARGETPREFIX)/share/xupnpd/
+               cp -rf $(BUILD_TMP)/xupnpd/src/profiles $(TARGETPREFIX)/share/xupnpd/
+               cp -rf $(BUILD_TMP)/xupnpd/src/www $(TARGETPREFIX)/share/xupnpd/
+               cp -rf $(BUILD_TMP)/xupnpd/src/ui $(TARGETPREFIX)/share/xupnpd/
+               cp -f $(BUILD_TMP)/xupnpd/src/*.lua $(TARGETPREFIX)/share/xupnpd/
        $(REMOVE)/xupnpd
        touch $@