aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--multimedia/plexmediaserver/plexmediaserver.SlackBuild50
-rw-r--r--multimedia/plexmediaserver/plexmediaserver.info10
2 files changed, 34 insertions, 26 deletions
diff --git a/multimedia/plexmediaserver/plexmediaserver.SlackBuild b/multimedia/plexmediaserver/plexmediaserver.SlackBuild
index a7500077a085e..fa58d42cf9f90 100644
--- a/multimedia/plexmediaserver/plexmediaserver.SlackBuild
+++ b/multimedia/plexmediaserver/plexmediaserver.SlackBuild
@@ -6,17 +6,24 @@
# Based on http://slackbuilds.org/template.SlackBuild
PRGNAM=plexmediaserver
-VERSION=${VERSION:-0.9.8.10.215-020456b}
-PKG_VERSION=0.9.8.10.215.020456b
+VERSION=${VERSION:-0.9.8.18.290_11b7fdd}
+PKG_VERSION=$(echo $VERSION | tr _ -)
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
-ARCH=${ARCH:-$(uname -m)}
-if [ "$ARCH" = "i386" ]; then
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ "$ARCH" = "i486" ]; then
DEBARCH="i386"
LIBDIRSUFFIX=""
ARCH="i386"
-elif [ "$ARCH" = "i486" ]; then
+elif [ "$ARCH" = "i686" ]; then
DEBARCH="i386"
LIBDIRSUFFIX=""
ARCH="i386"
@@ -39,19 +46,8 @@ PLEX_GROUP=${PLEX_GROUP:-279}
set -e
-rm -rf $PKG
-mkdir -p $TMP $PKG $OUTPUT
-cd $PKG
-rm -rf $PRGNAM-$PKG_VERSION
-ar xv $CWD/${PRGNAM}_${VERSION}_${DEBARCH}.deb
-tar xvf data.tar.gz
-# Remove debian files
-rm -f debian-binary control.tar.gz data.tar.gz
-rm -rf $PKG/etc/apt/ $PKG/etc/init $PKG/etc/init.d
-chown -R root:root .
-
# Bail if user or group isn't valid on your system
-if ! grep ^plex: /etc/passwd 2>&1 > /dev/null; then
+if ! getent passwd plex 1>/dev/null 2>/dev/null; then
cat << EOF
@@ -63,7 +59,7 @@ cat << EOF
EOF
exit
-elif ! grep ^plex: /etc/group 2>&1 > /dev/null; then
+elif ! getent group plex 1>/dev/null 2>/dev/null; then
cat << EOF
@@ -74,6 +70,18 @@ EOF
exit
fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $PKG
+rm -rf $PRGNAM-$PKG_VERSION
+ar xv $CWD/${PRGNAM}_${PKG_VERSION}_${DEBARCH}.deb
+tar xvf data.tar.gz
+# Remove debian files
+rm -f debian-binary control.tar.gz data.tar.gz
+rm -rf $PKG/etc/apt/ $PKG/etc/init $PKG/etc/init.d
+chown -R root:root .
+
mkdir -p $PKG/opt/$PRGNAM/bin/
mv $PKG/usr/lib/plexmediaserver $PKG/opt/$PRGNAM/lib
@@ -95,8 +103,8 @@ ln -s /opt/$PRGNAM/plexmediamanager.desktop \
rm -rf $PKG/usr/share/doc $PKG/usr/sbin $PKG/usr/lib
-mkdir -p $PKG/usr/doc/$PRGNAM-$PKG_VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$PKG_VERSION/$PRGNAM.SlackBuild
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/var/lib/$PRGNAM
chown -R $PLEX_USER:$PLEX_GROUP $PKG/var/lib/$PRGNAM
@@ -111,4 +119,4 @@ cat $CWD/doinst.sh > $PKG/install/doinst.sh
# makepkg
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$PKG_VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/multimedia/plexmediaserver/plexmediaserver.info b/multimedia/plexmediaserver/plexmediaserver.info
index f4597881a6666..77315c0a1c3f4 100644
--- a/multimedia/plexmediaserver/plexmediaserver.info
+++ b/multimedia/plexmediaserver/plexmediaserver.info
@@ -1,10 +1,10 @@
PRGNAM="plexmediaserver"
-VERSION="0.9.8.10.215.020456b"
+VERSION="0.9.8.18.290_11b7fdd"
HOMEPAGE="http://www.plexapp.com/connected/"
-DOWNLOAD="http://downloads.plexapp.com/plex-media-server/0.9.8.10.215-020456b/plexmediaserver_0.9.8.10.215-020456b_i386.deb"
-MD5SUM="c657221a97b928ee160cd463987c9a5f"
-DOWNLOAD_x86_64="http://downloads.plexapp.com/plex-media-server/0.9.8.10.215-020456b/plexmediaserver_0.9.8.10.215-020456b_amd64.deb"
-MD5SUM_x86_64="c1a22b243acec9b2f417a5e93f5dfee2"
+DOWNLOAD="http://downloads.plexapp.com/plex-media-server/0.9.8.18.290-11b7fdd/plexmediaserver_0.9.8.18.290-11b7fdd_i386.deb"
+MD5SUM="9ae693e00b4297280eb05f251c166b13"
+DOWNLOAD_x86_64="http://downloads.plexapp.com/plex-media-server/0.9.8.18.290-11b7fdd/plexmediaserver_0.9.8.18.290-11b7fdd_amd64.deb"
+MD5SUM_x86_64="1da3181e54f6bbd7c6870370205e2035"
REQUIRES=""
MAINTAINER="Lionel Young"
EMAIL="lionelyoung@gmail.com"