summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Ulyanov <disinbox@gmail.com>2012-08-18 12:28:26 +0400
committerIgor Ulyanov <disinbox@gmail.com>2012-08-18 12:28:26 +0400
commitf139c3655a35c83bad7568ae266939df05fd6a72 (patch)
tree56d7c32e21960315e24aee223b99c0eaaed3c806 /net-misc
parent0ad is now in sunrise overlay (diff)
downloaddisplacer-f139c3655a35c83bad7568ae266939df05fd6a72.tar.gz
displacer-f139c3655a35c83bad7568ae266939df05fd6a72.tar.bz2
displacer-f139c3655a35c83bad7568ae266939df05fd6a72.zip
xupnpd added
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/xupnpd/Manifest4
-rw-r--r--net-misc/xupnpd/files/makefile.patch23
-rw-r--r--net-misc/xupnpd/files/xupnpd.envd1
-rw-r--r--net-misc/xupnpd/files/xupnpd.init25
-rw-r--r--net-misc/xupnpd/xupnpd-9999.ebuild73
5 files changed, 126 insertions, 0 deletions
diff --git a/net-misc/xupnpd/Manifest b/net-misc/xupnpd/Manifest
new file mode 100644
index 0000000..457270a
--- /dev/null
+++ b/net-misc/xupnpd/Manifest
@@ -0,0 +1,4 @@
+AUX makefile.patch 790 RMD160 ceb1fe5ea8166ff0a558668d6dc2ec5747e0e63e SHA1 b2993aa461d54256498bcada552f051973412fc6 SHA256 997c03f32f4c6fdf1aecd064022489d7cbda5d386276ff4b5fadcd453fdaaf9d
+AUX xupnpd.envd 46 RMD160 33f640e6dfeb43ce91a2915ecd3f1443459ec6d8 SHA1 b5eedbae070ed0d164179b451ff776b889c02907 SHA256 5df3f7da911af94dee314b1dfe0f2f737404bfe4f2bac15459e6bdbbd6bc7911
+AUX xupnpd.init 526 RMD160 8a25b3bacce7bbf856118b13970a6660196fcdb1 SHA1 a3d6f3e54e965e17fd1f80ea65e440d108de16e3 SHA256 2db1412eca31ee18c681c7cc2b56b1e417e30657efe8c271c684db8527b77f0b
+EBUILD xupnpd-9999.ebuild 1891 RMD160 598934b9e184b188e70c163f733d4d2f7ccbf8f8 SHA1 4081fff7a0bb58471dca7759e3db985877476fac SHA256 8e1c62aca323c0a29a90e1fc8bbf7ead8adf7ad708efaa77635822d3a713ebdf
diff --git a/net-misc/xupnpd/files/makefile.patch b/net-misc/xupnpd/files/makefile.patch
new file mode 100644
index 0000000..7a051ab
--- /dev/null
+++ b/net-misc/xupnpd/files/makefile.patch
@@ -0,0 +1,23 @@
+diff --git a/src/Makefile b/src/Makefile
+index ad6622f..ad0c9a4 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -1,13 +1,11 @@
+-LUA = lua-5.1.4
+-#LUA = lua-5.2.0
+-CFLAGS = -fno-exceptions -fno-rtti -O2 -I$(LUA) -L$(LUA)
++CC ?= gcc
++CXX ?= g++
++
+ SRC = main.cpp soap.cpp mem.cpp mcast.cpp luaxlib.cpp luaxcore.cpp luajson.cpp luajson_parser.cpp
+
+ x86:
+- make -C $(LUA) CC=gcc a
+- gcc -O2 -c -o md5.o md5c.c
+- gcc $(CFLAGS) -DWITH_LIBUUID -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -o xupnpd $(SRC) md5.o -llua -ldl -lm -luuid
+- strip xupnpd
++ $(CC) $(CFLAGS) -c -o md5.o md5c.c
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) -fno-exceptions -fno-rtti -DWITH_LIBUUID -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -o xupnpd $(SRC) md5.o -llua -ldl -lm -luuid
+
+ x86_bsd:
+ make -C $(LUA) CC=gcc a
diff --git a/net-misc/xupnpd/files/xupnpd.envd b/net-misc/xupnpd/files/xupnpd.envd
new file mode 100644
index 0000000..b722166
--- /dev/null
+++ b/net-misc/xupnpd/files/xupnpd.envd
@@ -0,0 +1 @@
+CONFIG_PROTECT="/usr/share/xupnpd/xupnpd.lua"
diff --git a/net-misc/xupnpd/files/xupnpd.init b/net-misc/xupnpd/files/xupnpd.init
new file mode 100644
index 0000000..704b411
--- /dev/null
+++ b/net-misc/xupnpd/files/xupnpd.init
@@ -0,0 +1,25 @@
+#!/sbin/runscript
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+depend() {
+ need localmount net
+ after bootmisc
+ use logger
+}
+
+start() {
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --exec /usr/bin/xupnpd \
+ --pidfile /var/run/xupnpd.pid \
+ -e XUPNPDROOTDIR=/usr/share/xupnpd
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --exec /usr/bin/xupnpd \
+ --pidfile /var/run/xupnpd.pid \
+ eend $?
+}
+
diff --git a/net-misc/xupnpd/xupnpd-9999.ebuild b/net-misc/xupnpd/xupnpd-9999.ebuild
new file mode 100644
index 0000000..4fe5a87
--- /dev/null
+++ b/net-misc/xupnpd/xupnpd-9999.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+inherit subversion
+
+DESCRIPTION="Light DLNA Media Server"
+HOMEPAGE="http://xupnpd.org/ https://code.google.com/p/tsdemuxer/"
+SRC_URI=""
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+IUSE=""
+
+DEPEND="=dev-lang/lua-5.1*"
+RDEPEND="${DEPEND}"
+
+ESVN_REPO_URI="http://tsdemuxer.googlecode.com/svn/trunk/xupnpd"
+
+pkg_setup() {
+ tc-export CC CXX
+}
+
+src_unpack() {
+ subversion_src_unpack
+ subversion_wc_info
+}
+
+src_prepare() {
+ cd src || die "Can't cd to src"
+ rm -rf lua-5* || die "Faild removing bundled lua"
+ epatch "${FILESDIR}"/makefile.patch
+ sed -i -e "/cfg\.version/s/1.0-rc8/1.0-rc8-${ESVN_WC_REVISION}/" xupnpd.lua || die "Failed sed to change version"
+ sed -i -e "/cfg\.playlists/s/\.\/playlists/\/etc\/xupnpd\/playlists/" xupnpd.lua || die "Failed sed to change playlists poath"
+}
+
+src_compile() {
+ cd src || die "Can't cd to src"
+ emake || die "emake failed"
+}
+
+src_install() {
+ dodoc README src/ui/*.txt
+
+ dobin src/xupnpd
+
+ insinto /usr/share/xupnpd/
+ doins src/xupnpd_*.lua
+
+ insinto /etc/xupnpd/playlists/
+ doins src/playlists/*.m3u
+
+ insinto /etc/xupnpd/playlists/example/
+ doins src/playlists/example/*.m3u
+
+ insinto /usr/share/xupnpd/plugins/
+ doins src/plugins/*.lua
+
+ insinto /usr/share/xupnpd/ui/
+ doins src/ui/*.lua src/ui/*.css src/ui/*.html
+
+ insinto /usr/share/xupnpd/www/
+ doins src/www/*.html src/www/*.xml src/www/*.mp4 src/www/*.ico src/www/icon-48x48.png
+
+ sed "s/cfg.ssdp_interface='lo'/cfg.ssdp_interface='eth0'/g;s/cfg.ssdp_loop=1/cfg.ssdp_loop=0/g;s/cfg.mcast_interface='eth1'/cfg.mcast_interface='eth0'/g" \
+ < src/xupnpd.lua > "$D"/usr/share/xupnpd/xupnpd.lua || die "Failed sed to modify config"
+ dosym /usr/share/xupnpd/xupnpd.lua /etc/xupnpd/xupnpd.lua
+
+ newenvd "${FILESDIR}"/xupnpd.envd 99xupnpd
+ newinitd "${FILESDIR}"/xupnpd.init xupnpd
+}