summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c1f1ac060342e694a8bd1b9797413db91b4c183f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Maintainer: s1mpleog
#
# Build Details:
# Chromium 147.0.7685.0 (Official Build) unstable (Linux 64-bit)
# Features: No Sync | WebRTC Enabled | Widevine Enabled
# Revision: 190a3548629c822fa8226a8a9bccb11ddbf7383d-refs/heads/main@{#1584191}
# Compiler: clang (+lld_linker +thinlto +pgo +avx2 +fma +compiler_optimizations +linker_optimizations)

pkgname=chromium-clang-avx2-bin
_upstream_name=chromium-browser-unstable
pkgver=147.0.7685.0
_commit=r1584191
pkgrel=1
pkgdesc="Chromium unstable compiled w/ Clang, PGO, ThinLTO, AVX2 (No Sync, WebRTC, Widevine)"
arch=('x86_64')
url="https://github.com/RobRich999/Chromium_Clang"
license=('BSD')

depends=('alsa-lib' 'at-spi2-core' 'cairo' 'expat' 'glib2' 'gtk3' 'libdrm'
  'libx11' 'libxcb' 'libxcomposite' 'libxdamage' 'libxext' 'libxfixes'
  'libxkbcommon' 'libxrandr' 'mesa' 'nspr' 'nss' 'pango')

provides=("chromium" "$_upstream_name")
conflicts=("chromium" "$_upstream_name")

source=("https://github.com/RobRich999/Chromium_Clang/releases/download/v${pkgver}-${_commit}-linux64-rpm-avx2/${_upstream_name}-${pkgver}-1.${CARCH}.rpm")
sha256sums=('95e05115de12ecc0a0bebb717859fe81ec0c81e087e6d447b37e96651f7b8a96')

package() {
  cd "$srcdir"

  # The RPM automatically extracts into standard Linux directories (like /opt and /usr)
  # This loop checks for standard root directories and copies them directly into the packaging directory
  for dir in opt usr etc; do
    if [ -d "$dir" ]; then
      install -d "$pkgdir/$dir"
      cp -a "$dir/"* "$pkgdir/$dir/"
    fi
  done

  _desktop_file="$pkgdir/usr/share/applications/${_upstream_name}.desktop"

  if [[ -f "$_desktop_file" ]]; then
    sed -i 's/^Name=.*/Name=Chromium Clang AVX2/' "$_desktop_file"
    sed -i 's/^Icon=.*/Icon=chromium/' "$_desktop_file"
    mv "$_desktop_file" "$pkgdir/usr/share/applications/${pkgname}.desktop"
  fi

  chmod -R u=rwX,go=rX "$pkgdir/"
}