diff options
author | Dimitris Zlatanidis <d.zlatanidis@gmail.com> | 2015-02-24 17:09:54 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2015-02-24 17:09:54 +0700 |
commit | e6d2d0ac91a455d2f89eac78a899597be4a99bd4 (patch) | |
tree | 8bf8eb0d533ea163d41691bf8c339003c13710a7 /network/youtube-dl/youtube-dl.SlackBuild | |
parent | 7c463ba8086952f00672be7373fccd56100ee358 (diff) | |
download | slackbuilds-e6d2d0ac91a455d2f89eac78a899597be4a99bd4.tar.gz |
network/youtube-dl: Updated for version 2015.02.21 + new maintainer.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/youtube-dl/youtube-dl.SlackBuild')
-rw-r--r-- | network/youtube-dl/youtube-dl.SlackBuild | 76 |
1 files changed, 60 insertions, 16 deletions
diff --git a/network/youtube-dl/youtube-dl.SlackBuild b/network/youtube-dl/youtube-dl.SlackBuild index c7a49fac9e..a27b3fe82e 100644 --- a/network/youtube-dl/youtube-dl.SlackBuild +++ b/network/youtube-dl/youtube-dl.SlackBuild @@ -1,9 +1,9 @@ #!/bin/sh # Slackware build script for youtube-dl - # Copyright 2010 GPLeo <gpleomail@gmail.com> # Copyright 2010-2012 byteframe <byteframe@gmail.com> +# Copyright 2015 Dimitris Zlatanidis Greece, Orestiada # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -12,45 +12,89 @@ # 1. Redistributions of this script must retain the above copyright # notice, this list of conditions and the following disclaimer. # -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED -# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=youtube-dl -VERSION=${VERSION:-2014.08.23} +VERSION=${VERSION:-2015.02.21} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} -ARCH=noarch +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz || tar xvf $CWD/$VERSION.tar.gz + +cd $PRGNAM-$VERSION +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -mkdir -p $PKG/usr/bin -install -m 0755 $CWD/$PRGNAM $PKG/usr/bin/$PRGNAM +# Makefile patch +patch -p1 < $CWD/Makefile.patch +# setup.py patch +patch -p1 < $CWD/setup.patch + +make +python setup.py install --root=$PKG + +# install man page mkdir -p $PKG/usr/man/man1 -gzip -9c $CWD/youtube-dl.1 > $PKG/usr/man/man1/youtube-dl.1.gz +install -D -m0644 $CWD/$PRGNAM.1 $PKG/usr/man/man1/$PRGNAM.1 +gzip -9 $PKG/usr/man/man1/$PRGNAM.1 + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a README.md LICENSE AUTHORS ${PRGNAM}.plugin.zsh $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} |