aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2011-07-24 14:10:41 +0300
committerTimo Teräs <timo.teras@iki.fi>2011-07-24 14:12:05 +0300
commitf71c50da957ece5f5c96772c44467ab9900e1067 (patch)
treea9e1bc6c955707ef7cff3056a1644f815f177318
parent1df1028d69f2ae81b63581f76dc6d73d9ad8e785 (diff)
downloadaports-f71c50da957ece5f5c96772c44467ab9900e1067.tar.bz2
aports-f71c50da957ece5f5c96772c44467ab9900e1067.tar.xz
main/vlc: create vlc user in pre-install, set dir permissions in apk
Scripts should not go tweak the directory permissions.
-rw-r--r--main/vlc/APKBUILD9
-rw-r--r--main/vlc/vlc-daemon.post-install3
-rw-r--r--main/vlc/vlc-daemon.pre-install5
3 files changed, 11 insertions, 6 deletions
diff --git a/main/vlc/APKBUILD b/main/vlc/APKBUILD
index c701b069f4..9910c990a5 100644
--- a/main/vlc/APKBUILD
+++ b/main/vlc/APKBUILD
@@ -2,8 +2,10 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=vlc
pkgver=1.1.11
-pkgrel=0
+pkgrel=1
pkgdesc="A multi-platform MPEG, VCD/DVD, and DivX player"
+pkgusers="vlc"
+pkggroups="vlc"
url="http://www.videolan.org/vlc/"
arch="all"
license="GPL-2"
@@ -170,14 +172,15 @@ xorg() {
daemon() {
pkgdesc="Support for running VLC as a daemon"
- install="vlc-daemon.post-install"
+ install="vlc-daemon.pre-install"
arch="noarch"
depends="vlc"
- mkdir -p "$subpkgdir"/var/log/vlc
+ 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
+ install -d -o vlc -g vlc "$subpkgdir"/var/log/vlc
}
md5sums="a64846d6f21ea179ae8e8bfb6f9447fe vlc-1.1.11.tar.bz2
diff --git a/main/vlc/vlc-daemon.post-install b/main/vlc/vlc-daemon.post-install
deleted file mode 100644
index 5c0a51ef44..0000000000
--- a/main/vlc/vlc-daemon.post-install
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-adduser -h /home/vlc -s /bin/sh -G audio -G video -D vlc &>/dev/null || true
-chown vlc /var/log/vlc
diff --git a/main/vlc/vlc-daemon.pre-install b/main/vlc/vlc-daemon.pre-install
new file mode 100644
index 0000000000..45f66bff6b
--- /dev/null
+++ b/main/vlc/vlc-daemon.pre-install
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+addgroup -S vlc 2>/dev/null
+adduser -S -h /home/vlc -s /bin/sh -G vlc -G audio -G video -D vlc &>/dev/null
+exit 0