diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 116 |
1 files changed, 62 insertions, 54 deletions
@@ -5,8 +5,7 @@ pkgname=librewolf _pkgname=LibreWolf -pkgver=67.0.4 -_bundle=ae67b187427ebaa695597d65de077c886fe37b7a +pkgver=68.0 pkgrel=1 pkgdesc="Community-maintained fork of Librefox: a privacy and security-focused browser" arch=(x86_64) @@ -15,7 +14,7 @@ url="https://LibreWolf.gitlab.io" depends=(gtk3 mozilla-common libxt startup-notification mime-types dbus-glib ffmpeg nss ttf-font libpulse) makedepends=(unzip zip diffutils python2-setuptools yasm mesa imake inetutils - xorg-server-xvfb autoconf2.13 rust mercurial clang llvm jack gtk2 + xorg-server-xvfb autoconf2.13 rust clang llvm jack gtk2 python nodejs python2-psutil cbindgen nasm git inkscape) optdepends=('networkmanager: Location detection via available WiFi networks' 'libnotify: Notification integration' @@ -23,65 +22,71 @@ optdepends=('networkmanager: Location detection via available WiFi networks' 'speech-dispatcher: Text-to-Speech' 'hunspell-en_US: Spell checking, American English') options=(!emptydirs !makeflags) -_repo=https://hg.mozilla.org/mozilla-unified -source=(https://hg.cdn.mozilla.net/mozilla-unified/${_bundle}.zstd-max.hg - "0001-bz-1521249.patch::https://git.archlinux.org/svntogit/packages.git/plain/trunk/0001-bz-1521249.patch?h=packages/firefox" +source=(https://archive.mozilla.org/pub/firefox/releases/$pkgver/source/firefox-$pkgver.source.tar.xz $pkgname.desktop $pkgname.cfg.patch - "git+https://gitlab.com/${pkgname}-community/${pkgname}.git#commit=634710ed") - # "hg+$_repo#tag=FIREFOX_${_pkgver//./_}_RELEASE" -sha256sums=('8fb3423714095b206103649cb179f4997b6f85a616994e106146df19aee778f7' - 'd0673786a6a1f1b9f6f66a3a1356afa33f1f18f59dabd92bd193c88c52a1d04c' + "git+https://gitlab.com/${pkgname}-community/${pkgname}.git#commit=a9a64b7f") +sha256sums=('f7d61a08820088f1280d27f0808e355152c1dd0c94625fd077ced7319e522565' '0471d32366c6f415f7608b438ddeb10e2f998498c389217cdd6cc52e8249996b' - 'b4bfff32d4a385f5075e0cc4df72574c51c68aad3ec4182eb582f95bee59cabf' + '5b748388c83fae3d09978f845b0211692ebb9191e28709c7e04daf0f49a5ea48' 'SKIP') +# +# For telemetry and crash dump analysis to work correctly, we need to tell the +# build system which Mercurial changeset is our source. Should not be needed +# anymore once 69 is released: +# https://bugzilla.mozilla.org/show_bug.cgi?id=1338099 +# _repo=https://hg.mozilla.org/releases/mozilla-release +# _tag=FIREFOX_${pkgver//./_}_RELEASE +# +# _changeset=353628fec415324ca6aa333ab6c47d447ecc128e +# _changeset_tag=FIREFOX_68_0_RELEASE +# +# if [[ $1 == update_hgrev ]]; then + # _changeset=$(hg id -r $_tag --id $_repo --template '{node}') + # sed -e "/^_changeset=/s/=.*/=$_changeset/;/^_changeset_tag=/s/=.*/=$_tag/" \ + # -i "${BASH_SOURCE[0]}" + # exit 0 +# elif [[ $_tag != $_changeset_tag ]]; then + # error "Changeset needs update. Run: bash PKGBUILD update_hgrev" + # exit 1 +# fi prepare() { mkdir mozbuild - mkdir mozilla-unified - - # hg clone failed / timed out on my machines so we use a bundle - hg init mozilla-unified - cd mozilla-unified - hg unbundle ${srcdir}/${_bundle}.zstd-max.hg - cat > .hg/hgrc <<END -[paths] -default = https://hg.mozilla.org/mozilla-unified/ -END - hg pull - hg update "FIREFOX_${pkgver//./_}_RELEASE" - - # https://bugzilla.mozilla.org/show_bug.cgi?id=1521249 - patch -Np1 -i ../0001-bz-1521249.patch + cd firefox-$pkgver # NOTE: - # unlock some prefs I deem worthy of keeping unlocked + # unlock some prefs I deem worthy of keeping unlocked or slightly less restricted # (with librewolf installed systemwide, you'd otherwise always have to sudo around in /usr/lib) # it mainly keeps addon update / install settings / urls unlocked # as well as form fill settings - # uncomment it if you are OK with a slight potential decrease in privacy + # uncomment it if you are OK with a slight potential decrease in privacy, + # or even better: check what I'm doing there. # cd ${srcdir}/${pkgname} # patch -Np1 -i ${srcdir}/${pkgname}.cfg.patch - # cd ${srcdir}/mozilla-unified - + # cd ${srcdir}/firefox-$pkgver local ICON_FOLDER=$srcdir/$pkgname/branding/icon - local BRANDING_FOLDER=$srcdir/$pkgname/browser/resources/source_files/browser/branding/librewolf + local BRANDING_FOLDER=$srcdir/$pkgname/browser/common/source_files/browser/branding/$pkgname # generate icons and moves them to the branding folder - echo Generating icons from $ICON_FILE_PATH and moving to $BRANDING_FOLDER_PATH; - inkscape --without-gui --file=$ICON_FOLDER/icon.svg --export-png=$BRANDING_FOLDER/default16.png --export-width=16 --export-height=16 - inkscape --without-gui --file=$ICON_FOLDER/icon.svg --export-png=$BRANDING_FOLDER/default32.png --export-width=32 --export-height=32 - inkscape --without-gui --file=$ICON_FOLDER/icon.svg --export-png=$BRANDING_FOLDER/default48.png --export-width=48 --export-height=48 - inkscape --without-gui --file=$ICON_FOLDER/icon.svg --export-png=$BRANDING_FOLDER/default64.png --export-width=64 --export-height=64 - inkscape --without-gui --file=$ICON_FOLDER/icon.svg --export-png=$BRANDING_FOLDER/default128.png --export-width=128 --export-height=128 - inkscape --without-gui --file=$ICON_FOLDER/icon.svg --export-png=$BRANDING_FOLDER/VisualElements_70.png --export-width=70 --export-height=70 - inkscape --without-gui --file=$ICON_FOLDER/icon.svg --export-png=$BRANDING_FOLDER/VisualElements_150.png --export-width=150 --export-height=150 + echo Generating icons from $ICON_FOLDER and moving to $BRANDING_FOLDER; + inkscape -z -f $ICON_FOLDER/icon.svg -e $BRANDING_FOLDER/default16.png -w 16 -h 16 + inkscape -z -f $ICON_FOLDER/icon.svg -e $BRANDING_FOLDER/default32.png -w 32 -h 32 + inkscape -z -f $ICON_FOLDER/icon.svg -e $BRANDING_FOLDER/default48.png -w 48 -h 48 + inkscape -z -f $ICON_FOLDER/icon.svg -e $BRANDING_FOLDER/default64.png -w 64 -h 64 + inkscape -z -f $ICON_FOLDER/icon.svg -e $BRANDING_FOLDER/default128.png -w 128 -h 128 + inkscape -z -f $ICON_FOLDER/icon.svg -e $BRANDING_FOLDER/VisualElements_70.png -w 70 -h 70 + inkscape -z -f $ICON_FOLDER/icon.svg -e $BRANDING_FOLDER/VisualElements_150.png -w 150 -h 150 cat >.mozconfig <<END ac_add_options --enable-application=browser +# This supposedly speeds up compilation (We test through dogfooding anyway) +ac_add_options --disable-tests +ac_add_options --disable-debug + ac_add_options --prefix=/usr ac_add_options --enable-release ac_add_options --enable-hardening @@ -101,16 +106,12 @@ ac_add_options --enable-update-channel=release ac_add_options --with-app-name=${pkgname} ac_add_options --with-app-basename=${_pkgname} ac_add_options --with-branding=browser/branding/${pkgname} -ac_add_options --with-distribution-id=io.github.${pkgname} -export MOZ_APP_REMOTINGNAME=${_pkgname//-/} +ac_add_options --with-distribution-id=io.gitlab.${pkgname} +ac_add_options --with-unsigned-addon-scopes=app,system +# export MOZ_APP_REMOTINGNAME=${_pkgname//-/} # export MOZ_TELEMETRY_REPORTING=0 export MOZ_REQUIRE_SIGNING=1 -# Keys -# ac_add_options --with-google-location-service-api-keyfile=${PWD@Q}/google-api-key -# ac_add_options --with-google-safebrowsing-api-keyfile=${PWD@Q}/google-api-key -# ac_add_options --with-mozilla-api-keyfile=${PWD@Q}/mozilla-api-key - # System libraries ac_add_options --with-system-nspr ac_add_options --with-system-nss @@ -122,14 +123,23 @@ ac_add_options --enable-startup-notification ac_add_options --disable-crashreporter ac_add_options --disable-gconf ac_add_options --disable-updater + +# Disables crash reporting, telemetry and other data gathering tools +mk_add_options MOZ_CRASHREPORTER=0 +mk_add_options MOZ_DATA_REPORTING=0 +mk_add_options MOZ_SERVICES_HEALTHREPORT=0 +mk_add_options MOZ_TELEMETRY_REPORTING=0 END - cp -r ${srcdir}/${pkgname}/browser/resources/source_files/{docshell,browser} ./ + cp -r ${srcdir}/${pkgname}/browser/common/source_files/browser ./ + + # Disabling Pocket + sed -i "s/'pocket'/#'pocket'/g" ./browser/components/moz.build } build() { - cd mozilla-unified + cd firefox-$pkgver export MOZ_SOURCE_REPO="$_repo" export MOZ_NOSPAM=1 @@ -145,9 +155,9 @@ build() { } package() { - cd mozilla-unified + cd firefox-$pkgver DESTDIR="$pkgdir" ./mach install - find . -name '*crashreporter-symbols-full.zip' -exec cp -fvt "$startdir" {} + + # find . -name '*crashreporter-symbols-full.zip' -exec cp -fvt "$startdir" {} + _vendorjs="$pkgdir/usr/lib/$pkgname/browser/defaults/preferences/vendor.js" install -Dm644 /dev/stdin "$_vendorjs" <<END @@ -165,12 +175,12 @@ pref("extensions.autoDisableScopes", 11); pref("extensions.shownSelectionUI", true); END - cp -r ${srcdir}/${pkgname}/settings/settings/* $pkgdir/usr/lib/$pkgname + cp -r ${srcdir}/${pkgname}/settings/* $pkgdir/usr/lib/$pkgname _distini="$pkgdir/usr/lib/$pkgname/distribution/distribution.ini" install -Dm644 /dev/stdin "$_distini" <<END [Global] -id=io.github.${pkgname} +id=io.gitlab.${pkgname} version=1.0 about=LibreWolf Arch Linux @@ -205,5 +215,3 @@ END ln -srf "$pkgdir/usr/bin/$pkgname" \ "$pkgdir/usr/lib/$pkgname/librewolf-bin" } - -# vim:set sw=2 et: |