summaryrefslogtreecommitdiffstats
path: root/chromium
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2015-01-01 23:05:08 +0000
committer Eric Hameleers <alien@slackware.com>2015-01-01 23:05:08 +0000
commita01b1eeadcf496b3b875a5aa532be8a6c56902c4 (patch)
tree0da0e1503a6d53458761df116efd3d7ba6e1d329 /chromium
parentcd9fd12b3baa7f6bed646504e3ff32770958dc90 (diff)
downloadasb-a01b1eeadcf496b3b875a5aa532be8a6c56902c4.tar.gz
asb-a01b1eeadcf496b3b875a5aa532be8a6c56902c4.tar.xz
Some fixes to the logic of cpio
Diffstat (limited to 'chromium')
-rwxr-xr-xchromium/build/chromium.SlackBuild34
1 files changed, 25 insertions, 9 deletions
diff --git a/chromium/build/chromium.SlackBuild b/chromium/build/chromium.SlackBuild
index f4f344b3..9e30e536 100755
--- a/chromium/build/chromium.SlackBuild
+++ b/chromium/build/chromium.SlackBuild
@@ -155,6 +155,9 @@ USE_CDM=${USE_CDM:-1}
# Note that the chrome binary RPM needs to have the same version
# as our chromium sources:
# $ strings ./opt/google/chrome/chrome | grep -C 1 " (version:" | tail -1
+# What is the Chrome version we extract this from?
+RPMCHAN=${RPMCHAN:-"stable"}
+RPMSUB=${RPMSUB:-"-1"}
WIDEVINE_VERSION="1.4.6.703" #CHROME_VERSION="39.0.2171.95"
DOCS="AUTHORS DEPS LICENSE README*"
@@ -203,14 +206,6 @@ EOT
sleep 10
fi
-SOURCE[0]="$SRCDIR/${SRCNAM}-${VERSION}.tar.xz"
-SRCURL[0]="https://commondatastorage.googleapis.com/${SRCNAM}-browser-official/${SRCNAM}-${VERSION}.tar.xz"
-
-if [ $USE_CDM -eq 1 ]; then
- SOURCE[1]="$SRCDIR/google-chrome-$CHANNEL-$CHROMEVER$RPMSUB.$ARCH.rpm"
- SRCURL[1]="https://dl.google.com/linux/chrome/rpm/stable/$ARCH/google-chrome-$CHANNEL-$CHROMEVER$RPMSUB.$ARCH.rpm"
-fi
-
##
## --- with a little luck, you won't have to edit below this point --- ##
##
@@ -232,11 +227,13 @@ case "$ARCH" in
i486) SLKCFLAGS="-O2 -march=i486 -mtune=i686"
SLKLDFLAGS=""; LIBDIRSUFFIX=""
TARGETARCH="ia32"
+ RPMARCH="i386"
DSSE="1"
;;
x86_64) SLKCFLAGS="-O2 -fPIC"
SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64"
TARGETARCH="x64"
+ RPMARCH="x86_64"
#DSSE="0"
DSSE="1"
;;
@@ -244,16 +241,22 @@ case "$ARCH" in
SLKLDFLAGS=""; LIBDIRSUFFIX=""
TARGETARCH="arm"
DSSE="1"
+ # Widevine not supported (no binary library available):
+ USE_CDM=0
;;
armv6hl) SLKCFLAGS="-O2 -march=armv6 -mfpu=vfp -mfloat-abi=hard"
SLKLDFLAGS=""; LIBDIRSUFFIX=""
TARGETARCH="arm"
DSSE="1"
+ # Widevine not supported (no binary library available):
+ USE_CDM=0
;;
*) SLKCFLAGS=${SLKCFLAGS:-"O2"}
SLKLDFLAGS=${SLKLDFLAGS:-""}; LIBDIRSUFFIX=${LIBDIRSUFFIX:-""}
TARGETARCH="ia32"
DSSE="1"
+ # Widevine not supported by default:
+ USE_CDM=0
;;
esac
@@ -262,6 +265,15 @@ case "$ARCH" in
*) TARGET=$ARCH-slackware-linux ;;
esac
+# Source locations:
+SOURCE[0]="$SRCDIR/${SRCNAM}-${VERSION}.tar.xz"
+SRCURL[0]="https://commondatastorage.googleapis.com/${SRCNAM}-browser-official/${SRCNAM}-${VERSION}.tar.xz"
+
+if [ $USE_CDM -eq 1 ]; then
+ SOURCE[1]="$SRCDIR/google-chrome-$RPMCHAN-$VERSION$RPMSUB.$RPMARCH.rpm"
+ SRCURL[1]="https://dl.google.com/linux/chrome/rpm/stable/$RPMARCH/google-chrome-$RPMCHAN-$VERSION$RPMSUB.$RPMARCH.rpm"
+fi
+
# Exit the script on errors:
set -e
trap 'echo "$0 FAILED at line ${LINENO}" | tee $OUTPUT/error-${PRGNAM}.log' ERR
@@ -347,9 +359,13 @@ if [ $USE_CDM -eq 1 ]; then
third_party/widevine/cdm/linux/${TARGETARCH}/
# Grab the Widevine CDM library from the Chrome .rpm package
# (the adapter library will be custom-built):
+ echo "Extracting libwidevinecdm.so from $(basename ${SOURCE[1]})"
cd third_party/widevine/cdm/linux/${TARGETARCH}/
+ # FIXME without the '-d' parameter I only get an error from cpio???
rpm2cpio ${SOURCE[1]} \
- | cpio -imv -R root:root ./opt/google/chrome/libwidevinecdm.so
+ | cpio -dimv -R root:root ./opt/google/chrome/libwidevinecdm.so
+ mv ./opt/google/chrome/libwidevinecdm.so .
+ rm -rf opt
cd -
fi