summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a8a1e930b30d8cbc81a56073e3c2ef4a9c062d27 (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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Maintainer: artist for Artix Linux and XLibre

pkgname=brow6el-git
_pkgname="${pkgname%-*}"
pkgver=0.2.0.r3.g2ecdac8
pkgrel=1
pkgdesc="Terminal Web Browser with Sixel Support"
arch=('x86_64')
url="https://codeberg.org/janantos/${_pkgname}"
license=('MIT')
depends=(libsixel cairo glibc nss dbus alsa-lib pango)
makedepends=(git libxkbcommon base-devel cmake pkg-config curl 
             libx11 libxcomposite libxdamage libxfixes libxrandr 
             mesa pango atk cups alsa-lib nss nspr glib2)
source=("git+${url}.git")

pkgver() {
  cd $_pkgname
  git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
  cd $_pkgname
  ./download_cef.sh 
}

build() {
  cd $_pkgname
  ./build.sh
}

package() {
  local libfiles=(
                 brow6el
                 chrome_100_percent.pak
                 chrome_200_percent.pak
                 icudtl.dat
                 libEGL.so
                 libGLESv2.so
                 libcef.so
                 libvk_swiftshader.so
                 libvulkan.so.1
                 mouse_emu.js
                 resources.pak
                 run_brow6el.sh
                 select_detector.js
                 vk_swiftshader_icd.json
                 v8_context_snapshot.bin
                 )

  cd "${_pkgname}/build"
  sed -i 's|dirname "${BASH_SOURCE\[0\]}"|dirname $(readlink -f "${BASH_SOURCE[0]}" )|' run_brow6el.sh
  install -Dm755 -t "${pkgdir}/usr/lib/${_pkgname}/" "${libfiles[@]}"
  install -Dm755 -t "${pkgdir}/usr/lib/${_pkgname}/scripts" scripts/*.js
  install -Dm644 -t "${pkgdir}/usr/lib/${_pkgname}/locales" locales/*.pak

  install -dm755 "${pkgdir}/usr/bin"
  ln -sf "/usr/lib/$_pkgname/run_${_pkgname}.sh" "$pkgdir/usr/bin/${_pkgname}"

  cd ..
  cp -r examples "${pkgdir}/usr/lib/${_pkgname}/"
  install -Dm644 -t "$pkgdir/usr/share/${_pkgname}" *.md
}
sha256sums=('SKIP')