#!/bin/bash # $Id: chromium.SlackBuild,v 1.265 2021/12/14 18:28:07 root Exp root $ # Copyright 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 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 # Descr: Open Source version of Chrome Web Browser # URL: http://www.chromium.org/ # Build needs: - ninja; # - nodejs >= 15.6.0; # - gcc >= 8 for bootstrapping gn; # - nasm >= 2.14 (yasm no longer being used); # - cmake >= 3.13.4; # - python3 >= 3.7, python3-setuptools; # - java runtime # - Internet access (for downloading toolchain bins) # Needs: # Changelog: # # ----------------------------------------------------------------------------- # # ----------------------------------------------------------------------------- # # Run 'sh chromium.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'. # # ----------------------------------------------------------------------------- # Build an ungoogled chromium package (default no): USE_UNGOOGLED=${USE_UNGOOGLED:-1} # Build a development version of chromium (default no): USE_DEV=${USE_DEV:-0} [ ${USE_DEV} -ne 0 ] && SRCEXT="-dev" || SRCEXT="" [ ${USE_UNGOOGLED} -ne 0 ] && SRCEXT="${SRCEXT}-ungoogled" # ----------------------------------------------------------------------------- SRCNAM=chromium PRGNAM=${SRCNAM}${SRCEXT} # chromium, chromium-dev, chromium-ungoogled, etc VERSION=${VERSION:-96.0.4664.110} UNGOOGLED=${UNGOOGLED:-96.0.4664.110-1} BUILD=${BUILD:-1} TAG=${TAG:-alien} # Cross-compiling 32bit binaries on 64bit Slackware; set to "YES": CROSS32=${CROSS32:-"NO"} # Debug build (disabled by default): USE_DEBUG=${USE_DEBUG:-0} # Differentiate between stable and development releases: if [ $USE_DEV -ne 0 ]; then CRFLAGS="CHROMIUM_DEV_FLAGS" CRUSERFLAGS="CHROMIUM_DEV_USER_FLAGS" elif [ $USE_UNGOOGLED -ne 0 ]; then CRFLAGS="CHROMIUM_UNGOOGLED_FLAGS" CRUSERFLAGS="CHROMIUM_UNGOOGLED_USER_FLAGS" else CRFLAGS="CHROMIUM_FLAGS" CRUSERFLAGS="CHROMIUM_USER_FLAGS" fi # If pulseaudio is installed we support it unless you explicitly disable it: if /usr/bin/pkg-config --exists libpulse 2>/dev/null ; then USE_PA=${USE_PA:-1} else USE_PA=${USE_PA:-0} fi # If wayland is installed we support it unless you explicitly disable it: if /usr/bin/pkg-config --exists wayland-client 2>/dev/null ; then USE_WAYLAND=${USE_WAYLAND:-1} else USE_WAYLAND=${USE_WAYLAND:-0} fi # Build Chromium using a debian sysroot for Slackware 14.2 or older; # FYI, this will actually also just work for Slackware > 14.2: USE_SYSROOT=${USE_SYSROOT:-1} # By default the ffmpeg and other component libraries are built statically # into the chromium binary. This takes more time at the linking stage but # will speed up the browser's startup. # You can instead build shared libraries, among which will be libffmpeg.so # (formerly libffmpegsumo.so) if you want to be able to swap the libffmpeg.so # library for someone else's library with more features: SHARED_FFMPEG=${SHARED_FFMPEG:-false} # other option is 'true' # The branding determines what (proprietary) codec support will be added: FFMPEG_BRANDING=${FFMPEG_BRANDING:-ChromeOS} # or "Chrome", or "Chromium" # HEVC support. Set to '0' to disable, '1' to enable: FFMPEG_HEVC=${FFMPEG_HEVC:-0} # Use the clang compiler. Results in faster build and smaller binaries. # This default to "1" (on) because gcc support is getting stale # and the gcc of Slackware 14.2 is already too old. # You will have to download and apply lots of patches when using gcc anyway. # This script can compile google's modified clang from source, so that 32bit # can be supported on older Slackware (Google offers only 64bit pre-built # clang for download0: USE_CLANG=${USE_CLANG:-1} # Build a custom clang or use the system clang? # CLANG_MIN is the minimal clang version needed to compile chromium: CLANG_MIN=12 if [ $(clang --version |grep '^clang' |cut -d' ' -f3 |cut -d. -f1) -ge ${CLANG_MIN} ]; then BUILD_CLANG=${BUILD_CLANG:-0} else BUILD_CLANG=${BUILD_CLANG:-1} fi # If you don't want to enable support for Widevine CDM # (content decryption module) say "0" here. USE_CDM=${USE_CDM:-1} # Chromium supports VAAPI (we disable it when the platform is not capable): USE_VAAPI=${USE_VAAPI:-1} # If you are OK with the "OK Google" hotwording feature which will # automatically download a binary blob with proprietary code, set this to "1". # Some people object to a download without consent so it is disabled by default: USE_HOTWORD=${USE_HOTWORD:-0} DOCS="AUTHORS BUILD.gn CODE_OF_CONDUCT.md DEPS LICENSE* OWNERS WATCHLISTS README*" # Where do we look for sources? SRCDIR=$(cd $(dirname $0); pwd) # Place to build (TMP) package (PKG) and output (OUTPUT) the program: TMP=${TMP:-/tmp/build} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} # Visible directory listing of anything Chrome related is: # http://gsdview.appspot.com/ # Official location (non-browsable) of the above is: # https://commondatastorage.googleapis.com/ # This package used to be built with Alien's Google API keys for Chromium. # The keys must be present in the file "chromium_apikeys". # If you rebuild this package, you can use your own API keys. See: # http://www.chromium.org/developers/how-tos/api-keys # This browser is now compiled without API keys. This will disable stuff like # browser sync and other functionality which accesses Google APIs. # The following variables must be set to access Google's public APIs: # _google_api_key # _google_default_client_id # _google_default_client_secret _google_api_key="" _google_default_client_id="" _google_default_client_secret="" if [ ${USE_UNGOOGLED} -eq 0 ]; then if [ -f ${HOME}/.chromium_apikeys ]; then . ${HOME}/.chromium_apikeys elif [ -f ${SRCDIR}/chromium_apikeys ]; then . ${SRCDIR}/chromium_apikeys fi if [ -z "$_google_api_key" ]; then cat <> /etc/${PRGNAM}/01-apikeys.conf # echo "export GOOGLE_DEFAULT_CLIENT_ID='yourclientid'" >> /etc/${PRGNAM}/01-apikeys.conf # echo "export GOOGLE_DEFAULT_CLIENT_SECRET='yourclientsecret'" >> /etc/${PRGNAM}/01-apikeys.conf Press Ctrl-C to abort this script and add your own Google API keys, or wait 10 seconds to continue compilation without adding keys. EOT sleep 10 fi fi ## ## --- with a little luck, you won't have to edit below this point --- ## ## # Automatically determine the architecture we're building on: MARCH=$( uname -m ) if [ -z "$ARCH" ]; then case "$MARCH" in i?86) export ARCH=i586 ;; armv7*) export ARCH=$MARCH ;; arm*) export ARCH=arm ;; # Unless $ARCH is already set, use uname -m for all other archs: *) export ARCH=$MARCH ;; esac fi case "$ARCH" in i?86) SLKCFLAGS="-O2 -march=${ARCH} -mtune=i686" # Fix for using lld while linking chromium in a 32bit chroot: SLKLDFLAGS="-Wl,-z,notext"; LIBDIRSUFFIX="" DSSE="1" FFMPEG_ARCH="ia32" SYSROOT_ARCH="i386" SYSROOT_TARGET="i386-linux-gnu" PKGARCH="$ARCH" ;; x86_64) # Ensure that 32bit libraries are found first if we cross-compile: if [ "${CROSS32}" = "YES" ]; then SLKCFLAGS="-O2" SLKLDFLAGS="-L/usr/lib"; LIBDIRSUFFIX="" FFMPEG_ARCH="ia32" SYSROOT_ARCH="i386" SYSROOT_TARGET="i386-linux-gnu" PKGARCH="i586" else SLKCFLAGS="-O2 -fPIC" SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64" FFMPEG_ARCH="x64" SYSROOT_ARCH="amd64" SYSROOT_TARGET="x86_64-linux-gnu" PKGARCH="$ARCH" fi #DSSE="0" DSSE="1" ;; armv7*) SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard" SLKLDFLAGS="-Wl,-z,notext"; LIBDIRSUFFIX="" DSSE="1" # Widevine not supported (no binary library available): USE_CDM=0 # VAAPI not supported: USE_VAAPI=0 FFMPEG_ARCH="arm" SYSROOT_ARCH="arm" SYSROOT_TARGET="arm-linux-gnueabihf" PKGARCH="$ARCH" ;; *) SLKCFLAGS=${SLKCFLAGS:-"O2"} SLKLDFLAGS=${SLKLDFLAGS:-""}; LIBDIRSUFFIX=${LIBDIRSUFFIX:-""} DSSE="1" # Widevine not supported by default: USE_CDM=0 # VAAPI not supported by default: USE_VAAPI=0 FFMPEG_ARCH="$ARCH" SYSROOT_ARCH="$ARCH" SYSROOT_TARGET="$ARCH-linux-gnu" PKGARCH="$ARCH" ;; esac case "$ARCH" in armv7*) TARGET=$ARCH-slackware-linux-gnueabi ;; arm*) TARGET=${SYSROOT_ARCH}-slackware-linux-gnueabihf ;; *) TARGET=$ARCH-slackware-linux ;; esac # 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 # Source locations: SOURCE[0]="$SRCDIR/${SRCNAM}-${VERSION}.tar.xz" SRCURL[0]="https://commondatastorage.googleapis.com/${SRCNAM}-browser-official/${SRCNAM}-${VERSION}.tar.xz" SOURCE[1]="$SRCDIR/widevine-versions.txt" SRCURL[1]="https://dl.google.com/widevine-cdm/versions.txt" if [ ${USE_UNGOOGLED} -ne 0 ]; then SOURCE[2]="$SRCDIR/ungoogled-chromium-${UNGOOGLED}.tar.gz" SRCURL[2]="https://github.com/Eloston/ungoogled-chromium/archive/${UNGOOGLED}.tar.gz" #SRCURL[2]="https://github.com/tangalbert919/ungoogled-chromium/archive/${UNGOOGLED}.tar.gz" fi # 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 --- echo "++" echo "|| $PRGNAM-$VERSION" echo "++" cd $TMP/tmp-$PRGNAM echo "Extracting the source archive(s) for $PRGNAM..." tar -xf ${SOURCE[0]} if [ ${USE_UNGOOGLED} -ne 0 ]; then tar -xf ${SOURCE[2]} fi cd ${SRCNAM}-${VERSION} if [ ${USE_UNGOOGLED} -ne 0 ]; then # Give chromium-ungoogled our own logo: for size in 16 32 ; do convert ${SRCDIR}/${PRGNAM}.png -resize ${size}x${size} \ chrome/app/theme/default_100_percent/chromium/product_logo_$size.png done for size in 24 48 64 128 256; do convert ${SRCDIR}/${PRGNAM}.png -resize ${size}x${size} \ chrome/app/theme/chromium/product_logo_$size.png done fi if [ ${USE_SYSROOT} -eq 1 ]; then # Download a sysroot image: python3 build/linux/sysroot_scripts/install-sysroot.py --arch=${SYSROOT_ARCH} fi # Allow building against system libraries in official builds: sed -e 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \ -i tools/generate_shim_headers/generate_shim_headers.py # Patches and bug fixes: touch $OUTPUT/patch-${PRGNAM}.log ## Try to fix 32bit builds on glibc >= 2.33 - thanks Matt Denton: #cat $SRCDIR/patches/linux-sandbox-syscall-broker-use-struct-kernel_stat.patch \ # | patch -p1 --verbose 2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log #cat $SRCDIR/patches/linux-sandbox-fix-fstatat-crash.patch \ # | patch -p1 --verbose 2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log # Be compatible with gcc 10: cat $SRCDIR/patches/chromium_gcc10.patch | patch -p1 --verbose \ 2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log # Fix the link on 32bit: sed -e '/ldflags /s/-m32/&", "-Wl,-z,notext/' \ -i build/config/compiler/BUILD.gn 2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log ## Fix a compilation error because we enable HEVC but are not ChromeOS: #cat $SRCDIR/patches/chromium_hevc_non_chromeos.patch | patch -p1 --verbose \ # 2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log # Slackware specific: # When compiling google's clang on 32bit Slackware or on ARM, add our triplets. # I am a python noob so this is clumsy, better implementation is welcome :-) cp $SRCDIR/patches/clang.toolchains.slackware.triple.diff . cat $SRCDIR/patches/chromium_slackware_triplet.patch | patch -p1 --verbose \ 2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log # Don't crap out when gzip does not support '--rsyncable' (Slackware < 14.2): if ! gzip --help |grep -q rsyncable ; then cat $SRCDIR/patches/chromium_no_rsyncable.patch | patch -p1 --verbose \ 2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log fi if [ $FFMPEG_HEVC -eq 1 ]; then # Add essential proprietary codecs to the "chrome" branding of ffmpeg: cat $SRCDIR/patches/chromium_ffmpeg_prop.patch | patch -p1 --verbose \ 2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log ## Advertize HEVC/X.265 support (won't work at the moment): #cat $SRCDIR/patches/chromium_hevc_supported.patch | patch -p1 --verbose \ # 2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log fi if [ ${USE_UNGOOGLED} -ne 0 ]; then # Apply ungoogled-chromium patch kit: UGDIR=$TMP/tmp-$PRGNAM/ungoogled-chromium-${UNGOOGLED} echo "-- Un-googling internal binaries:" python3 ${UGDIR}/utils/prune_binaries.py ./ ${UGDIR}/pruning.list echo "-- Un-googling sources; apply patches:" python3 ${UGDIR}/utils/patches.py apply ./ ${UGDIR}/patches echo "-- Un-googling internally used domain list:" python3 ${UGDIR}/utils/domain_substitution.py apply \ -r ${UGDIR}/domain_regex.list \ -f ${UGDIR}/domain_substitution.list \ -c domainsubcache.tar.gz ./ fi # When compiling google's clang, we want 32bit too - don't limit us, devs: sed -i tools/clang/scripts/build.py -e "s/x86_64-unknown-linux-gnu/$TARGET/g" # And fix the 32bit compilation while we are at it: sed -i tools/clang/scripts/build.py -e "s/ldflags = \[\]/ldflags = \['-latomic'\]/" # When compiling google's clang, use the system cmake # (prebuilt binary from google is only available as 64bit): sed -i tools/clang/scripts/build.py -e 's/^ *AddCMakeToPath/#&/' # Prevent a build failure (yes, 'x64' even on 32bit Slackware): mkdir -p third_party/node/linux/node-linux-x64/bin ln -s /usr/bin/node third_party/node/linux/node-linux-x64/bin/ ln -s /usr/lib${LIBDIRSUFFIX}/java/bin/java third_party/jdk/current/bin/ if [ "$PRGNAM" != "$SRCNAM" ]; then # Save configuration in ~/.config/$PRGNAM: sed -e 's|filename = "chromium-browser|&'$SRCEXT'|' \ -e 's|confdir = "chromium|&'$SRCEXT'|' \ -i chrome/BUILD.gn sed -e 's|data_dir_basename = "chromium|&'$SRCEXT'|' \ -e 's|config_dir.Append("chromium|&'$SRCEXT'|' \ -i chrome/common/chrome_paths_linux.cc if [ -f chrome/browser/web_applications/external_web_app_manager.cc ]; then sed -e 's|/etc/chromium|&'$SRCEXT'|' \ -e 's|/usr/share/chromium|&'$SRCEXT'|' \ -i chrome/browser/web_applications/external_web_app_manager.cc else sed -e 's|/etc/chromium|&'$SRCEXT'|' \ -e 's|/usr/share/chromium|&'$SRCEXT'|' \ -i chrome/browser/web_applications/preinstalled_web_app_manager.cc fi sed -e 's|/etc/chromium|&'$SRCEXT'|' \ -e 's|/usr/share/chromium|&'$SRCEXT'|' \ -i chrome/common/chrome_paths.cc sed -e 's|/etc/chromium|&'$SRCEXT'|' \ -i components/policy/tools/template_writers/writer_configuration.py fi chown -R root:root . chmod -R u+w,go+r-w,a+X-s . echo Building ... [ ${USE_CLANG} -eq 1 ] && do_clang=true || do_clang=false [ ${BUILD_CLANG} -eq 1 ] && do_custclang=true || do_custclang=false [ ${USE_CDM} -eq 1 ] && do_cdm=true || do_cdm=false [ ${USE_HOTWORD} -eq 1 ] && do_hotword=true || do_hotword=false [ ${USE_PA} -eq 1 ] && do_pa=true || do_pa=false [ ${USE_SYSROOT} -eq 1 ] && do_sysroot=true || do_sysroot=false [ ${USE_VAAPI} -eq 1 ] && do_vaapi=true || do_vaapi=false [ ${USE_WAYLAND} -eq 1 ] && do_wayland=true || do_wayland=false [ ${FFMPEG_HEVC} -eq 1 ] && do_hevc=true || do_hevc=false export LDFLAGS="$SLKLDFLAGS" export CXXFLAGS="$SLKCFLAGS -Wno-unknown-warning-option" export CFLAGS="$SLKCFLAGS -Wno-unused-local-typedefs -Wno-unknown-warning-option" export PATH="$TMP/tmp-$PRGNAM/privatebin:$PATH" # After building gn, run: # "./out/Release/gn args out/Release --list" # for a list of all variables. _chromium_conf=( 'blink_enable_generated_code_formatting=false' 'blink_symbol_level=0' "enable_platform_hevc=${do_hevc}" 'enable_platform_ac3_eac3_audio=true' 'enable_platform_mpeg_h_audio=true' 'enable_platform_dolby_vision=true' 'enable_mse_mpeg2ts_stream_parser=true' 'enable_precompiled_headers=false' 'enable_pseudolocales=false' 'enable_swiftshader=true' 'enable_webrtc=true' 'fatal_linker_warnings=false' "ffmpeg_branding=\"${FFMPEG_BRANDING}\"" "is_clang=${do_clang}" 'is_debug=false' "is_component_build=${SHARED_FFMPEG}" "is_component_ffmpeg=${SHARED_FFMPEG}" "link_pulseaudio=${do_pa}" "linux_sandbox_path=\"/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/chrome_sandbox\"" #'linux_strip_binary=true' 'linux_use_bundled_binutils=false' "ozone_platform_wayland=${do_wayland}" #"rtc_use_pipewire=${do_wayland}" #"rtc_link_pipewire=${do_wayland}" #'rtc_pipewire_version="0.3"' # Otherwise chromium tries to link absent 0.2 'proprietary_codecs=true' 'remove_webcore_debug_symbols=true' 'symbol_level=0' 'treat_warnings_as_errors=false' "usb_ids_path=\"/usr/share/hwdata/usb.ids\"" 'use_allocator="none"' 'use_bundled_fontconfig=false' 'use_cfi_icall=false' # https://crbug.com/866290 'use_cups=true' 'use_custom_libcxx=true' 'use_gconf=false' 'use_kerberos=false' 'use_lld=true' 'use_ozone=true' "use_pulseaudio=${do_pa}" "use_sysroot=${do_sysroot}" "use_vaapi=${do_vaapi}" "use_xkbcommon=${do_wayland}" "extra_cxxflags=\"${CXXFLAGS}\"" "extra_ldflags=\"${LDFLAGS}\"" ) # Needed for Ungoogled Chromium 94 to prevent compile error related to # missing pref 'kGoogleServicesConsentedToSync' because 'is_debug=false' seems # to no longer suffice. Also, need to reduce crash proneness according to # https://groups.google.com/a/chromium.org/g/chromium-packagers/c/2E5AayFuFt4 : _chromium_conf+=( 'is_official_build=true' 'dcheck_always_on=false' ) # Prevent segfaults with llvm-12.0.1 (Chromium 94), thanks Void Linux: _chromium_conf+=( 'is_cfi=false' 'use_thin_lto=false' 'use_cfi_icall=false' 'chrome_pgo_phase=0' ) if [ ${USE_CLANG} -eq 1 ] && [ ${BUILD_CLANG} -eq 0 ]; then # Use system toolchain: _chromium_conf+=( 'custom_toolchain="//build/toolchain/linux/unbundle:default"' 'host_toolchain="//build/toolchain/linux/unbundle:default"' ) fi if [ ${USE_UNGOOGLED} -ne 0 ]; then # Add ungoogled flags if requested: readarray -t -O ${#_chromium_conf[@]} _chromium_conf < ${UGDIR}/flags.gn else # Add remainder of standard chromium flags: # https://chromium.googlesource.com/chromium/src/+/refs/heads/main/testing/variations/README.md _chromium_conf+=( "clang_use_chrome_plugins=${do_custclang}" 'enable_hangout_services_extension=true' "enable_hotwording=${do_hotword}" 'enable_js_type_check=true' 'enable_nacl=false' 'enable_nacl_nonsfi=false' 'enable_pepper_cdms=true' "enable_widevine=${do_cdm}" 'exclude_unwind_tables=true' 'disable_fieldtrial_testing_config=true' 'logging_like_official_build=true' ) fi # Add Google API key if defined: if [ -n "$_google_api_key" ]; then _chromium_conf+=( "google_api_key=\"$_google_api_key\"" ) # Also add client id/secret if it was provided: if [ -n "$_google_default_client_id" ]; then _chromium_conf+=( "google_default_client_id=\"$_google_default_client_id\"" "google_default_client_secret=\"$_google_default_client_secret\"" ) fi fi # For older Slackware: #'use_system_libdrm=false' #'use_system_minigbm=false' #if [ "$ARCH" == "i586" ] || [ "${CROSS32}" = "YES" ]; then # _chromium_conf=+=( 'target_cpu="x86"' ) #fi if [[ "$ARCH" =~ arm.* ]]; then _chromium_conf+=( 'target_cpu="arm"' 'target_os="linux"' ) fi # Change this back when CRBUG 592268 is fixed (error during final link: # undefined reference to `base::i18n::GetRawIcuMemory()) # See https://bugs.chromium.org/p/chromium/issues/detail?id=592268 # icu_use_data_file_flag=false # The array of possible replacements of embedded with system libraries is # found in 'build/linux/unbundle/replace_gn_files.py': gn_system_libraries=( # 'bzip2' # 'ffmpeg' 'flac' # 'freetype2' # 'harfbuzz' # 'icu' # 'libdrm' # 'libevent' # 'libjpeg' # 'libpng' # 'libvpx' # 'libwebp' # 'libxml' # 'libxslt' # 'opus' # 're2' # 'snappy' # 'zlib' ) # Unbundle the libraries which we use from the system. # (taken from Arch Linux:) # This *should* do what the remove_bundled_libraries.py script does, # with the added benefit of not having to list all the remaining libraries: echo "-- Unbundling system libraries from $PRGNAM sources." for ULIB in ${gn_system_libraries[@]}; do find -type f -path "*third_party/$ULIB/*" \ \! -path "*third_party/$ULIB/chromium/*" \ \! -path "*third_party/$ULIB/google/*" \ \! -regex '.*\.\(gn\|gni\|isolate\)' \ -delete done # Change bundled libraries to system ones: echo "-- Change bundled to system libraries in $PRGNAM sources." python3 build/linux/unbundle/replace_gn_files.py --system-libraries ${gn_system_libraries[@]} # Do not make the build fail, see Chromium issue #386097: python3 third_party/libaddressinput/chromium/tools/update-strings.py \ 2>&1 | tee $OUTPUT/update_strings-${PRGNAM}.log # Use usb.ids at run time instead of compiling it in: sed -i services/device/public/cpp/usb/BUILD.gn \ -e 's|//third_party/usb_ids/usb.ids|/usr/share/hwdata/usb.ids|g' # Do not make the build fail, see https://groups.google.com/a/chromium.org/d/topic/chromium-packagers/9JX1N2nf4PU/discussion : touch chrome/test/data/webui/i18n_process_css_test.html # Do not make the build fail: if [ ! -f chrome/test/data/webui_test_resources.grd ]; then cat <chrome/test/data/webui_test_resources.grd EOF fi if [ ${USE_SYSROOT} -eq 1 ]; then # Take care of Debian/Ubuntu related missing header issues: SYSROOTDIR=$(basename $(ls build/linux/ |grep ${SYSROOT_ARCH}-sysroot)) ln -s ../../lib/${SYSROOT_TARGET}/glib-2.0/include/glibconfig.h \ build/linux/${SYSROOTDIR}/usr/include/glib-2.0/glibconfig.h ln -s ../../../lib/${SYSROOT_TARGET}/dbus-1.0/include/dbus/dbus-arch-deps.h \ build/linux/${SYSROOTDIR}/usr/include/dbus-1.0/dbus/dbus-arch-deps.h ln -s ../../lib/${SYSROOT_TARGET}/graphene-1.0/include/graphene-config.h \ build/linux/${SYSROOTDIR}/usr/include/graphene-1.0/graphene-config.h # Take care of Debian/Ubuntu related linker issues: #echo "/usr/lib/${SYSROOT_TARGET}/nss" >> \ # build/linux/${SYSROOTDIR}/etc/ld.so.conf.d/${SYSROOT_TARGET}.conf for SOFILE in build/linux/${SYSROOTDIR}/usr/lib/${SYSROOT_TARGET}/nss/*.so ; do ln -sf nss/$(basename $SOFILE) \ build/linux/${SYSROOTDIR}/usr/lib/${SYSROOT_TARGET}/ done ln -s libsqlite3.so.0 \ build/linux/${SYSROOTDIR}/usr/lib/${SYSROOT_TARGET}/libsqlite3.so # The platform-specific alias for the ARM readelf binary is missing # from the debian sysroot image: if [ ! -f build/linux/${SYSROOTDIR}/usr/bin/${SYSROOT_TARGET}-readelf ]; then ln -s /usr/bin/readelf \ build/linux/${SYSROOTDIR}/usr/bin/${SYSROOT_TARGET}-readelf fi fi # Do not make the build fail on stripping chromedriver, # because Chromium installs a 64bit version of eu-strip on the 32bit & ARM OS: if [ "$ARCH" != "x86_64" ]; then if file $TMP/tmp-$PRGNAM/${SRCNAM}-${VERSION}/buildtools/third_party/eu-strip/bin/eu-strip 2>/dev/null | grep -q "ELF 64-bit" ; then install -D -m0755 -t $TMP/tmp-$PRGNAM/${SRCNAM}-${VERSION}/buildtools/third_party/eu-strip/bin /usr/bin/eu-strip fi fi # --- Compile --- # # Final link uses lots of file descriptors. ulimit -n 2048 # Compile google's internal clang sources if needed if [ ${USE_CLANG} -eq 1 ] && [ ${BUILD_CLANG} -eq 1 ]; then # Build clang from source instead of downloading: echo "-- Building google's clang toolchain." HDR2REM="" if [ "$ARCH" == "i586" ]; then # Actually 32bit compilation fails by not finding 'bits/c++config.h'. # I could only work around this using a kludge: # cp -ia /usr/include/c++/$(gcc -dumpversion)/${TARGET}/bits/* /usr/include/c++/$(gcc -dumpversion)/bits/ # Keep a list of the symlinks we'll be creating: for HDR in /usr/include/c++/$(gcc -dumpversion)/${TARGET}/bits/*.h ; do if [ ! -f /usr/include/c++/$(gcc -dumpversion)/bits/$(basename $HDR) ]; then ln -s $HDR /usr/include/c++/$(gcc -dumpversion)/bits/ HDR2REM="$(basename $HDR) $HDR2REM" fi done fi LDFLAGS="$LDFLAGS" \ python3 tools/clang/scripts/build.py \ --bootstrap \ --disable-asserts \ --gcc-toolchain /usr \ --skip-checkout \ --use-system-cmake \ --without-android \ --without-fuchsia \ 2>&1 | tee $OUTPUT/clang_build-${PRGNAM}.log #--llvm-force-head-revision \ # Ensure that only this new clang is used, ignoring the system version: MYCLANG_PATH="$TMP/tmp-$PRGNAM/${SRCNAM}-${VERSION}/third_party/llvm-build/Release+Asserts/bin" export PATH="$MYCLANG_PATH:$PATH" fi # For Chromium 92, disable ffmpeg re-configuration on 32bit OS, # to avoid linking errors like: # "FAILED: v8_context_snapshot_generator - ld.lld: error: undefined symbol: ff_psdsp_init_x86" if [ ${FFMPEG_HEVC} -eq 1 ] && [ "${FFMPEG_ARCH}" != "ia32" ]; then echo "-- Re-configuring bundled ffmpeg..." if [ ${FFMPEG_HEVC} -eq 1 ]; then echo " +- Adding HEVC support..." FFMPEG_CUSTOM_ARGS="--enable-decoder=hevc --enable-demuxer=hevc --enable-parser=hevc" else FFMPEG_CUSTOM_ARGS="" fi if [ "${FFMPEG_ARCH}" = "ia32" ]; then # Re-configure bundled ffmpeg to make it compile on 32bit Slackware: echo " +- Disabling assembler code..." FFMPEG_CUSTOM_ARGS="${FFMPEG_CUSTOM_ARGS} --disable-asm" fi cd third_party/ffmpeg ## To prevent error on x86_64: ## "clang-5.0: error: invalid linker name in argument '-fuse-ld=lld'" ## in third_party/ffmpeg/build.x64.linux/ChromeOS/ffbuild/config.log #sed -e "s/--extra-ldflags=-fuse-ld=lld/--extra-ldflags=''/" \ # -i chromium/scripts/build_ffmpeg.py # Actual reconfigure steps: python3 chromium/scripts/build_ffmpeg.py linux ${FFMPEG_ARCH} \ --branding ${FFMPEG_BRANDING} -- ${FFMPEG_CUSTOM_ARGS} \ 2>&1 | tee $OUTPUT/ffmpeg_configure-${PRGNAM}.log python3 chromium/scripts/copy_config.sh \ 2>&1 | tee -a $OUTPUT/ffmpeg_configure-${PRGNAM}.log # Runs into 'SyntaxError: invalid syntax' with Python2: python3 chromium/scripts/generate_gn.py \ 2>&1 | tee -a $OUTPUT/ffmpeg_configure-${PRGNAM}.log cd - 2>/dev/null fi # Generate the ninja build files: echo "-- Bootstrapping 'gn'." if [ ${USE_CLANG} -eq 1 ] && [ ${BUILD_CLANG} -eq 1 ]; then # Symlink ld to lld to make gn linking stage succeed: cd $MYCLANG_PATH ; ln -s lld ld ; cd - 1>/dev/null fi LDFLAGS="$LDFLAGS" python3 tools/gn/bootstrap/bootstrap.py \ 2>&1 | tee $OUTPUT/gyp-${PRGNAM}.log #--use-custom-libcxx \ #if [ ${USE_CLANG} -eq 1 ] && [ ${BUILD_CLANG} -eq 1 ]; then # # Remove symlink again: # rm $MYCLANG_PATH/ld #fi if [ ${USE_CLANG} -eq 1 ] && [ ${BUILD_CLANG} -eq 1 ]; then if [ -n "$HDR2REM" ]; then # Remove the temporary header symlinks we created earlier: ( cd /usr/include/c++/$(gcc -dumpversion)/bits/ && rm $HDR2REM) fi fi echo "-- Generating ninja build files." out/Release/gn gen out/Release -v --args="${_chromium_conf[*]}" \ 2>&1 | tee -a $OUTPUT/gyp-${PRGNAM}.log # Compile everything: echo "-- Compiling the lot." if [ ${USE_CLANG} -eq 1 ] && [ ${BUILD_CLANG} -eq 1 ]; then # Use the clang that we build in-tree instead of using the system version: export CC="$MYCLANG_PATH/clang" export CXX="$MYCLANG_PATH/clang++" export LD="$MYCLANG_PATH/lld" export AR="$MYCLANG_PATH/llvm-ar" export NM="$MYCLANG_PATH/llvm-nm" elif [ "$USE_CLANG" = "0" ]; then # Be careful not to override CC and CXX (may have been set by gcc5): export CC=${CC:-"gcc"} export CXX=${CXX:-"g++"} else # Use the system clang: export CC="clang" export CXX="clang++" export LD="lld" export AR=ar fi export AS=as LDFLAGS="$LDFLAGS" \ LC_ALL=C \ ninja -C out/Release \ chrome chrome_sandbox chromedriver \ 2>&1 | tee $OUTPUT/ninja-${PRGNAM}.log if [ $USE_UNGOOGLED -eq 0 ]; then # ungoogled-chromium has crash-reporting disabled: LDFLAGS="$LDFLAGS" \ LC_ALL=C \ ninja -C out/Release \ chrome_crashpad_handler \ 2>&1 | tee -a $OUTPUT/ninja-${PRGNAM}.log fi # Manually install everything: echo "-- Manually installing everything." # The main binary: install -D out/Release/chrome $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/${PRGNAM} # The sandbox: install -D -m4755 -o root -g root out/Release/chrome_sandbox \ $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/chrome-sandbox # The Chromium implementation of the WebDriver wire protocol # (automated testing of web apps): install -D out/Release/chromedriver $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/chromedriver if [ $USE_UNGOOGLED -eq 0 ]; then # Crashpad, the Chromium crash-reporting client: install -D out/Release/chrome_crashpad_handler $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/chrome_crashpad_handler fi # Copy libraries: for CRLIB in {libEGL,libGLESv2,libVkICD_mock_icd,libVkLayer_khronos_validation,libvk_swiftshader}.so libvulkan.so.1 do install -D -m0755 -o root -g root out/Release/$CRLIB \ $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/$CRLIB done install -D -m0755 -o root -g root out/Release/vk_swiftshader_icd.json \ $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/vk_swiftshader_icd.json # Copy over the remaining binaries: cp -a \ out/Release/{swiftshader,angledata} \ $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/ rm -f $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/swiftshader/*TOC # Un-googled chromium disables MEI Preload: if [ -d out/Release/MEIPreload ]; then cp -a \ out/Release/MEIPreload \ $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/ fi cp -a \ out/Release/*.pak \ $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/ if [ -f out/Release/libffmpeg*.so ]; then cp -a \ out/Release/libffmpeg*.so* \ $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/ elif [ -f out/Release/lib/libffmpeg.so ]; then mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/lib/ cp -a \ out/Release/lib/libffmpeg.so* \ $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/lib/ fi for BLOB in out/Release/{natives_blob.bin,snapshot_blob.bin,v8_context_snapshot.bin}; do if [ -f $BLOB ]; then cp -a $BLOB $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/ fi done # Install appdata: mkdir -p $PKG/usr/share/metainfo if [ $USE_UNGOOGLED -eq 0 ]; then # Remove text with relevance to Google only (thanks Arch): sed -n \ -e "s/chromium-browser\.desktop/chromium-browser${SRCEXT}.desktop/" \ -e '//d' \ -e '/

/N;/

\n.*\(We invite\|Chromium supports Vorbis\)/,/<\/p>/d' \ -e '/^ $PKG/usr/share/metainfo/${PRGNAM}.appdata.xml elif [ -f $SRCDIR/${PRGNAM}.appdata.xml ]; then # A customized un-googled version for this package: cat $SRCDIR/${PRGNAM}.appdata.xml \ > $PKG/usr/share/metainfo/${PRGNAM}.appdata.xml fi chmod 644 $PKG/usr/share/metainfo/${PRGNAM}.appdata.xml if [ $USE_DEBUG -eq 0 ]; then # Manually strip binaries: strip --strip-unneeded \ $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/{${PRGNAM},chrome-sandbox} \ $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/chromedriver strip --strip-unneeded \ $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/*.so if [ $USE_UNGOOGLED -eq 0 ]; then strip --strip-unneeded \ $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/chrome_crashpad_handler fi if [ -f $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/lib/libffmpeg*.so ]; then strip --strip-unneeded \ $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/lib/lib*.so fi fi # Add locales: cp -a out/Release/locales $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/ ln -s locales $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/remoting_locales # Add resource files: cp -a out/Release/resources $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/ # This step used to be done for us, now we need to do it manually. # First, fix an incompatibility with the 'date' command in Slackware before 15.0: sed -e 's/--rfc-email/-R/g' \ -i $TMP/tmp-$PRGNAM/${SRCNAM}-${VERSION}/chrome/installer/linux/common/installer.include # We source this script since its 'process_template' function is needed, # in order to generate man page and desktop file: source $TMP/tmp-$PRGNAM/${SRCNAM}-${VERSION}/chrome/installer/linux/common/installer.include PACKAGE=${PRGNAM} PROGNAME=${PRGNAM} MENUNAME="${PRGNAM^} Web Browser" USR_BIN_SYMLINK_NAME=${PRGNAM} # Install a man page: process_template chrome/app/resources/manpage.1.in out/Release/${PRGNAM}.1 install -D -m0644 out/Release/${PRGNAM}.1 $PKG/usr/man/man1/${PRGNAM}.1 # Add a desktop file: process_template chrome/installer/linux/common/desktop.template \ out/Release/${PRGNAM}.desktop install -D -m0644 out/Release/${PRGNAM}.desktop \ $PKG/usr/share/applications/${PRGNAM}.desktop # Install desktop icons: for size in 16 32; do install -D -m0644 \ chrome/app/theme/default_100_percent/chromium/product_logo_$size.png \ $PKG/usr/share/icons/hicolor/${size}x${size}/apps/${PRGNAM}.png ln -s ${PRGNAM}.png \ $PKG/usr/share/icons/hicolor/${size}x${size}/apps/chromium-browser${SRCEXT}.png done for size in 24 48 64 128 256; do install -D -m0644 \ chrome/app/theme/chromium/product_logo_$size.png \ $PKG/usr/share/icons/hicolor/${size}x${size}/apps/${PRGNAM}.png ln -s ${PRGNAM}.png \ $PKG/usr/share/icons/hicolor/${size}x${size}/apps/chromium-browser${SRCEXT}.png done # Without this file, chromium refuses to start: cp -a out/Release/icudtl.dat $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/ # Install a wrapper script: install -D -m0755 $SRCDIR/${SRCNAM}.sh $PKG/usr/bin/${PRGNAM} sed \ -e "s/@PRGNAM@/${PRGNAM}/g" \ -e "s/@SRCEXT@/${SRCEXT}/g" \ -e "s/@LIBDIRSUFFIX@/${LIBDIRSUFFIX}/g" \ -e "s/@CRFLAGS@/${CRFLAGS}/g" \ -e "s/@CRUSERFLAGS@/${CRUSERFLAGS}/g" \ -i $PKG/usr/bin/${PRGNAM} # Make the chromedriver available in the $PATH : ln -s ../lib${LIBDIRSUFFIX}/${PRGNAM}/chromedriver $PKG/usr/bin/chromedriver${SRCEXT} # xdg-utils looks for "chromium-browser" so symlink it to the wrapper: ln -s ${PRGNAM} $PKG/usr/bin/chromium-browser${SRCEXT} # Move the 'default' file into place. # This allows users to override command-line options: mkdir -p $PKG/etc/${PRGNAM} cat $SRCDIR/${SRCNAM}.default | sed \ -e "s/@PRGNAM@/${PRGNAM}/g" \ -e "s/@SRCEXT@/${SRCEXT}/g" \ -e "s/@CRFLAGS@/${CRFLAGS}/g" \ -e "s/@CRUSERFLAGS@/${CRUSERFLAGS}/g" \ -e "s/@LIBDIRSUFFIX@/${LIBDIRSUFFIX}/g" \ > $PKG/etc/${PRGNAM}/00-default.conf.new if [ $USE_UNGOOGLED -eq 0 ]; then if [ -z "$_google_api_key" ]; then # If the package was built without an API key, install the sample file: cat $SRCDIR/${SRCNAM}.apikeys.sample \ > $PKG/etc/${PRGNAM}/01-apikeys.conf.new else # Else add it to the docs: mkdir -p $PKG/usr/doc/${PRGNAM}-${VERSION} cat $SRCDIR/${SRCNAM}.apikeys.sample \ > $PKG/usr/doc/${PRGNAM}-${VERSION}/01-apikeys.conf fi fi # Add this to the doinst.sh: mkdir -p $PKG/install cat <> $PKG/install/doinst.sh # Handle the incoming configuration files: config() { for infile in \$1; do NEW="\$infile" OLD="\`dirname \$NEW\`/\`basename \$NEW .new\`" # If there's no config file by that name, mv it over: if [ ! -r \$OLD ]; then mv \$NEW \$OLD elif [ "\`cat \$OLD | md5sum\`" = "\`cat \$NEW | md5sum\`" ]; then # toss the redundant copy rm \$NEW fi # Otherwise, we leave the .new copy for the admin to consider... done } config etc/${PRGNAM}/00-default.conf.new # Update the desktop database: if [ -x usr/bin/update-desktop-database ]; then chroot . /usr/bin/update-desktop-database usr/share/applications > /dev/null 2>&1 fi # Update hicolor theme cache: if [ -d usr/share/icons/hicolor ]; then if [ -x /usr/bin/gtk-update-icon-cache ]; then chroot . /usr/bin/gtk-update-icon-cache -f -t usr/share/icons/hicolor 1> /dev/null 2> /dev/null fi fi # Update the mime database: if [ -x usr/bin/update-mime-database ]; then chroot . /usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1 fi EOINS if [ -z "$_google_api_key" ] && [ $USE_UNGOOGLED -eq 0 ]; then echo "config etc/${PRGNAM}/01-apikeys.conf.new" >> $PKG/install/doinst.sh fi # Add documentation: mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION || true mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/patches cp -a $SRCDIR/patches/*.{diff,patch} $PKG/usr/doc/$PRGNAM-$VERSION/patches/ 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 {} \; # Compress the man page(s): if [ -d $PKG/usr/man ]; then find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \; for i in $(find $PKG/usr/man -type l -name "*.?") ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done fi # Add a package description: [ $USE_DEV -eq 0 ] && DEV_SPECIFICS="" \ || DEV_SPECIFICS=" This package contains the development version." [ $USE_UNGOOGLED -eq 0 ] && UG_SPECIFICS="" \ || UG_SPECIFICS=" This package contains the un-googled version." mkdir -p $PKG/install cat <$PKG/install/slack-desc $PRGNAM: chromium (Open Source version of Chrome Web Browser) $PRGNAM: $PRGNAM: Chromium is the open-source project behind Google Chrome, $PRGNAM: an attempt at creating a safer, faster, and more stable browser. $PRGNAM:$DEV_SPECIFICS $PRGNAM:$UG_SPECIFICS $PRGNAM: $PRGNAM: $PRGNAM: $PRGNAM: chromium home: http://www.chromium.org/ $PRGNAM: EOT # Build the package: cd $PKG makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${VERSION}-${PKGARCH}-${BUILD}${TAG}.${PKGTYPE:-txz} 2>&1 | tee $OUTPUT/makepkg-${PRGNAM}.log cd $OUTPUT md5sum ${PRGNAM}-${VERSION}-${PKGARCH}-${BUILD}${TAG}.${PKGTYPE:-txz} > ${PRGNAM}-${VERSION}-${PKGARCH}-${BUILD}${TAG}.${PKGTYPE:-txz}.md5 cd - cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-${VERSION}-${PKGARCH}-${BUILD}${TAG}.txt # Restore the original umask: umask ${_UMASK_}