Skip to content
Permalink
5342fde6b2
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
executable file 94 lines (71 sloc) 2.5 KB
#!/bin/bash
#
# https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=brave
# git clone https://aur.archlinux.org/brave-bin.git
PKG=brave-browser
VERSION=1.43.89
BUILD=0
# cd /home/wwwutz/git/pkg-scripts/
# tools/build.sh --bind /dev/shm brave-browser-1.43.89-0.build.sh
# cmirror /dev/shm/pkg_bindmnt /package/pkg/brave-browser-1.43.89-0 --band --delete --exclude ./build
PREFIX=/pkg/$PKG-$VERSION-$BUILD
set -xev
umask 022
BUILD_TMPDIR=/dev/shm/$PKG-$VERSION-$BUILD.$USER.build.tmp
test -d $BUILD_TMPDIR && ( chmod -R u+rwx $BUILD_TMPDIR || true ; rm -rf $BUILD_TMPDIR )
mkdir -p $BUILD_TMPDIR/home
export TMPDIR=$BUILD_TMPDIR
export HOME=$BUILD_TMPDIR/home
mkdir -p $PREFIX
cat >$PREFIX/profile <<EOF
# test. kein /usr/local/package/bin
PATH=$PREFIX/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
if [ -d $PREFIX/.compatlibs ]; then export LD_LIBRARY_PATH=$PREFIX/.compatlibs\${LD_LIBRARY_PATH:+:}\$LD_LIBRARY_PATH ; fi
EOF
. $PREFIX/profile
cat >>${HOME}/.wgetrc <<'_EOW_'
http_proxy = beehive:3128
https_proxy = beehive:3128
ftp_proxy = beehive:3128
check-certificate = quiet
_EOW_
#
# rm ${HOME}/.wgetrc
#
BUILDDIR=$PREFIX/build
set -ex
mkdir -p $BUILDDIR
cd $BUILDDIR
# SRCURL[0]="https://github.com/brave/brave-browser/releases/download/v1.43.89/brave-browser-1.43.89-linux-amd64.zip"
SRCURL[0]="https://beehive.molgen.mpg.de/a8ad355ca8bd5783dfb46a8e8920add7/brave-browser-1.43.89-linux-amd64.zip"
SRCURL[0]="/src/mariux/md5repo/a8ad355ca8bd5783dfb46a8e8920add7/brave-browser-1.43.89-linux-amd64.zip"
if [ ! -d brave ]; then
mkdir brave
bsdtar -xf ${SRCURL[0]} -C brave
chmod 755 brave/brave
fi
pwd
install -dm0755 "${PREFIX}/bin"
install -dm0755 "${PREFIX}/lib"
cp -a brave ${PREFIX}/lib
# https://support.brave.com/hc/en-us/articles/360044860011-How-Do-I-Use-Command-Line-Flags-in-Brave-
cat >${PREFIX}/bin/brave <<__EOS__
#!/bin/bash
XDG_CONFIG_HOME="\${XDG_CONFIG_HOME:-\$HOME/.config}"
# Allow users to override command-line options
USER_FLAGS_FILE="\$XDG_CONFIG_HOME/brave-flags.conf"
if [[ -f \$USER_FLAGS_FILE ]]; then
USER_FLAGS="\$(cat \$USER_FLAGS_FILE | sed 's/#.*//')"
fi
export CHROME_VERSION_EXTRA="stable"
exec ${PREFIX}/lib/brave/brave \
--enable-logging \
--v=0 \
--disable-brave-update --disable-chrome-google-url-tracking-client \
\$@
__EOS__
chmod 755 ${PREFIX}/bin/brave
for size in 16x16 24x24 32x32 48x48 64x64 128x128 256x256; do
install -Dm0644 "brave/product_logo_${size/x*/}.png" \
"${PREFIX}/share/icons/hicolor/$size/apps/brave-desktop.png"
done