2015-10-25 02:34:49 +01:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Slackware build script for vivaldi-codecs-ffmpeg-extra.
|
|
|
|
#
|
2017-06-26 21:48:13 +02:00
|
|
|
# Copyright 2015-2017 Edinaldo P. Silva, Rio de Janeiro, Brazil.
|
2018-02-15 19:30:38 +01:00
|
|
|
# Copyright 2017-2018, Alexander Verbovetsky, Moscow, Russia
|
2015-10-25 02:34:49 +01:00
|
|
|
# All rights reserved.
|
|
|
|
#
|
|
|
|
# Redistribution and use of this script, with or without modification, is
|
|
|
|
# permitted provided that the following conditions are met:
|
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
|
|
|
PRGNAM="vivaldi-codecs-ffmpeg-extra"
|
2018-12-14 19:19:11 +01:00
|
|
|
VERSION=${VERSION:-71.0.3578.80}
|
2015-12-11 13:18:27 +01:00
|
|
|
BUILD=${BUILD:-1}
|
2015-10-25 02:34:49 +01:00
|
|
|
TAG=${TAG:-_SBo}
|
|
|
|
|
|
|
|
if [ -z "$ARCH" ]; then
|
|
|
|
case "$( uname -m )" in
|
2016-09-17 01:43:55 +02:00
|
|
|
i?86) ARCH=i586 ;;
|
2015-10-25 02:34:49 +01:00
|
|
|
arm*) ARCH=arm ;;
|
|
|
|
*) ARCH=$( uname -m ) ;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
2017-08-10 02:47:15 +02:00
|
|
|
case "$ARCH" in
|
|
|
|
i?86) BITS="i386" ;;
|
|
|
|
x86_64) BITS="amd64" ;;
|
2018-02-08 16:57:00 +01:00
|
|
|
arm*) BITS="armhf" ;;
|
2017-08-10 02:47:15 +02:00
|
|
|
*) echo "$ARCH is not supported."
|
|
|
|
exit 1 ;;
|
|
|
|
esac
|
|
|
|
|
2015-10-25 02:34:49 +01:00
|
|
|
CWD=$(pwd)
|
|
|
|
TMP=${TMP:-/tmp/SBo}
|
|
|
|
PKG=$TMP/package-$PRGNAM
|
|
|
|
OUTPUT=${OUTPUT:-/tmp}
|
|
|
|
|
2017-03-13 23:11:45 +01:00
|
|
|
set -e
|
2015-10-25 02:34:49 +01:00
|
|
|
|
|
|
|
rm -rf $PKG $TMP/$PRGNAM
|
|
|
|
mkdir -p $TMP/$PRGNAM $PKG $OUTPUT
|
|
|
|
|
|
|
|
cd $TMP/$PRGNAM
|
2017-08-10 02:47:15 +02:00
|
|
|
mkdir -p $PRGNAM-$VERSION
|
|
|
|
cd $PRGNAM-$VERSION
|
|
|
|
|
|
|
|
ar p $CWD/chromium-codecs-ffmpeg-extra_${VERSION}-*_${BITS}.deb data.tar.xz \
|
|
|
|
| tar xJf - ./usr/lib/chromium-browser/libffmpeg.so --strip 4
|
2015-10-25 02:34:49 +01:00
|
|
|
|
2017-08-10 02:47:15 +02:00
|
|
|
strip --strip-unneeded libffmpeg.so 2> /dev/null
|
2015-10-25 02:34:49 +01:00
|
|
|
|
2016-10-08 02:59:38 +02:00
|
|
|
mkdir -p $PKG/opt/vivaldi/
|
2017-08-10 02:47:15 +02:00
|
|
|
install -m 0644 -o root -g root libffmpeg.so $PKG/opt/vivaldi/
|
2015-10-25 02:34:49 +01:00
|
|
|
|
|
|
|
mkdir -p $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}
|