mirror of
https://github.com/archlinux/aur.git
synced 2026-03-14 23:16:48 +01:00
Writed a patch to use perl-rename from extra
This commit is contained in:
parent
9ff2ae5af0
commit
9f7712c17c
2 changed files with 70 additions and 5 deletions
4
.SRCINFO
4
.SRCINFO
|
|
@ -1,7 +1,7 @@
|
|||
pkgbase = icecat
|
||||
pkgdesc = GNU version of the Firefox browser.
|
||||
pkgver = 78.10.0
|
||||
pkgrel = 1
|
||||
pkgrel = 2
|
||||
url = http://www.gnu.org/software/gnuzilla/
|
||||
arch = x86_64
|
||||
license = GPL
|
||||
|
|
@ -32,7 +32,7 @@ pkgbase = icecat
|
|||
makedepends = mercurial
|
||||
makedepends = git
|
||||
makedepends = lld
|
||||
makedepends = perl-file-rename
|
||||
makedepends = perl-rename
|
||||
depends = gtk3
|
||||
depends = libxt
|
||||
depends = mime-types
|
||||
|
|
|
|||
71
PKGBUILD
71
PKGBUILD
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
pkgname=icecat
|
||||
pkgver=78.10.0
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
_commit=b72c22186cf381d7b1f93be550c9da30865d03b4
|
||||
pkgdesc="GNU version of the Firefox browser."
|
||||
arch=(x86_64)
|
||||
|
|
@ -15,7 +15,7 @@ license=('GPL' 'MPL' 'LGPL')
|
|||
depends=(gtk3 libxt mime-types dbus-glib ffmpeg nss ttf-font libpulse)
|
||||
makedepends=(m4 unzip zip diffutils python2-setuptools yasm mesa imake inetutils
|
||||
xorg-server-xvfb autoconf2.13 rust clang llvm jack gtk2
|
||||
python nodejs python2-psutil cbindgen nasm wget mercurial git lld perl-file-rename)
|
||||
python nodejs python2-psutil cbindgen nasm wget mercurial git lld perl-rename)
|
||||
optdepends=('networkmanager: Location detection via available WiFi networks'
|
||||
'libnotify: Notification integration'
|
||||
'pulseaudio: Audio support'
|
||||
|
|
@ -41,7 +41,7 @@ prepare() {
|
|||
#sed -e 's/^verify_sources$//g' -i makeicecat
|
||||
|
||||
mkdir output || rm -rf output/* # Clean output just in case is already an old build there
|
||||
if [ -f "${startdir}/firefox-${pkgver}esr.source.tar.xz" ] && [ -f "${startdir}/firefox-${pkgver}esr.source.tar.xz.asc" ]; then cp -f "${startdir}"/firefox-${pkgver}esr.source.tar.xz{,.asc} output/ ; fi
|
||||
if [ -f "${SRCDEST}/firefox-${pkgver}esr.source.tar.xz" ] && [ -f "${SRCDEST}/firefox-${pkgver}esr.source.tar.xz.asc" ]; then cp -f "${SRCDEST}"/firefox-${pkgver}esr.source.tar.xz{,.asc} output/ ; fi
|
||||
|
||||
# Patches to avoid download sources if you have in your $startdir
|
||||
sed -e '/rm -rf output/d' -i makeicecat
|
||||
|
|
@ -59,6 +59,71 @@ prepare() {
|
|||
rm -rf data/files-to-append/l10n/*
|
||||
fi
|
||||
|
||||
patch -p1 << 'EOF'
|
||||
--- a/makeicecat 2021-04-21 12:56:35.319095244 +0200
|
||||
+++ b/makeicecat 2021-04-21 13:10:03.249639226 +0200
|
||||
@@ -143,16 +143,23 @@
|
||||
do which ${rename_cmd} &> /dev/null && RENAME_CMD=${rename_cmd}
|
||||
done
|
||||
readonly RENAME_CMD
|
||||
- if ! ( [[ "$( ${RENAME_CMD} --version )" =~ 'File::Rename version '([0-9]+)\.([0-9]+) ]] &&
|
||||
+ if ! ( [[ "$( ${RENAME_CMD} --version )" =~ ([0-9]+)\.([0-9]+) ]] &&
|
||||
(( ${BASH_REMATCH[1]} >= MIN_RENAME_VER_MAJ )) &&
|
||||
(( ${BASH_REMATCH[2]} >= MIN_RENAME_VER_MIN )) )
|
||||
then
|
||||
required_ver=${MIN_RENAME_VER_MAJ}.${MIN_RENAME_VER_MIN}
|
||||
echo -e "\nERROR: This script requires the Perl rename program (version >= ${required_ver})
|
||||
e.g.: 'rename' from the Guix 'rename' package
|
||||
- 'perl-rename' from the Parabola 'perl-file-rename' package
|
||||
+ 'perl-rename' from the Archlinux package or 'perl-file-rename' in the Parabola project
|
||||
'prename' from the Trisquel 'rename' package"
|
||||
return 1
|
||||
+ else
|
||||
+ if [[ "$( ${RENAME_CMD} --version )" =~ 'File::Rename' ]]
|
||||
+ then
|
||||
+ RENAME_FLAVOUR=RMBARKER
|
||||
+ else
|
||||
+ RENAME_FLAVOUR=PEDERST
|
||||
+ fi
|
||||
fi
|
||||
|
||||
# verify that Wget is available
|
||||
@@ -428,9 +433,16 @@
|
||||
|
||||
apply_batch_branding()
|
||||
{
|
||||
- find . | tac | grep -i fennec | ${RENAME_CMD} --nofullpath -E 's/fennec/icecatmobile/;' -E 's/Fennec/IceCatMobile/;'
|
||||
- find . | tac | grep -i firefox | ${RENAME_CMD} --nofullpath -E 's/firefox/icecat/;' -E 's/Firefox/IceCat/;'
|
||||
- find services/fxaccounts/rust-bridge | tac | ${RENAME_CMD} --nofullpath -E 's/icecat-accounts/firefox-accounts/;' -E 's/IceCatAccounts/FirefoxAccounts/;'
|
||||
+ if [ "${RENAME_FLAVOUR}" = "PEDERST" ]
|
||||
+ then
|
||||
+ find . | tac | grep -i firefox | ${RENAME_CMD} 's/firefox/icecat/ if -f;'
|
||||
+ find . | tac | grep -i firefox | ${RENAME_CMD} 's/Firefox/IceCat/ if -f;'
|
||||
+ find services/fxaccounts/rust-bridge | tac | ${RENAME_CMD} 's/icecat-accounts/firefox-accounts/ if -f;'
|
||||
+ find services/fxaccounts/rust-bridge | tac | ${RENAME_CMD} 's/IceCatAccounts/FirefoxAccounts/ if -f;'
|
||||
+ else
|
||||
+ find . | tac | grep -i firefox | ${RENAME_CMD} --nofullpath -E 's/firefox/icecat/;' -E 's/Firefox/IceCat/;'
|
||||
+ find services/fxaccounts/rust-bridge | tac | ${RENAME_CMD} --nofullpath -E 's/icecat-accounts/firefox-accounts/;' -E 's/IceCatAccounts/FirefoxAccounts/;'
|
||||
+ fi
|
||||
|
||||
echo "Running batch rebranding"
|
||||
local sed_script="
|
||||
@@ -492,7 +507,12 @@
|
||||
|
||||
sed 's/mozilla-bin/icecat-bin/' -i build/unix/run-mozilla.sh
|
||||
|
||||
- find . | tac | grep run-mozilla | ${RENAME_CMD} --nofullpath -E 's/mozilla/icecat/;'
|
||||
+ if [ "${RENAME_FLAVOUR}" = "PEDERST" ]
|
||||
+ then
|
||||
+ find . | tac | grep run-mozilla | ${RENAME_CMD} 's/mozilla/icecat/ if -f;'
|
||||
+ else
|
||||
+ find . | tac | grep run-mozilla | ${RENAME_CMD} --nofullpath -E 's/mozilla/icecat/;'
|
||||
+ fi
|
||||
|
||||
# do not alter useragent/platform/oscpu/etc with fingerprinting countermeasure, it makes things worse
|
||||
sed '/ShouldResistFingerprinting/,/}/s/^/\/\//' -i ./netwerk/protocol/http/nsHttpHandler.cpp
|
||||
EOF
|
||||
|
||||
# Produce IceCat sources
|
||||
bash makeicecat
|
||||
cd output/icecat-${pkgver}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue