diff options
Diffstat (limited to 'community/minidlna')
-rw-r--r-- | community/minidlna/PKGBUILD | 24 | ||||
-rw-r--r-- | community/minidlna/minidlna.rc | 76 | ||||
-rw-r--r-- | community/minidlna/minidlna.service | 4 |
3 files changed, 9 insertions, 95 deletions
diff --git a/community/minidlna/PKGBUILD b/community/minidlna/PKGBUILD index 67fb86bd4..2643d6ed4 100644 --- a/community/minidlna/PKGBUILD +++ b/community/minidlna/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 84354 2013-02-16 22:50:32Z ioni $ +# $Id: PKGBUILD 91520 2013-05-23 11:15:33Z spupykin $ # Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> # Maintainer:Biginoz < biginoz AT free point fr> # Contributor: Ignacio Galmarino <igalmarino@gmail.com> @@ -6,8 +6,8 @@ # Contributor: Kamil Kaminski <kyle@kkaminsk.com> pkgname=minidlna -pkgver=1.0.25 -pkgrel=5 +pkgver=1.1.0 +pkgrel=2 pkgdesc="A DLNA/UPnP-AV Media server (aka ReadyDLNA)" arch=('i686' 'x86_64' 'mips64el') url="http://sourceforge.net/projects/minidlna/" @@ -17,19 +17,16 @@ backup=('etc/minidlna.conf' 'etc/conf.d/minidlna') install=minidlna.install changelog=changelog -source=(http://downloads.sourceforge.net/minidlna/minidlna_${pkgver}_src.tar.gz - minidlna.rc +source=(http://downloads.sourceforge.net/project/minidlna/minidlna/$pkgver/minidlna-$pkgver.tar.gz minidlna.service minidlna.tmpfiles) -md5sums=('d966256baf2f9b068b9de871ab5dade5' - '1b92f88905abe8f719585d48f4b25a49' - '1903ed9ceee43b8bb86146b9ad8eb50c' +md5sums=('26484a84af3fceafdee26595aae097f7' + '7e3890ee50aa4dfa4d1754261e6cc965' '26de27b12d6a37c47d9714107d07aac9') build() { cd "$srcdir/$pkgname-$pkgver" - sed -i 's|DB_PATH=.*|DB_PATH=/var/cache/minidlna|' genconfig.sh - find -type f -name '*.c' -exec sed -i '1,1i#include </usr/include/time.h>' {} \; + ./configure --prefix=/usr --sbindir=/usr/bin make } @@ -37,13 +34,6 @@ package() { cd "$srcdir/$pkgname-$pkgver" DESTDIR=$pkgdir make install install -Dm644 minidlna.conf ${pkgdir}/etc/minidlna.conf - - install -Dm755 ${srcdir}/minidlna.rc ${pkgdir}/etc/rc.d/minidlna - mkdir -p $pkgdir/etc/conf.d - echo 'MINIDLNA_USER=nobody' >$pkgdir/etc/conf.d/minidlna - echo 'MINIDLNA_OPTS=""' >>$pkgdir/etc/conf.d/minidlna - - # systemd files install -Dm0644 $srcdir/minidlna.tmpfiles $pkgdir/usr/lib/tmpfiles.d/minidlna.conf install -Dm0644 $srcdir/minidlna.service $pkgdir/usr/lib/systemd/system/minidlna.service } diff --git a/community/minidlna/minidlna.rc b/community/minidlna/minidlna.rc deleted file mode 100644 index dd5910544..000000000 --- a/community/minidlna/minidlna.rc +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/bash - -. /etc/rc.conf -. /etc/rc.d/functions -. /etc/conf.d/minidlna -. /etc/minidlna.conf - -daemon_name=minidlna - -get_pid() { - pidof -o %PPID /usr/sbin/minidlna -} - -case "$1" in - start) - stat_busy "Starting minidlna" - PID=$(get_pid) - if [[ -z "$PID" ]]; then - rm -f /var/run/$daemon_name.pid - touch /var/run/$daemon_name.pid && chown $MINIDLNA_USER:$MINIDLNA_USER /var/run/$daemon_name.pid - mkdir -p /var/cache/minidlna - chown -R $MINIDLNA_USER /var/cache/minidlna - su -s /bin/sh -l -c "/usr/sbin/minidlna ${MINIDLNA_OPTS} $2" - $MINIDLNA_USER - if [[ $? -gt 0 ]]; then - stat_fail - exit 1 - else - add_daemon $daemon_name - stat_done - fi - else - stat_fail - exit 1 - fi - ;; - - stop) - stat_busy "Stopping minidlna" - PID=$(get_pid) - [[ -n $PID ]] && kill $PID &> /dev/null - if [ $? -gt 0 ]; then - stat_fail - exit 1 - else - rm -f /var/run/$daemon_name.pid &> /dev/null - rm_daemon minidlna - stat_done - fi - ;; - - clean) - $0 stop - sleep 1 - stat_busy "Cleaning minidlna cache" - [ -z $db_dir ] || rm -r $db_dir/* - stat_done - sleep 1 - $0 start - ;; - - restart) - $0 stop - sleep 1 - $0 start - ;; - - rescan) - $0 stop - sleep 1 - $0 start -R - ;; - - *) - echo "usage: $0 {start|stop|restart|clean}" -esac -exit 0 diff --git a/community/minidlna/minidlna.service b/community/minidlna/minidlna.service index 6c9a40152..bc79e96ef 100644 --- a/community/minidlna/minidlna.service +++ b/community/minidlna/minidlna.service @@ -5,8 +5,8 @@ After=network.target [Service] Type=forking User=nobody -ExecStart=/usr/sbin/minidlna -P /var/run/minidlna/minidlna.pid -PIDFile=/var/run/minidlna/minidlna.pid +ExecStart=/usr/bin/minidlnad -P /run/minidlna/minidlna.pid +PIDFile=/run/minidlna/minidlna.pid [Install] WantedBy=multi-user.target |