mirror of
https://github.com/archlinux/aur.git
synced 2026-03-14 23:16:48 +01:00
remove processor checks
This commit is contained in:
parent
becc342ff9
commit
98e34ff676
3 changed files with 24 additions and 70 deletions
7
.SRCINFO
7
.SRCINFO
|
|
@ -1,11 +1,12 @@
|
|||
pkgbase = thorium-browser-bin
|
||||
pkgdesc = Chromium fork focused on high performance and security
|
||||
pkgver = 138.0.7204.303
|
||||
pkgrel = 1
|
||||
pkgrel = 2
|
||||
url = https://github.com/Alex313031/thorium
|
||||
install = thorium-browser.install
|
||||
arch = x86_64
|
||||
license = BSD-3-Clause
|
||||
provides = thorium-browser
|
||||
conflicts = thorium-browser
|
||||
noextract = thorium-browser_138.0.7204.303_SSE3.deb
|
||||
options = !emptydirs
|
||||
options = !strip
|
||||
|
|
@ -27,5 +28,3 @@ pkgname = thorium-browser-bin
|
|||
depends = nspr
|
||||
depends = nss
|
||||
depends = pango
|
||||
provides = thorium-browser
|
||||
conflicts = thorium-browser
|
||||
|
|
|
|||
55
PKGBUILD
55
PKGBUILD
|
|
@ -6,15 +6,16 @@ _pkgname="thorium-browser"
|
|||
pkgname="$_pkgname-bin"
|
||||
pkgbase="$pkgname"
|
||||
pkgver=138.0.7204.303
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
pkgdesc="Chromium fork focused on high performance and security"
|
||||
url="https://github.com/Alex313031/thorium"
|
||||
license=('BSD-3-Clause')
|
||||
arch=('x86_64')
|
||||
|
||||
options=('!emptydirs' '!strip' '!debug')
|
||||
provides=("$_pkgname")
|
||||
conflicts=("$_pkgname")
|
||||
|
||||
install="$_pkgname.install"
|
||||
options=('!emptydirs' '!strip' '!debug')
|
||||
|
||||
_dl_url="$url/releases/download/M${pkgver}"
|
||||
_dl_filename="${_pkgname}_${pkgver}_SSE3.deb"
|
||||
|
|
@ -27,40 +28,28 @@ prepare() {
|
|||
install -Dm644 /dev/stdin "$_pkgname.sh" << END
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# check microprocessor architecture level
|
||||
if grep -qsE '\bpni\b' /proc/cpuinfo ; then
|
||||
_message=''
|
||||
_message+=\$'The fastest browser on Earth.'
|
||||
else
|
||||
_message=''
|
||||
_message+=\$'Your processor does not support SSE3 instructions.\n'
|
||||
_message+=\$'thorium-browser may not work on your computer.'
|
||||
set -euo pipefail
|
||||
|
||||
name=thorium
|
||||
flags_file="\${XDG_CONFIG_HOME:-\$HOME/.config}/\${name}-flags.conf"
|
||||
|
||||
lines=()
|
||||
if [[ -f "\${flags_file}" ]]; then
|
||||
mapfile -t lines < "\${flags_file}"
|
||||
fi
|
||||
|
||||
# Allow users to override command-line options
|
||||
XDG_CONFIG_HOME=\${XDG_CONFIG_HOME:-~/.config}
|
||||
_FLAGS_FILE="\$XDG_CONFIG_HOME/thorium-flags.conf"
|
||||
flags=()
|
||||
for line in "\${lines[@]}"; do
|
||||
if [[ ! "\${line}" =~ ^[[:space:]]*#.* ]] && [[ -n "\${line}" ]]; then
|
||||
flags+=("\${line}")
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ -f "\$_FLAGS_FILE" ]]; then
|
||||
_USER_FLAGS="\$(cat "\$_FLAGS_FILE")"
|
||||
fi
|
||||
|
||||
# display processor support message
|
||||
if tty -s ; then
|
||||
echo "\$_message"
|
||||
else
|
||||
[ ! -e "\$XDG_CONFIG_HOME/thorium" ] && notify-send -a "thorium-browser" -t 7500 "\$_message"
|
||||
fi
|
||||
|
||||
# Launch
|
||||
exec /opt/thorium-browser/thorium-browser \$_USER_FLAGS "\$@"
|
||||
exec /opt/thorium-browser/thorium-browser "\${flags[@]}" "\$@"
|
||||
END
|
||||
}
|
||||
|
||||
package() {
|
||||
provides=("$_pkgname")
|
||||
conflicts=("$_pkgname")
|
||||
|
||||
depends+=(
|
||||
'alsa-lib'
|
||||
'at-spi2-core'
|
||||
|
|
@ -78,9 +67,8 @@ package() {
|
|||
)
|
||||
|
||||
echo " -> Extracting the archive..."
|
||||
bsdtar -xf "$_dl_filename" data.tar.xz
|
||||
bsdtar -xf data.tar.xz -C "$pkgdir/"
|
||||
rm data.tar.xz
|
||||
bsdtar -xf "$_dl_filename" data.tar.*
|
||||
bsdtar -C "$pkgdir/" -xf data.tar.*
|
||||
|
||||
echo " -> Moving files in place..."
|
||||
mv "$pkgdir/opt/chromium.org/thorium" "$pkgdir/opt/$_pkgname"
|
||||
|
|
@ -108,7 +96,6 @@ package() {
|
|||
"$pkgdir/usr/share/icons/hicolor/256x256/apps/thorium-shell.png"
|
||||
|
||||
# clean-up
|
||||
echo " -> Removing Debian Cron job, duplicate product logos and menu directory..."
|
||||
rm -r -- \
|
||||
"$pkgdir/opt/chromium.org" \
|
||||
"$pkgdir/etc/cron.daily/" \
|
||||
|
|
|
|||
|
|
@ -1,32 +0,0 @@
|
|||
note1() {
|
||||
printf "${BOLD}${BLUE}==>${YELLOW} NOTE:${ALL_OFF}${WHITE} $1${ALL_OFF}\n"
|
||||
}
|
||||
|
||||
note2() {
|
||||
printf "${BOLD}${BLUE}==> ${ALL_OFF}${WHITE} $1${ALL_OFF}\n"
|
||||
}
|
||||
|
||||
ALL_OFF="$(tput sgr0)"
|
||||
BOLD="${ALL_OFF}$(tput bold)"
|
||||
BLACK="$(tput setaf 0)"
|
||||
RED="$(tput setaf 1)"
|
||||
GREEN="$(tput setaf 2)"
|
||||
YELLOW="$(tput setaf 3)"
|
||||
BLUE="$(tput setaf 4)"
|
||||
MAGENTA="$(tput setaf 5)"
|
||||
CYAN="$(tput setaf 6)"
|
||||
WHITE="$(tput setaf 7)"
|
||||
|
||||
post_install() {
|
||||
if grep -qsE '\bpni\b' /proc/cpuinfo ; then
|
||||
note1 "Custom flags should be put directly in: ~/.config/thorium-flags.conf"
|
||||
note2 "The launcher is called: 'thorium-browser'"
|
||||
else
|
||||
note1 "Your processor does not support SSE3 instructions."
|
||||
note2 "thorium-browser may not work on your computer."
|
||||
fi
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
post_install
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue