summaryrefslogtreecommitdiff
path: root/community/ushare
diff options
context:
space:
mode:
authorroot <root@rshg047.dnsready.net>2011-07-08 23:09:34 +0000
committerroot <root@rshg047.dnsready.net>2011-07-08 23:09:34 +0000
commitd006db78a1ce530e9df8a65f87bf39e8d6cc88e5 (patch)
tree082c5c2c39abee82c3957872552fa15c8325744d /community/ushare
parentff64a82ccedcb1690d2f0140d63432aa49676591 (diff)
Fri Jul 8 23:09:34 UTC 2011
Diffstat (limited to 'community/ushare')
-rw-r--r--community/ushare/PKGBUILD11
-rwxr-xr-xcommunity/ushare/ushare4
-rw-r--r--community/ushare/ushare.install2
3 files changed, 8 insertions, 9 deletions
diff --git a/community/ushare/PKGBUILD b/community/ushare/PKGBUILD
index 0ed1b484c..98f8bc5cc 100644
--- a/community/ushare/PKGBUILD
+++ b/community/ushare/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 49979 2011-06-22 19:57:08Z spupykin $
+# $Id: PKGBUILD 51319 2011-07-07 10:51:58Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Kessia 'even' Pinheiro <kessiapinheiro at gmail.com>
# Contributor: kastor <kastor@fobos.org.ar>
pkgname=ushare
pkgver=1.1a
-pkgrel=13
+pkgrel=14
pkgdesc="A free UPnP A/V Media Server for Linux"
url="http://ushare.geexbox.org"
license=('GPL2')
@@ -19,35 +19,32 @@ source=("http://ushare.geexbox.org/releases/${pkgname}-${pkgver}.tar.bz2"
"upnp-build-fix.patch"
"ushare-config.patch")
md5sums=('5bbcdbf1ff85a9710fa3d4e82ccaa251'
- '5b8d5ab953dba09f05abd38abef063de'
+ 'e3cf0a44b0280da4966177c21e49361c'
'32c29f9f673e8b3a3d9e7bf5e60febbc'
'5243475c0cebc5db49296b2f3691085b')
build() {
cd ${srcdir}/${pkgname}-${pkgver}
-
sed -i -e \
"s%^INSTALL=\"/usr/bin/install -c\"$%INSTALL=\"$(which install) -c\"%" \
configure
patch -p1 <$srcdir/upnp-build-fix.patch
patch -p1 <$srcdir/ushare-config.patch
-
./configure --prefix=/usr --sysconfdir=/etc/ushare \
--enable-dlna --with-libdlna-dir=/usr/include/libavformat
-
make
}
package() {
cd ${srcdir}/${pkgname}-${pkgver}
make DESTDIR=${pkgdir} install
-
rm -rf ${pkgdir}/etc/${pkgname}/init.d
install -m 0755 -D ${srcdir}/ushare ${pkgdir}/etc/rc.d/ushare
install -d -m 0755 ${pkgdir}/etc/conf.d/
cat >${pkgdir}/etc/conf.d/ushare <<EOF
#PARAMS="-c /tmp -i eth0"
PARAMS=
+USHARE_USER=ushare
EOF
install -D -m0644 src/ushare.1 $pkgdir/usr/share/man/man1/ushare.1
}
diff --git a/community/ushare/ushare b/community/ushare/ushare
index 0770d16b9..b545b85d4 100755
--- a/community/ushare/ushare
+++ b/community/ushare/ushare
@@ -7,6 +7,8 @@ DESC="uShare UPnP A/V Media Server"
[ -r "/etc/ushare/ushare.conf" ] && . /etc/ushare/ushare.conf
[ -r "/etc/conf.d/ushare" ] && . /etc/conf.d/ushare
+[ -z $USHARE_USER ] && USHARE_USER=ushare
+
# abort if no executable exists
#[ -x $DAEMON ] || stat_fail
@@ -23,7 +25,7 @@ PID=`pidof -o %PPID /usr/bin/ushare`
case "$1" in
start)
stat_busy "Starting $DESC"
- [ -z "$PID" ] && sudo -u ushare /usr/bin/ushare -D -x $PARAMS
+ [ -z "$PID" ] && sudo -u $USHARE_USER /usr/bin/ushare -D -x $PARAMS
if [ $? -gt 0 ]; then
stat_fail
else
diff --git a/community/ushare/ushare.install b/community/ushare/ushare.install
index c51ea621d..ee677c849 100644
--- a/community/ushare/ushare.install
+++ b/community/ushare/ushare.install
@@ -3,7 +3,7 @@ post_install() {
groupadd ushare
fi
if [ -z "`grep '^ushare:' /etc/passwd`" ]; then
- useradd -d /var/empty -g ushare -s /bin/false ushare
+ useradd -d /var/empty -g ushare -s /sbin/nologin ushare
fi
}