aboutsummaryrefslogtreecommitdiffstats
path: root/main/vlc
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@gmail.com>2011-03-31 07:31:58 +0000
committerLeonardo Arena <rnalrd@gmail.com>2011-03-31 07:32:11 +0000
commit0726c1cd1435a289a8dbc470ca04b7586aa10830 (patch)
treeb124c4445b8386f3d74ec3746c2db8162a503537 /main/vlc
parenta2b318ddf1ff0c31d5b9617fdadce552a0d125d1 (diff)
downloadaports-0726c1cd1435a289a8dbc470ca04b7586aa10830.tar.bz2
aports-0726c1cd1435a289a8dbc470ca04b7586aa10830.tar.xz
main/vlc: vlc-daemon subpkg created
Diffstat (limited to 'main/vlc')
-rw-r--r--main/vlc/APKBUILD16
-rw-r--r--main/vlc/vlc-daemon.post-install2
-rw-r--r--main/vlc/vlc.confd11
-rwxr-xr-xmain/vlc/vlc.initd20
4 files changed, 47 insertions, 2 deletions
diff --git a/main/vlc/APKBUILD b/main/vlc/APKBUILD
index 3147670f97..f5b60f9845 100644
--- a/main/vlc/APKBUILD
+++ b/main/vlc/APKBUILD
@@ -2,13 +2,13 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=vlc
pkgver=1.1.8
-pkgrel=0
+pkgrel=1
pkgdesc="A multi-platform MPEG, VCD/DVD, and DivX player"
url="http://www.videolan.org/vlc/"
arch="all"
license="GPL-2"
triggers="$pkgname.trigger:/usr/lib/vlc/plugins"
-subpackages="$pkgname-dev $pkgname-doc $pkgname-xorg"
+subpackages="$pkgname-dev $pkgname-doc $pkgname-xorg $pkgname-daemon"
#depends="libnotify a52dec fluidsynth zvbi libdvbpsi lirc-utils libdca hal
# libproxy sdl_image libdvdnav>=4.1.3 lua libxv libv4l libcddb smbclient
# libmatroska taglib sysfsutils libmpcdec ffmpeg>=0.5 libshout libmad
@@ -165,6 +165,18 @@ xorg() {
"$subpkgdir"/usr/share/
}
+daemon() {
+ pkgdesc="Support for running VLC as a daemon"
+ install="vlc-daemon.post-install"
+ triggers=
+ arch="noarch"
+
+ mkdir -p "$subpkgdir"
+ cd "$pkgdir"
+ install -D -m755 ../../vlc.initd $subpkgdir/etc/init.d/vlc
+ install -D -m664 ../../vlc.confd $subpkgdir/etc/conf.d/vlc
+}
+
md5sums="c0065ec11b6fd12167cd440cbe0ef0d9 vlc-1.1.8.tar.bz2
ba24152286d98f8a367c7fd0cb8949f4 uclibc3.patch
d718e22a7de9f38579f276f720b2f36a uclibc-libcompat.patch
diff --git a/main/vlc/vlc-daemon.post-install b/main/vlc/vlc-daemon.post-install
new file mode 100644
index 0000000000..934f64f50b
--- /dev/null
+++ b/main/vlc/vlc-daemon.post-install
@@ -0,0 +1,2 @@
+#!/bin/sh
+adduser -h /home/vlc -s /bin/sh -G audio,tty vlc &>/dev/null
diff --git a/main/vlc/vlc.confd b/main/vlc/vlc.confd
new file mode 100644
index 0000000000..c0f87e4f5f
--- /dev/null
+++ b/main/vlc/vlc.confd
@@ -0,0 +1,11 @@
+# Sample vlc params suitable for running as a daemon
+
+## --daemon detach from prompt
+## --file-logging enable file logging
+## --logfile logfile name/path
+## -vvv verbose logging
+## -I dummy disable X11 interface
+## --sout PARAMS encoding parameters
+ Do NOT quote 'PARAMS' otherwise shell expansions will broke vlc
+
+VLC_OPTS="-vvv -I dummy alsa://hw:0,0 --daemon --file-logging --logfile /var/log/vlc.log --sout #transcode{acodec=mp3,ab=48,channels=1,samplerate=22050}:std{access=http,mux=ogg,dst=:8080}"
diff --git a/main/vlc/vlc.initd b/main/vlc/vlc.initd
new file mode 100755
index 0000000000..2c431c90f0
--- /dev/null
+++ b/main/vlc/vlc.initd
@@ -0,0 +1,20 @@
+#!/sbin/runscript
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting VLC"
+ start-stop-daemon --start --oknodo \
+ --pidfile /var/run/vlc.pid --chuid vlc \
+ --exec /usr/bin/vlc -- ${VLC_OPTS}
+ eend $?
+}
+
+stop () {
+ ebegin "Stopping VLC"
+ start-stop-daemon --stop --oknodo --exec /usr/bin/vlc
+ eend $?
+}
+