diff options
author | B. Watson <yalhcru@gmail.com> | 2013-02-09 12:14:03 -0600 |
---|---|---|
committer | Erik Hanson <erik@slackbuilds.org> | 2013-02-14 00:26:50 -0600 |
commit | 23b9d45ab371c9dfa3d1e3347951fae63d664b2d (patch) | |
tree | f488a647e7e5929540c431bc49c7a38dabd1cb67 /multimedia/youtube-viewer/youtube-viewer.SlackBuild | |
parent | 7423cdd7057ea144564c0a55564a61ce93fab211 (diff) | |
download | slackbuilds-23b9d45ab371c9dfa3d1e3347951fae63d664b2d.tar.gz |
multimedia/youtube-viewer: Added (browse YouTube videos from a terminal)
Signed-off-by: Erik Hanson <erik@slackbuilds.org>
Diffstat (limited to 'multimedia/youtube-viewer/youtube-viewer.SlackBuild')
-rw-r--r-- | multimedia/youtube-viewer/youtube-viewer.SlackBuild | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/multimedia/youtube-viewer/youtube-viewer.SlackBuild b/multimedia/youtube-viewer/youtube-viewer.SlackBuild new file mode 100644 index 0000000000..fd0247955f --- /dev/null +++ b/multimedia/youtube-viewer/youtube-viewer.SlackBuild @@ -0,0 +1,90 @@ +#!/bin/bash + +# Slackware build script for youtube-viewer + +# Written by B. Watson (yalhcru@gmail.com) + +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +# Tarball gotten like so: +# wget -O youtube-viewer-$(date +%Y%m%d).tar.gz http://trizen.googlecode.com/files/youtube-viewer.tar.gz +# (the URL is always updated to the latest version, which is why I +# mirrored a version on my site) + +PRGNAM=youtube-viewer +VERSION=${VERSION:-20130203} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +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 + +DIRNAME=WWW-YoutubeViewer + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $DIRNAME +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $DIRNAME +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +perl Build.PL prefix=/usr installdirs=vendor --destdir="$PKG" +./Build +./Build test +./Build install --install_path script=/usr/bin + +# I couldn't figure out what to pass to Build.PL or Build to install +# man pages correctly, so: +mv $PKG/usr/share/man $PKG/usr/man + +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done + +find $PKG -name perllocal.pod \ + -o -name ".packlist" \ + -o -name "*.bs" \ + | xargs rm -f + +find $PKG -depth -type d -empty -delete || true + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a README Changes $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 + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} |