Skip to content

Commit 76237d5

Browse files
committed
add helium-browser-bin
1 parent fdb7ae1 commit 76237d5

File tree

3 files changed

+150
-0
lines changed

3 files changed

+150
-0
lines changed

packagelist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,8 @@ hamclock-huge
250250
harmonoid-deb
251251
hayase-deb
252252
headset-deb
253+
helium-browser-bin
254+
helium-browser-bin.pacscript
253255
helix
254256
hello
255257
hello-rhino-bin

packages/.SRCINFO

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
pkgbase = helium-browser-bin
2+
gives = helium-browser
3+
pkgver = 0.7.7.1
4+
pkgrel = 1
5+
pkgdesc = Private, fast, and honest web browser based on Chromium
6+
url = https://github.com/imputnet/helium-linux
7+
arch = amd64
8+
arch = arm64
9+
depends = libgtk-3-0t64
10+
depends = libnss3
11+
depends = libasound2t64
12+
depends = xdg-utils
13+
depends = libxss1
14+
depends = libcups2
15+
depends = libgcrypt20
16+
depends = fonts-liberation
17+
depends = systemd
18+
depends = dbus
19+
depends = libpulse0
20+
depends = pciutils
21+
depends = libva2
22+
depends = libffi8
23+
depends = desktop-file-utils
24+
depends = hicolor-icon-theme
25+
depends = ca-certificates
26+
optdepends = pipewire: WebRTC desktop sharing under Wayland
27+
optdepends = kdialog: support for native dialogs in Plasma
28+
optdepends = libgtk-4-1: for --gtk-version=4 (GTK4 IME might work better on Wayland)
29+
optdepends = gnome-keyring: password storage backend on GNOME / Xfce
30+
optdepends = kwallet6: support for storing passwords in KWallet on Plasma
31+
optdepends = upower: Battery Status API support
32+
license = GPL-3.0-only
33+
license = BSD-3-Clause
34+
source_amd64 = helium-0.7.7.1-x86_64_linux.tar.xz::https://github.com/imputnet/helium-linux/releases/download/0.7.7.1/helium-0.7.7.1-x86_64_linux.tar.xz
35+
source_amd64 = LICENSE.ungoogled_chromium::https://raw.githubusercontent.com/imputnet/helium-linux/0.7.7.1/LICENSE.ungoogled_chromium
36+
sha256sums_amd64 = 698f46c080cf4dcb249b9e4d96e4b2c640870ba76b77a05d05a358661af39511
37+
sha256sums_amd64 = 9539b394e4179952698894bd62ef6566b6804ab0ff360dcf3a511cfaf7f78c4d
38+
source_arm64 = helium-0.7.7.1-arm64_linux.tar.xz::https://github.com/imputnet/helium-linux/releases/download/0.7.7.1/helium-0.7.7.1-arm64_linux.tar.xz
39+
source_arm64 = LICENSE.ungoogled_chromium::https://raw.githubusercontent.com/imputnet/helium-linux/0.7.7.1/LICENSE.ungoogled_chromium
40+
sha256sums_arm64 = efa849d7dfdb1f3744d7ffe478617d8a66243073b2e951e9039e9bc44920c200
41+
sha256sums_arm64 = 9539b394e4179952698894bd62ef6566b6804ab0ff360dcf3a511cfaf7f78c4d
42+
43+
pkgname = helium-browser-bin
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
_pkgname="helium"
2+
pkgname="${_pkgname}-browser-bin"
3+
gives="helium-browser"
4+
pkgver=0.7.7.1
5+
pkgrel=1
6+
pkgdesc="Private, fast, and honest web browser based on Chromium"
7+
arch=('amd64' 'arm64')
8+
url="https://github.com/imputnet/helium-linux"
9+
license=('GPL-3.0-only' 'BSD-3-Clause')
10+
depends=('libgtk-3-0t64' 'libnss3' 'libasound2t64' 'xdg-utils' 'libxss1' 'libcups2' 'libgcrypt20'
11+
'fonts-liberation' 'systemd' 'dbus' 'libpulse0' 'pciutils' 'libva2'
12+
'libffi8' 'desktop-file-utils' 'hicolor-icon-theme' 'ca-certificates')
13+
optdepends=('pipewire: WebRTC desktop sharing under Wayland'
14+
'kdialog: support for native dialogs in Plasma'
15+
'libgtk-4-1: for --gtk-version=4 (GTK4 IME might work better on Wayland)'
16+
'gnome-keyring: password storage backend on GNOME / Xfce'
17+
'kwallet6: support for storing passwords in KWallet on Plasma'
18+
'upower: Battery Status API support')
19+
20+
source_amd64=(
21+
"${_pkgname}-${pkgver}-x86_64_linux.tar.xz::https://github.com/imputnet/helium-linux/releases/download/${pkgver}/${_pkgname}-${pkgver}-x86_64_linux.tar.xz"
22+
"LICENSE.ungoogled_chromium::https://raw.githubusercontent.com/imputnet/helium-linux/${pkgver}/LICENSE.ungoogled_chromium"
23+
)
24+
25+
source_arm64=(
26+
"${_pkgname}-${pkgver}-arm64_linux.tar.xz::https://github.com/imputnet/helium-linux/releases/download/${pkgver}/${_pkgname}-${pkgver}-arm64_linux.tar.xz"
27+
"LICENSE.ungoogled_chromium::https://raw.githubusercontent.com/imputnet/helium-linux/${pkgver}/LICENSE.ungoogled_chromium"
28+
)
29+
30+
sha256sums_amd64=('698f46c080cf4dcb249b9e4d96e4b2c640870ba76b77a05d05a358661af39511'
31+
'9539b394e4179952698894bd62ef6566b6804ab0ff360dcf3a511cfaf7f78c4d')
32+
33+
sha256sums_arm64=('efa849d7dfdb1f3744d7ffe478617d8a66243073b2e951e9039e9bc44920c200'
34+
'9539b394e4179952698894bd62ef6566b6804ab0ff360dcf3a511cfaf7f78c4d')
35+
36+
prepare() {
37+
_archdir="${_pkgname}-${pkgver}-$([[ ${CARCH} == "arm64" ]] && echo "arm64" || echo "x86_64")_linux"
38+
sed -i \
39+
-e 's/Exec=chromium/Exec=helium-browser/' \
40+
-e 's/Name=Helium$/Name=Helium Browser/' \
41+
-e 's/Icon=helium/Icon=helium-browser/' \
42+
"${srcdir}/${_archdir}/helium.desktop"
43+
}
44+
45+
package() {
46+
_archdir="${_pkgname}-${pkgver}-$([[ ${CARCH} == "arm64" ]] && echo "arm64" || echo "x86_64")_linux"
47+
install -dm755 "${pkgdir}/usr/lib/${gives}"
48+
cp -a "${srcdir}/${_archdir}/"* "${pkgdir}/usr/lib/${gives}/"
49+
install -Dm644 "${srcdir}/${_archdir}/helium.desktop" \
50+
"${pkgdir}/usr/share/applications/helium-browser.desktop"
51+
install -Dm644 "${pkgdir}/usr/lib/${gives}/product_logo_256.png" \
52+
"${pkgdir}/usr/share/pixmaps/helium-browser.png"
53+
install -Dm644 "${pkgdir}/usr/lib/${gives}/product_logo_256.png" \
54+
"${pkgdir}/usr/share/icons/hicolor/256x256/apps/helium-browser.png"
55+
install -Dm644 "${srcdir}/LICENSE.ungoogled_chromium" \
56+
"${pkgdir}/usr/share/doc/${pkgname}/LICENSE.ungoogled_chromium"
57+
install -dm755 "${pkgdir}/usr/bin"
58+
cat > "${pkgdir}/usr/bin/helium-browser" << 'EOF'
59+
#!/bin/bash
60+
set -euo pipefail
61+
62+
XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-"$HOME/.config"}"
63+
64+
SYS_CONF="/etc/helium-browser-flags.conf"
65+
USR_CONF="${XDG_CONFIG_HOME}/helium-browser-flags.conf"
66+
67+
FLAGS=()
68+
69+
append_flags_file() {
70+
local file="$1"
71+
[[ -r "$file" ]] || return 0
72+
local line safe_line
73+
while IFS= read -r line; do
74+
[[ "$line" =~ ^[[:space:]]*(#|$) ]] && continue
75+
case "$line" in
76+
*'$('*|*'`'*)
77+
echo "Warning: ignoring unsafe line in $file: $line" >&2
78+
continue
79+
;;
80+
esac
81+
set -f
82+
safe_line=${line//$/\\$}
83+
safe_line=${safe_line//~/\\~}
84+
eval "set -- $safe_line"
85+
set +f
86+
for token in "$@"; do
87+
FLAGS+=("$token")
88+
done
89+
done < "$file"
90+
}
91+
92+
append_flags_file "$SYS_CONF"
93+
append_flags_file "$USR_CONF"
94+
95+
if [[ -n "${HELIUM_USER_FLAGS:-}" ]]; then
96+
read -r -a ENV_FLAGS <<< "$HELIUM_USER_FLAGS"
97+
FLAGS+=("${ENV_FLAGS[@]}")
98+
fi
99+
100+
export CHROME_VERSION_EXTRA="stable"
101+
102+
exec /usr/lib/helium-browser/chrome "${FLAGS[@]}" "$@"
103+
EOF
104+
chmod 755 "${pkgdir}/usr/bin/helium-browser"
105+
}

0 commit comments

Comments
 (0)