summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD85
-rw-r--r--makefile.patch55
-rw-r--r--res_and_conf_dirs.patch36
-rw-r--r--xupnpd.service4
-rw-r--r--xupnpd.sysusers (renamed from sysusers.conf)0
6 files changed, 114 insertions, 87 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 73f5920fa9ac..ebb237b1e7d0 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,29 +1,26 @@
-# Generated by mksrcinfo v8
-# Sat Apr 6 05:09:36 UTC 2019
pkgbase = xupnpd
pkgdesc = eXtensible UPnP agent (proxy IP TV multicast to DLNA)
- pkgver = 1.033
- pkgrel = 7
+ pkgver = 1.034.r115.g2bc1e74
+ pkgrel = 2
url = http://xupnpd.org
arch = x86_64
arch = i686
arch = arm
arch = armv6h
arch = armv7h
+ arch = aarch64
license = GPL2
makedepends = git
- makedepends = lua
- makedepends = lua52-luajson
+ depends = lua
optdepends = udpxy: custom udp to http proxy
backup = var/lib/xupnpd/xupnpd.lua
- source = xupnpd::git+https://github.com/clark15b/xupnpd
- source = res_and_conf_dirs.patch
+ source = xupnpd::git+https://github.com/clark15b/xupnpd#commit=2bc1e741e0efe04cb3150430ff25410093618b4f
source = xupnpd.service
- source = sysusers.conf
+ source = xupnpd.sysusers
+ source = makefile.patch
sha256sums = SKIP
- sha256sums = 95d436d2bc55bd6fb8affdc4901045d0600092a6045a34f977f79a5950638114
- sha256sums = 0f6c2a42f676c24dba7bebc804a34f363b12e2dcb4c61bc547c0b722afe09808
+ sha256sums = c5404309699c528e09ff399da1253e3ab6006040c51a1ad6c63d59f1f43c356e
sha256sums = 3f669a1034bcfb9923822fb0adf6d5a379beb7a184a89cd4d72a5b02bc072852
+ sha256sums = c86de2d435c37d6b2560e844291843d159c643052f82126774ee5ff809e05adb
pkgname = xupnpd
-
diff --git a/PKGBUILD b/PKGBUILD
index adeb4dd04033..904ac2353a7d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,53 +1,64 @@
-# Maintainer: Konstantin Shalygin <k0ste@k0ste.ru>
+# Maintainer: Tomasz Maciej Nowak <com[dot]gmail[at]tmn505>
# Contributor: Konstantin Shalygin <k0ste@k0ste.ru>
-# Contributor: Tomasz Maciej Nowak <com[dot]gmail[at]tmn505>
-pkgname='xupnpd'
-pkgdesc="eXtensible UPnP agent (proxy IP TV multicast to DLNA)"
-pkgver='1.033'
-pkgrel='7'
-arch=('x86_64' 'i686' 'arm' 'armv6h' 'armv7h')
+# All my PKGBUILDs are managed at https://github.com/tmn505/AUR
+
+pkgname=xupnpd
+pkgver=1.034.r115.g2bc1e74
+pkgrel=2
+pkgdesc='eXtensible UPnP agent (proxy IP TV multicast to DLNA)'
+arch=('x86_64' 'i686' 'arm' 'armv6h' 'armv7h' 'aarch64')
url="http://${pkgname}.org"
license=('GPL2')
-makedepends=('git' 'lua' 'lua52-luajson')
+depends=('lua')
+makedepends=('git')
optdepends=('udpxy: custom udp to http proxy')
-source=("${pkgname}::git+https://github.com/clark15b/${pkgname}"
- "res_and_conf_dirs.patch"
+backup=("var/lib/${pkgname}/${pkgname}.lua")
+source=("${pkgname}::git+https://github.com/clark15b/${pkgname}#commit=2bc1e741e0efe04cb3150430ff25410093618b4f"
"${pkgname}.service"
- "sysusers.conf")
+ "${pkgname}.sysusers"
+ 'makefile.patch')
sha256sums=('SKIP'
- '95d436d2bc55bd6fb8affdc4901045d0600092a6045a34f977f79a5950638114'
- '0f6c2a42f676c24dba7bebc804a34f363b12e2dcb4c61bc547c0b722afe09808'
- '3f669a1034bcfb9923822fb0adf6d5a379beb7a184a89cd4d72a5b02bc072852')
-_var="var/lib/${pkgname}"
-_usr="usr/share/${pkgname}"
-backup=("${_var}/${pkgname}.lua")
+ 'c5404309699c528e09ff399da1253e3ab6006040c51a1ad6c63d59f1f43c356e'
+ '3f669a1034bcfb9923822fb0adf6d5a379beb7a184a89cd4d72a5b02bc072852'
+ 'c86de2d435c37d6b2560e844291843d159c643052f82126774ee5ff809e05adb')
prepare() {
- cd "${srcdir}"
- patch -p0 -i ./res_and_conf_dirs.patch
+ cd "${srcdir}/${pkgname}/src"
+ patch -p2 -i "${srcdir}/makefile.patch"
+ sed -e 's,/run,/lib/xupnpd,' -i xupnpd.lua
+}
+
+pkgver() {
+ cd "${srcdir}/${pkgname}"
+ printf "%s.r%s.g%s" \
+ "$(awk -F\' '/version/ {printf $2}' src/xupnpd.lua)" \
+ "$(git rev-list --count HEAD)" \
+ "$(git rev-parse --short=7 HEAD)"
}
build() {
- cd "${srcdir}/${pkgname}/src"
- make
+ cd "${srcdir}/${pkgname}/src"
+ make MY_CFLAGS="${CFLAGS}"
}
package() {
- cd ${srcdir}
- install -Dm0644 "${pkgname}.service" "${pkgdir}/usr/lib/systemd/system/${pkgname}.service"
- install -Dm0644 "sysusers.conf" "${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf"
- cd "${pkgname}/src"
- install -Dm0755 "${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
- install -dm0755 -o 187 -g 187 "${pkgdir}/run/${pkgname}"
- install -dm0755 -o 187 -g 187 "${pkgdir}/${_var}/config"
- install -dm0755 -o 187 -g 187 "${pkgdir}/${_var}/localmedia"
- install -Dm0644 -o 187 -g 187 *.lua -t "${pkgdir}/${_var}"
- cp -ax "playlists" "${pkgdir}/${_var}"
- chown -R 187:187 "${pkgdir}/${_var}/playlists"
- install -dm0755 "${pkgdir}/${_usr}"
- cp -ax "plugins" "${pkgdir}/${_usr}"
- cp -ax "profiles" "${pkgdir}/${_usr}"
- cp -ax "ui" "${pkgdir}/${_usr}"
- cp -ax "www" "${pkgdir}/${_usr}"
+ cd "${srcdir}"
+ install -Dm0644 "${pkgname}.service" "${pkgdir}/usr/lib/systemd/system/${pkgname}.service"
+ install -Dm0644 "${pkgname}.sysusers" "${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf"
+
+ cd "${pkgname}/src"
+ install -Dm0755 "${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
+
+ install -dm0755 "${pkgdir}/var/lib/${pkgname}/examples"
+ install -dm0755 "${pkgdir}/var/lib/${pkgname}/localmedia"
+ install -dm0755 "${pkgdir}/var/lib/${pkgname}/playlists"
+ install -Dm0644 *.lua -t "${pkgdir}/var/lib/${pkgname}"
+ cp -ax "config" "${pkgdir}/var/lib/${pkgname}"
+ cp -ax "playlists" "${pkgdir}/var/lib/${pkgname}/examples"
+ cp -ax "plugins" "${pkgdir}/var/lib/${pkgname}"
+ cp -ax "profiles" "${pkgdir}/var/lib/${pkgname}"
+ cp -ax "ui" "${pkgdir}/var/lib/${pkgname}"
+ cp -ax "www" "${pkgdir}/var/lib/${pkgname}"
+ chown -R 187:187 "${pkgdir}/var/lib/${pkgname}"
}
diff --git a/makefile.patch b/makefile.patch
new file mode 100644
index 000000000000..21ffe4e74ec9
--- /dev/null
+++ b/makefile.patch
@@ -0,0 +1,55 @@
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -1,13 +1,6 @@
+-# x86
+-STAGING_DIR =
+-BIN =
+-LIBEXEC =
+-CC = gcc
+-CPP = g++
+-STRIP = strip
++CC ?= gcc
++CXX ?= g++
+ RM = rm
+-PLATFORM = x86
+-TARGET_DIR = .
+-MY_CFLAGS =
++MY_CFLAGS ?=
+
+ include rules.mk
+--- a/src/rules.mk
++++ b/src/rules.mk
+@@ -1,25 +1,17 @@
+-LUA = lua-5.3.5
+-CFLAGS = -fno-exceptions -fno-rtti -Os -I$(LUA) $(MY_CFLAGS) -DWITHOUT_OPENSSL
++CFLAGS = $(MY_CFLAGS) -fno-exceptions -fno-rtti -Os -DWITHOUT_OPENSSL
+ OBJS = main.o soap.o mem.o mcast.o luaxlib.o luaxcore.o luajson.o luajson_parser.o md5c.o
+-LIBS = $(LUA)/liblua.a
+
+-all: $(LIBS) $(OBJS)
+- PATH=$(PATH):$(LIBEXEC) STAGING_DIR=$(STAGING_DIR) $(CC) -B $(LIBEXEC) $(CFLAGS) -o $(TARGET_DIR)/xupnpd-$(PLATFORM) $(OBJS) $(LIBS) -ldl -lm
+- $(STRIP) $(TARGET_DIR)/xupnpd-$(PLATFORM)
+-
+-$(LUA)/liblua.a:
+- $(MAKE) -C $(LUA) a CC=$(CC) PATH=$(PATH):$(LIBEXEC) STAGING_DIR=$(STAGING_DIR) MYCFLAGS="-DLUA_USE_LINUX -Os"
++all: $(OBJS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o xupnpd $(OBJS) -llua -ldl -lm
+
+ clean:
+ $(RM) -f $(OBJS)
+- $(MAKE) -C $(LUA) clean
+- $(RM) -f $(TARGET_DIR)/xupnpd-$(PLATFORM)
++ $(RM) -f xupnpd
+
+ .c.o:
+- PATH=$(PATH):$(LIBEXEC) STAGING_DIR=$(STAGING_DIR) $(CC) -c -o $@ $<
++ $(CC) -c -o $@ $<
+
+ .cpp.o:
+- PATH=$(PATH):$(LIBEXEC) STAGING_DIR=$(STAGING_DIR) $(CPP) -c $(CFLAGS) -o $@ $<
++ $(CXX) -c $(CFLAGS) -o $@ $<
+
+ test: all # either 'make test' or 'make test test=plugins/recent.lua-test.sh/it_symlinks_media_most_recent_first'
+- cd ../test; PLATFORM=$(PLATFORM) roundup $(or ${test},${test},plugins/*-test.sh) # https://github.com/samunders-core/roundup/tree/function_as_test_plan
+\ No newline at end of file
++ cd ../test; roundup $(or ${test},${test},plugins/*-test.sh) # https://github.com/samunders-core/roundup/tree/function_as_test_plan
diff --git a/res_and_conf_dirs.patch b/res_and_conf_dirs.patch
deleted file mode 100644
index a7db5d9efc35..000000000000
--- a/res_and_conf_dirs.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-diff -Naupr xupnpd_orig/src/main.cpp xupnpd/src/main.cpp
---- xupnpd_orig/src/main.cpp 2015-08-01 14:24:27.000000000 +0600
-+++ xupnpd/src/main.cpp 2015-08-01 14:25:51.843062978 +0600
-@@ -43,7 +43,7 @@ int main(int argc,char** argv)
- if(fp)
- fclose(fp);
- else
-- rc=chdir("/usr/share/xupnpd/");
-+ rc=chdir("/var/lib/xupnpd/");
- }
-
- lua_State* L=lua_open();
-diff -Naupr xupnpd_orig/src/xupnpd.lua xupnpd/src/xupnpd.lua
---- xupnpd_orig/src/xupnpd.lua 2015-08-01 14:24:27.000000000 +0600
-+++ xupnpd/src/xupnpd.lua 2015-08-01 14:26:57.139964797 +0600
-@@ -102,15 +102,15 @@ feeds=
- -- log ident, pid file end www root
- cfg.version='1.033'
- cfg.log_ident=arg[1] or 'xupnpd'
--cfg.pid_file='/var/run/'..cfg.log_ident..'.pid'
--cfg.www_root='./www/'
-+cfg.pid_file='/run/xupnpd/xupnpd.pid'
-+cfg.www_root='/usr/share/xupnpd/www/'
- cfg.tmp_path='/tmp/'
--cfg.plugin_path='./plugins/'
-+cfg.plugin_path='/usr/share/xupnpd/plugins/'
- cfg.config_path='./config/'
- cfg.playlists_path='./playlists/'
- --cfg.feeds_path='/tmp/xupnpd-feeds/'
--cfg.ui_path='./ui/'
-+cfg.ui_path='/usr/share/xupnpd/ui/'
- cfg.drive='' -- reload playlists only if drive state=active/idle, example: cfg.drive='/dev/sda'
--cfg.profiles='./profiles/' -- device profiles feature
-+cfg.profiles='/usr/share/xupnpd/profiles/' -- device profiles feature
-
- dofile('xupnpd_main.lua')
diff --git a/xupnpd.service b/xupnpd.service
index bbf4c2d6fd29..5ca29963ddb5 100644
--- a/xupnpd.service
+++ b/xupnpd.service
@@ -6,8 +6,8 @@ Wants=udpxy.service
[Service]
User=xupnpd
Group=xupnpd
-Type=forking
-PIDFile=/run/xupnpd/xupnpd.pid
+Type=simple
+Environment=XUPNPDROOTDIR=/var/lib/xupnpd/
ExecStart=/usr/bin/xupnpd
[Install]
diff --git a/sysusers.conf b/xupnpd.sysusers
index 6b6a01b6a122..6b6a01b6a122 100644
--- a/sysusers.conf
+++ b/xupnpd.sysusers