thorium-browser-beta-bin

LOW
maintainer RubenKelevra 0 votes scanned 2026-10-19 13:25:12.486194
View on AUR
Why flagged

Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.

Triggered rules

Low Few votes, recently uploaded zero_votes_recent

Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.

PKGBUILD

1# Maintainer: @RubenKelevra <rubenkelevra@gmail.com>
2# Contributor: xiota <aur@mentalfossa.com>
3# Contributor: JPratama7 <josepratama080@gmail.com>
4# Contributor: Dominik Adrian Grzywak <starterx4 at gmail dot com>
5
6_pkgname='thorium-browser'
7pkgname="${_pkgname}-beta-bin"
8pkgbase="${pkgname}"
9pkgver=156.0.8078.28
10pkgrel=1
11pkgdesc='Beta build of the Chromium fork focused on performance and security'
12url='https://github.com/gz83/thorium'
13license=(
14 'BSD-3-Clause'
15 'LicenseRef-Google-Widevine-CDM'
16)
17arch=(
18 'aarch64'
19 'i686'
20 'x86_64'
21)
22makedepends=('libarchive')
23depends=(
24 'alsa-lib'
25 'at-spi2-core'
26 'cairo'
27 'dbus'
28 'expat'
29 'glib2'
30 'gtk3'
31 'hicolor-icon-theme'
32 'libcups'
33 'libgcc'
34 'libnotify'
35 'libx11'
36 'libxcb'
37 'libxcomposite'
38 'libxdamage'
39 'libxext'
40 'libxfixes'
41 'libxkbcommon'
42 'libxrandr'
43 'mesa'
44 'nspr'
45 'nss'
46 'pango'
47 'systemd-libs'
48 'ttf-liberation'
49 'xdg-utils'
50)
51optdepends=(
52 'gtk4: GTK4 UI support'
53 'kdialog: native dialogs on Plasma'
54 'libsecret: password storage client integration'
55 'org.freedesktop.secrets: Secret Service backend for password storage'
56 'pipewire: WebRTC desktop sharing under Wayland'
57 'qt5-base: Qt5 UI support'
58 'qt6-base: Qt6 UI support'
59 'upower: Battery Status API support'
60)
61provides=(
62 "${_pkgname}=${pkgver}"
63 "${_pkgname}-beta=${pkgver}"
64)
65conflicts=(
66 "${_pkgname}"
67 "${_pkgname}-bin"
68 "${_pkgname}-sse3-bin"
69 "${_pkgname}-sse4-bin"
70 "${_pkgname}-avx-bin"
71 "${_pkgname}-avx2-bin"
72 'thorium-browser-beta-sse4-bin'
73 'thorium-browser-beta-avx-bin'
74 'thorium-browser-beta-avx2-bin'
75 'thorium-browser-beta-avx512-bin'
76)
77options=(
78 '!emptydirs'
79 '!strip'
80 '!debug'
81)
82
83_dl_url="${url}/releases/download/M${pkgver}"
84_dl_filename_aarch64="${_pkgname}_${pkgver}_arm64.deb"
85_dl_filename_i686="${_pkgname}_${pkgver}_i386.deb"
86_dl_filename_x86_64="${_pkgname}_${pkgver}_SSE3.deb"
87_license_filename="${_pkgname}-${pkgver}-LICENSE.md"
88_data_archive='data.tar.xz'
89noextract=(
90 "${_dl_filename_aarch64}"
91 "${_dl_filename_i686}"
92 "${_dl_filename_x86_64}"
93)
94
95source=(
96 "${_pkgname}.sh"
97 'thorium-cpu-check.sh'
98 'thorium-shell.sh'
99 "${_license_filename}::${url}/raw/M${pkgver}/LICENSE.md"
100)
101source_aarch64=("${_dl_url}/${_dl_filename_aarch64}")
102source_i686=("${_dl_url}/${_dl_filename_i686}")
103source_x86_64=("${_dl_url}/${_dl_filename_x86_64}")
104b2sums=(
105 '038ce007f34bc9c519bcc1918ca472cf6596a1dade80b9b150021762a51cf28bc331bb82299110023593f569b9cf285c9ed60d695cfd2abf82d0bf9073ceeee5'
106 '49417ddc79a842674a08f0e6ec6975a14cec3b2ae7536b0ddeaa68189045f42851f9f1fab8110889b4488db3c2bd58c9b071b8b95be3db8b99eb92abc2c89465'
107 '867bc169f526a530a79d1eef5cc463d1c386d380bb574228a46492c9c85fc5dcdaa8768e08282dbe5ed660458613b67da8e3f822a3c9d93866e2252f3332b672'
108 'fe17f16ad6a8911dc9c49de3e45fa450a2a3ef59ec2f5400daed74b4401cfe2426e5b52e8e2e519bbc9f2b110112e616578eaf57705605a75cc5e8fa9d820060'
109)
110sha256sums_aarch64=('1fa1a1d73b6a3da2b81b6afce5273733910600d36c0fc04c7600306733dfe863')
111sha256sums_i686=('b7c0fbd59b64a50353d1fc037ca98f9f66066c2a69e61bdeba939df2fca8004d')
112sha256sums_x86_64=('f712a8e5475c4baeec1f84ac2a8efd3f03f4fe2c5bed75e4454761ad54cdb77e')
113
114prepare() {
115 CARCH="${CARCH}" bash "${srcdir}/thorium-cpu-check.sh" build
116}
117
118package() {
119 local dl_filename
120 case ${CARCH} in
121 aarch64)
122 dl_filename=${_dl_filename_aarch64}
123 ;;
124 i686)
125 dl_filename=${_dl_filename_i686}
126 ;;
127 x86_64)
128 dl_filename=${_dl_filename_x86_64}
129 ;;
130 *)
131 printf 'Unsupported architecture: %s\n' "${CARCH}" >&2
132 return 1
133 ;;
134 esac
135
136 printf ' -> Extracting the archive...\n'
137 rm -f -- "${srcdir}/${_data_archive}"
138 bsdtar -C "${srcdir}" -xf "${srcdir}/${dl_filename}" "${_data_archive}"
139 bsdtar -C "${pkgdir}/" -xJf "${srcdir}/${_data_archive}"
140 rm -f -- "${srcdir}/${_data_archive}"
141
142 printf ' -> Moving files in place...\n'
143 mv -- "${pkgdir}/opt/chromium.org/thorium" "${pkgdir}/opt/${_pkgname}"
144 unlink -- "${pkgdir}/usr/bin/thorium-browser"
145 unlink -- "${pkgdir}/usr/bin/pak"
146
147 # Upstream labels its beta packages as stable in the version dialog.
148 # Correct the channel without changing the CPU variant annotation.
149 local upstream_launcher="${pkgdir}/opt/${_pkgname}/${_pkgname}"
150 sed -E \
151 -e 's@^([[:space:]]*export CHROME_VERSION_EXTRA=")stable@\1beta@' \
152 -i -- "${upstream_launcher}"
153 if ! grep -Eq '^[[:space:]]*export CHROME_VERSION_EXTRA="beta' "${upstream_launcher}" ||
154 grep -Eq '^[[:space:]]*export CHROME_VERSION_EXTRA="stable' "${upstream_launcher}"; then
155 printf 'Unexpected upstream release channel marker: %s\n' "${upstream_launcher}" >&2
156 return 1
157 fi
158
159 # thorium-browser
160 install -Dm755 -- "${srcdir}/${_pkgname}.sh" "${pkgdir}/usr/bin/${_pkgname}"
161 install -Dm755 -- "${srcdir}/thorium-cpu-check.sh" \
162 "${pkgdir}/usr/lib/${_pkgname}/check-cpu-support"
163 chmod 4755 -- "${pkgdir}/opt/${_pkgname}/chrome-sandbox"
164
165 local widevine_dir="${pkgdir}/opt/${_pkgname}/WidevineCdm"
166 if [[ ${CARCH} == i686 || ${CARCH} == aarch64 ]]; then
167 # No supported Widevine CDM is bundled for Linux i686 or arm64.
168 # Keep both architectures Widevine-free, even if upstream adds one.
169 local license_index
170 for license_index in "${!license[@]}"; do
171 if [[ ${license[license_index]} == 'LicenseRef-Google-Widevine-CDM' ]]; then
172 unset 'license[license_index]'
173 fi
174 done
175 rm -rf -- "${widevine_dir}"
176
177 local clearkey_platform='linux_x86'
178 if [[ ${CARCH} == aarch64 ]]; then
179 clearkey_platform='linux_arm64'
180 fi
181
182 local clearkey_native="${pkgdir}/opt/${_pkgname}/ClearKeyCdm/_platform_specific/${clearkey_platform}/libclearkeycdm.so"
183 if [[ ! -f ${clearkey_native} ]]; then
184 printf 'Missing %s ClearKey CDM: %s\n' "${CARCH}" "${clearkey_native}" >&2
185 return 1
186 fi
187 install -Dm644 -- "${clearkey_native}" "${pkgdir}/opt/${_pkgname}/lib/libclearkeycdm.so"
188 rm -rf -- "${pkgdir}/opt/${_pkgname}/ClearKeyCdm/_platform_specific/linux_x64"
189 else
190 if [[ ! -f ${widevine_dir}/_platform_specific/linux_x64/libwidevinecdm.so || ! -f ${widevine_dir}/LICENSE ]]; then
191 printf 'Missing bundled x86_64 Widevine CDM or license\n' >&2
192 return 1
193 fi
194 install -Dm644 -- "${widevine_dir}/LICENSE" \
195 "${pkgdir}/usr/share/licenses/${pkgname}/Widevine-LICENSE"
196 fi
197 # Fix upstream paths after moving Thorium out of /opt/chromium.org.
198 if [[ -f ${pkgdir}/opt/${_pkgname}/default-app-block ]]; then
199 sed -E \
200 -e "s@/opt/chromium.org/thorium/@/opt/${_pkgname}/@g" \
201 -i -- "${pkgdir}/opt/${_pkgname}/default-app-block"
202 fi
203 # Bring upstream AppStream metadata up to the current schema and path.
204 local metainfo_source="${pkgdir}/usr/share/appdata/thorium-browser.appdata.xml"
205 local metainfo_file="${pkgdir}/usr/share/metainfo/org.chromium.Thorium.metainfo.xml"
206 if [[ ! -f ${metainfo_source} ]]; then
207 printf 'Missing Thorium AppStream metadata: %s\n' "${metainfo_source}" >&2
208 return 1
209 fi
210 install -Dm644 -- "${metainfo_source}" "${metainfo_file}"
211 rm -f -- "${metainfo_source}"
212 rmdir --ignore-fail-on-non-empty -- "${pkgdir}/usr/share/appdata"
213 sed -E \
214 -e 's@<id>thorium-browser[.]desktop</id>@<id>org.chromium.Thorium</id>@' \
215 -e '/<translation\/>/d' \
216 -e 's@<developer_name>([^<]+)</developer_name>@<developer id="io.github.alex313031"><name>\1</name></developer>@' \
217 -i -- "${metainfo_file}"
218 if ! grep -q '<launchable type="desktop-id">' "${metainfo_file}"; then
219 sed -i '/<url type="bugtracker">/i\ <launchable type="desktop-id">thorium-browser.desktop</launchable>' \
220 "${metainfo_file}"
221 fi
222 if ! grep -q '<content_rating type="oars-1.1"' "${metainfo_file}"; then
223 sed -i '/<url type="bugtracker">/i\ <content_rating type="oars-1.1"/>' \
224 "${metainfo_file}"
225 fi
226
227 # thorium-shell
228 install -Dm755 -- "${srcdir}/thorium-shell.sh" "${pkgdir}/usr/bin/thorium-shell"
229 sed -E \
230 -e 's@^Icon=.*@Icon=thorium-shell@' \
231 -i -- "${pkgdir}/usr/share/applications/thorium-shell.desktop"
232
233 # thorium-browser.xml
234 sed -E \
235 -e "s@/opt/chromium.org/thorium/@/opt/${_pkgname}/@" \
236 -i -- "${pkgdir}/usr/share/gnome-control-center/default-apps/thorium-browser.xml"
237
238 # Icons
239 install -Dm644 -- "${pkgdir}/opt/${_pkgname}/product_logo_256.png" \
240 "${pkgdir}/usr/share/icons/hicolor/256x256/apps/${_pkgname}.png"
241 install -Dm644 -- "${pkgdir}/opt/${_pkgname}/thorium_shell.png" \
242 "${pkgdir}/usr/share/icons/hicolor/256x256/apps/thorium-shell.png"
243
244 # Clean up upstream Debian packaging files.
245 rm -rf -- \
246 "${pkgdir}/opt/chromium.org" \
247 "${pkgdir}/etc/cron.daily/" \
248 "${pkgdir}/usr/share/doc/" \
249 "${pkgdir}/opt/${_pkgname}/cron/" \
250 "${pkgdir}/opt/${_pkgname}"/product_logo_*.{png,xpm} \
251 "${pkgdir}/usr/share/menu/"
252
253 install -Dm644 -- "${srcdir}/${_license_filename}" \
254 "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.md"
255}
256

Scan history

Scanned at (UTC)SeverityRules
2026-10-19 13:25:12 Low 1

Report a package

Reports go to the AURWatch maintainer (one person) and are read by hand. No login required.

0 / 4000
Your suggestion