void-packages/srcpkgs/chromium-widevine/INSTALL

35 lines
870 B
Plaintext
Raw Normal View History

2015-10-20 04:38:17 +02:00
#
# This script will install the actual plugin, advise the user to read the
# license for Chrome and to re-login to have environment variables set
# properly.
#
BUILD_DIR="./var/tmp/${PKGNAME}.build"
case "${ACTION}" in
post)
. usr/lib/${PKGNAME}/${PKGNAME}-vars.sh
2015-10-20 04:38:17 +02:00
mkdir -p "$BUILD_DIR"
(
cd "$BUILD_DIR"
xbps-uhelper fetch "${CHROME_URL}>$PKGNAME.deb"
echo "$CHROME_CHECKSUM $PKGNAME.deb" > chksum
sha256sum -c chksum || exit 1
ar x "$PKGNAME.deb"
tar xf data.tar.xz
) || {
echo Error while extracting;
rm -r $BUILD_DIR;
exit 1;
}
mv $BUILD_DIR/opt/google/chrome/libwidevinecdm.so usr/lib/${PKGNAME}
mv $BUILD_DIR/opt/google/chrome/libwidevinecdmadapter.so usr/lib/${PKGNAME}
ln -s /usr/lib/${PKGNAME}/libwidevinecdm.so usr/lib/chromium
ln -s /usr/lib/${PKGNAME}/libwidevinecdmadapter.so usr/lib/chromium
2015-10-20 04:38:17 +02:00
rm -r $BUILD_DIR
;;
esac