diff options
Diffstat (limited to 'multimedia/plexmediaserver/plexmediaserver.SlackBuild')
-rw-r--r-- | multimedia/plexmediaserver/plexmediaserver.SlackBuild | 50 |
1 files changed, 29 insertions, 21 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} |