#!/bin/sh # $Id$ # Copyright 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Eric Hameleers, Eindhoven, NL # All rights reserved. # # Permission to use, copy, modify, and distribute this software for # any purpose with or without fee is hereby granted, provided that # the above copyright notice and this permission notice appear in all # copies. # # THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 AUTHORS AND COPYRIGHT HOLDERS AND THEIR # CONTRIBUTORS 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. # ----------------------------------------------------------------------------- # # Slackware SlackBuild script # =========================== # By: Eric Hameleers # For: chromium-pepperflash-plugin # Descr: Adobe's PPAPI (Pepper) Flash plugin for Chromium # URL: https://get.adobe.com/flashplayer/otherversions/ # Build needs: # Needs: # Changelog: # 11.9.900.152-1: # 21/nov/2013 by Eric Hameleers # * Initial build. # 11.9.900.170-1: # 06/dec/2013 by Eric Hameleers # * Update to accompany chromium-31.0.1650.63 # 12.0.0.41-1: # 14/jan/2014 by Eric Hameleers # * Update to accompany chromium-32.0.1700.77 # 12.0.0.44-1: # 06/feb/2014 by Eric Hameleers # 12.0.0.70-1: # 22/feb/2014 by Eric Hameleers # * Update to accompany chromium-33.0.1750.117 # 12.0.0.77-1: # 11/mar/2014 by Eric Hameleers # * Update to accompany chromium-33.0.1750.149 # 13.0.0.182-1: # 09/apr/2014 by Eric Hameleers # * Update to accompany chromium-34.0.1847.116 # 13.0.0.206-1: # 27/apr/2014 by Eric Hameleers # * Update to accompany chromium-34.0.1847.132 # 13.0.0.214-1: # 27/apr/2014 by Eric Hameleers # * Update to accompany chromium-34.0.1847.137 # 14.0.0.125-1: # 11/jun/2014 by Eric Hameleers # * Update to accompany chromium-35.0.1916.153 # 14.0.0.145-1: # 15/jul/2014 by Eric Hameleers # * Update actually I had to use the newer # google-chrome-beta-36.0.1985.125 for this because the stable # channel did not get updated. # 14.0.0.177-1: # 13/aug/2014 by Eric Hameleers # * Update to accompany chromium-36.0.1985.143 # 15.0.0.152-1: # 09/sep/2014 by Eric Hameleers # * Update to accompany chromium-37.0.2062.120. # 15.0.0.223-1: # 11/nov/2014 by Eric Hameleers # * Update to accompany chromium-38.0.2125.122. # 15.0.0.239-1: # 26/nov/2014 by Eric Hameleers # * Update to accompany chromium-39.0.2171.71. # 16.0.0.235-1: # 09/dec/2014 by Eric Hameleers # * Update to accompany chromium-39.0.2171.95. # 16.0.0.257-1: # 13/jan/2015 by Eric Hameleers # * Update to accompany chromium-39.0.2171.99. # 16.0.0.291-1: # 22/jan/2015 by Eric Hameleers # * Update to accompany chromium-40.0.2214.91. # 16.0.0.296-1: # 29/jan/2015 by Eric Hameleers # * Update to accompany chromium-40.0.2214.93. # 16.0.0.305-1: # 05/feb/2015 by Eric Hameleers # * Update to accompany chromium-40.0.2214.111. # 17.0.0.134-1: # 12/mar/2015 by Eric Hameleers # * Update to accompany chromium-41.0.2272.89. # 17.0.0.169-1: # 15/apr/2015 by Eric Hameleers # * Update to accompany chromium-42.0.2311.90. # 17.0.0.188-1: # 12/apr/2015 by Eric Hameleers # * Update to accompany chromium-42.0.2311.152. # 17.0.0.188-2: # 20/may/2015 by Eric Hameleers # * Update to accompany chromium-43.0.2357.65, configuration # of the plugin has changed. # 18.0.0.160-1: # 09/jun/2015 by Eric Hameleers # * Update to accompany chromium-43.0.2357.124. # See https://helpx.adobe.com/security/products/flash-player/apsb15-11.html # 18.0.0.194-1: # 23/jun/2015 by Eric Hameleers # * Update to accompany chromium-43.0.2357.130. # See https://helpx.adobe.com/security/products/flash-player/apsb15-14.html # 18.0.0.204-1: # 08/jul/2015 by Eric Hameleers # * Update to accompany chromium-43.0.2357.132. # See https://helpx.adobe.com/security/products/flash-player/apsa15-03.html # 18.0.0.209-1: # 14/jul/2015 by Eric Hameleers # * Update to accompany chromium-43.0.2357.134. # See https://helpx.adobe.com/security/products/flash-player/apsa15-04.html # 18.0.0.233-1: # 11/aug/2015 by Eric Hameleers # * Update to accompany chromium-44.0.2403.155. # See https://helpx.adobe.com/security/products/flash-player/apsb15-19.html # 19.0.0.185-1: # 21/sep/2015 by Eric Hameleers # * Update to accompany chromium-45.0.2454.99. # See https://helpx.adobe.com/security/products/flash-player/apsb15-23.html # 19.0.0.207-1: # 21/sep/2015 by Eric Hameleers # * Update to accompany chromium-46.0.2490.71. # See https://helpx.adobe.com/security/products/flash-player/apsb15-25.html # 19.0.0.226-1: # 24/oct/2015 by Eric Hameleers # * Update to accompany chromium-46.0.2490.80. # See https://helpx.adobe.com/security/products/flash-player/apsb15-27.html # 19.0.0.245-1: # 11/nov/2015 by Eric Hameleers # * Update to accompany chromium-46.0.2490.86. # See https://helpx.adobe.com/security/products/flash-player/apsb15-28.html # 20.0.0.228-1: 09/dec/2015 by Eric Hameleers # * Update to accompany chromium-47.0.2526.80. # See https://helpx.adobe.com/security/products/flash-player/apsb15-32.html # 20.0.0.267-1: 14/jan/2016 by Eric Hameleers # * Update to accompany chromium-47.0.2526.111. # See https://helpx.adobe.com/security/products/flash-player/apsb16-01.html # 20.0.0.286-1: 24/jan/2016 by Eric Hameleers # * Update to accompany chromium-48.0.2564.82. # 20.0.0.306-1: 10/feb/2016 by Eric Hameleers # * Update to accompany chromium-48.0.2564.109. # See https://helpx.adobe.com/security/products/flash-player/apsb16-04.html # 21.0.0.182-1: 17/mar/2016 by Eric Hameleers # * Update to accompany chromium-49.0.2623.87. # 21.0.0.197-1: 25/mar/2016 by Eric Hameleers # * Update to accompany chromium-49.0.2623.108. # 21.0.0.213-1: 08/apr/2016 by Eric Hameleers # * Update to accompany chromium-49.0.2623.112. # 21.0.0.216-1: 15/apr/2016 by Eric Hameleers # * Update to accompany chromium-50.0.2661.75. # 21.0.0.242-1: 12/may/2016 by Eric Hameleers # * Update to accompany chromium-50.0.2661.102. # 22.0.0.192-1: 16/jun/2016 by Eric Hameleers # * Update to accompany chromium-51.0.2704.103. # 22.0.0.209-1: 20/jul/2016 by Eric Hameleers # * Update; use Adobe's own download URL for the PPAPI Flash # plugin (including a 32bit version). # 23.0.0.162-1: 15/sep/2016 by Eric Hameleers # * Security update; see APSB16-29. # 23.0.0.185-1: 12/oct/2016 by Eric Hameleers # * Security update; see APSB16-32. # 23.0.0.205-1: 02/nov/2016 by Eric Hameleers # * Security update; see APSB16-36. # 23.0.0.207-1: 08/nov/2016 by Eric Hameleers # * Security update; see APSB16-37. # 24.0.0.186-1: 13/dec/2016 by Eric Hameleers # * Update; first unified version across all platforms. # 24.0.0.194-1: 10/jan/2017 by Eric Hameleers # * Security update; see APSB17-02. # 24.0.0.221-1: 14/feb/2017 by Eric Hameleers # * Security update; see APSB17-04. # 25.0.0.127-1: 15/mar/2017 by Eric Hameleers # * Security update; see APSB17-07. # 25.0.0.148-1: 11/apr/2017 by Eric Hameleers # * Security update; see APSB17-10. # 25.0.0.171-1: 09/may/2017 by Eric Hameleers # * Security update; see APSB17-15. # 26.0.0.126-1: 13/jun/2017 by Eric Hameleers # * Security update; see APSB17-17. # 26.0.0.131-1: 18/jun/2017 by Eric Hameleers # 26.0.0.137-1: 11/jul/2017 by Eric Hameleers # * Security update; see APSB17-21. # 26.0.0.151-1: 09/aug/2017 by Eric Hameleers # * Security update; see APSB17-23. # 27.0.0.130-1: 12/sep/2017 by Eric Hameleers # * Security update; see APSB17-28. # 27.0.0.159-1: 12/oct/2017 by Eric Hameleers # * Security update; see APSB17-31. # 27.0.0.170-1: 17/oct/2017 by Eric Hameleers # * Security update; see APSB17-32. # 27.0.0.183-1: 28/oct/2017 by Eric Hameleers # * Update. # 27.0.0.187-1: 15/nov/2017 by Eric Hameleers # * Update fixes critical vulnerabilities. See APSB17-33 # 28.0.0.126-1: 08/jan/2018 by Eric Hameleers # * Update fixes critical vulnerabilities. See APSB17-42 # 28.0.0.137-1: 17/jan/2018 by Eric Hameleers # * Update fixes critical vulnerabilities. See APSB18-01 # 28.0.0.161-1: 06/feb/2018 by Eric Hameleers # * Update. # 29.0.0.113-1: 14/mar/2018 by Eric Hameleers # * Update fixes critical vulnerabilities. See APSB18-05 # 29.0.0.140-1: 11/apr/2018 by Eric Hameleers # * Update fixes critical vulnerabilities. See APSB18-08 # 29.0.0.171-1: 10/may/2018 by Eric Hameleers # * Update fixes critical vulnerabilities. See APSB18-16 # 30.0.0.113-1: 07/jun/2018 by Eric Hameleers # * Update fixes critical vulnerabilities. See APSB18-19 # 30.0.0.134-1: 25/jul/2018 by Eric Hameleers # * Update fixes critical vulnerabilities. See APSB18-24 # 30.0.0.154-1: 15/aug/2018 by Eric Hameleers # * Update fixes critical vulnerabilities. See APSB18-25 # 31.0.0.108-1: 15/sep/2018 by Eric Hameleers # * Update fixes critical vulnerabilities. See APSB18-31 # 31.0.0.122-1: 13/oct/2018 by Eric Hameleers # * Update fixes critical vulnerabilities. See APSB18-35 # 31.0.0.153-1: 02/dec/2018 by Eric Hameleers # * Update fixes critical vulnerabilities. See APSB18-44 # 32.0.0.101-1: 06/dec/2018 by Eric Hameleers # * Update fixes critical vulnerabilities. See APSB18-42 # 32.0.0.114-1: 15/jan/2019 by Eric Hameleers # * Update fixes critical vulnerabilities. See APSB19-01 # 32.0.0.142-1: 03/mar/2019 by Eric Hameleers # * Update fixes critical vulnerabilities. See APSB19-06 # 32.0.0.156-1: 17/mar/2019 by Eric Hameleers # * Updates without critical vulnerabilities. See APSB19-12 # 32.0.0.171-1: 25/apr/2019 by Eric Hameleers # * Update fixes critical vulnerabilities. See APSB19-19 # 32.0.0.192-1: 23/may/2019 by Eric Hameleers # * Update fixes critical vulnerabilities. See APSB19-26 # 32.0.0.207-1: 23/jun/2019 by Eric Hameleers # * Update fixes critical vulnerabilities. See APSB19-30 # 32.0.0.223-1: 14/jul/2019 by Eric Hameleers # * Update comes with functional fixes. # 32.0.0.238-1: 23/aug/2019 by Eric Hameleers # * Update comes with functional fixes. # 32.0.0.255-1: 07/oct/2019 by Eric Hameleers # * Update fixes vulnerabilities. See APSB19-46 # 32.0.0.270-1: 22/oct/2019 by Eric Hameleers # * Update comes with functional fixes. # 32.0.0.293-1: 14/nov/2019 by Eric Hameleers # * Update comes with functional fixes. # 32.0.0.371-1: 19/may/2020 by Eric Hameleers # * Update fixes vulnerabilities. See APSB20-06 # 32.0.0.403-1: 21/jul/2020 by Eric Hameleers # * Update comes with functional fixes. # # ----------------------------------------------------------------------------- # # Run 'sh chromium-pepperflash-plugin.SlackBuild' to build a Slackware package. # The package (.txz) and .txt file as well as build logs are created in /tmp . # Install it using 'installpkg'. # # ----------------------------------------------------------------------------- # The version of this package will be determined later by examining the # extracted library file. SRCNAM=chromium SRCEXT=${SRCEXT:-""} # empty or "-dev" PLUGIN=pepperflash-plugin PRGNAM=${SRCNAM}${SRCEXT}-${PLUGIN} VERSION=${VERSION:-32.0.0.403} BUILD=${BUILD:-1} TAG=${TAG:-alien} # Differentiate between development and stable releases: if [ "x$SRCEXT" = "x-dev" ]; then CRFLAGS="CHROMIUM_DEV_FLAGS" else CRFLAGS="CHROMIUM_FLAGS" fi # Where do we look for sources? SRCDIR=$(cd $(dirname $0); pwd) DOCS="$SRCDIR/*.pdf" # Place to build (TMP) package (PKG) and output (OUTPUT) the program: TMP=${TMP:-/tmp/build} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} # Automatically determine the architecture we're building on: MARCH=${ARCH:-$( uname -m )} case "$MARCH" in x86_64) LIBDIRSUFFIX="64" ARCHBITS="64" export ARCH=x86_64 ;; i?86) LIBDIRSUFFIX="" ARCHBITS="32" export ARCH=i386 ;; *) echo "Unsupported architecture '$ARCH'" exit 1 ;; esac SOURCE[0]="$SRCDIR/flash_player_ppapi_linux.${VERSION}.${ARCH}.tar.gz" SRCURL[0]="https://fpdownload.adobe.com/pub/flashplayer/pdc/${VERSION}/flash_player_ppapi_linux.${ARCH}.tar.gz" SOURCE[1]="$SRCDIR/PlatformClients_PC_WWEULA-en_US-20150407_1357.pdf" SRCURL[1]="http://www.adobe.com/content/dam/Adobe/en/legal/licenses-terms/pdf/PlatformClients_PC_WWEULA-en_US-20150407_1357.pdf" ## ## --- with a little luck, you won't have to edit below this point --- ## ## # Exit the script on errors: set -e trap 'echo "$0 FAILED at line ${LINENO}" | tee $OUTPUT/error-${PRGNAM}.log' ERR # Catch unitialized variables: set -u P1=${1:-1} # Save old umask and set to 0022: _UMASK_=$(umask) umask 0022 # Create working directories: mkdir -p $OUTPUT # place for the package to be saved mkdir -p $TMP/tmp-$PRGNAM # location to build the source mkdir -p $PKG # place for the package to be built rm -rf $PKG/* # always erase old package's contents rm -rf $TMP/tmp-$PRGNAM/* # remove the remnants of previous build rm -rf $OUTPUT/{configure,make,install,error,makepkg,patch}-$PRGNAM.log # remove old log files # Source file availability: for (( i = 0; i < ${#SOURCE[*]}; i++ )) ; do if ! [ -f ${SOURCE[$i]} ]; then echo "Source '$(basename ${SOURCE[$i]})' not available yet..." # Check if the $SRCDIR is writable at all - if not, download to $OUTPUT [ -w "$SRCDIR" ] || SOURCE[$i]="$OUTPUT/$(basename ${SOURCE[$i]})" if [ -f ${SOURCE[$i]} ]; then echo "Ah, found it!"; continue; fi if ! [ "x${SRCURL[$i]}" == "x" ]; then echo "Will download file to $(dirname $SOURCE[$i])" wget --no-check-certificate -nv -T 20 -O "${SOURCE[$i]}" "${SRCURL[$i]}" || true if [ $? -ne 0 -o ! -s "${SOURCE[$i]}" ]; then echo "Fail to download '$(basename ${SOURCE[$i]})'. Aborting the build." mv -f "${SOURCE[$i]}" "${SOURCE[$i]}".FAIL exit 1 fi else echo "File '$(basename ${SOURCE[$i]})' not available. Aborting the build." exit 1 fi fi done if [ "$P1" == "--download" ]; then echo "Download complete." exit 0 fi # --- PACKAGE BUILDING --- cd $TMP/tmp-$PRGNAM echo "Extracting the source archive(s) for $PRGNAM..." tar xvf ${SOURCE[0]} chmod -R u+w,go+r-w,a+X-s . # Move the extracted files over to the package location: install -d $PKG/usr/lib${LIBDIRSUFFIX}/${SRCNAM}${SRCEXT}/PepperFlash install -m0644 manifest.json libpepflashplayer.so \ $PKG/usr/lib${LIBDIRSUFFIX}/${SRCNAM}${SRCEXT}/PepperFlash/ # Install a configuration file for the plugin: install -d $PKG/etc/${SRCNAM}${SRCEXT} cat $SRCDIR/${PRGNAM}.conf \ | sed -e "s/@PRGNAM@/${SRCNAM}${SRCEXT}/g" \ -e "s/@SRCEXT@/${SRCEXT}/g" \ -e "s/@CRFLAGS@/${CRFLAGS}/g" \ -e "s/@LIBDIRSUFFIX@/${LIBDIRSUFFIX}/g" \ > $PKG/etc/${SRCNAM}${SRCEXT}/${PLUGIN}.conf # Add documentation: mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a LGPL README $DOCS $PKG/usr/doc/$PRGNAM-$VERSION || true cat $SRCDIR/$(basename $0) > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild chown -R root:root $PKG/usr/doc/$PRGNAM-$VERSION find $PKG/usr/doc -type f -exec chmod 644 {} \; # Add a package description: mkdir -p $PKG/install cat $SRCDIR/slack-desc > $PKG/install/slack-desc cat $SRCDIR/slack-required > $PKG/install/slack-required # Build the package: cd $PKG makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.${PKGTYPE:-txz} 2>&1 | tee $OUTPUT/makepkg-${PRGNAM}.log cd $OUTPUT md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.${PKGTYPE:-txz} > ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.${PKGTYPE:-txz}.md5 cd - cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txt cat $PKG/install/slack-required > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.dep # Restore the original umask: umask ${_UMASK_}