summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1c6c84d5e0a173825d925bdadfe702d0308fa7e6 (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
# Maintainer: Claudia Pellegrino <aur ät cpellegrino.de>
# Contributor: Christopher A. Williamson
# Contributor: Moritz Poldrack <moritz at poldrack dot dev>
# Contributor: Pascal Mathis <mail@pascalmathis.com>
# Contributor: Trustin Lee <t@motd.kr>

pkgname=rambox-pro-bin
_pkgname=rambox
pkgver=2.4.1
pkgrel=1
pkgdesc='Workspace browser to manage many web applications in one place'
arch=('x86_64')
url='https://rambox.app/'
license=('custom')
depends=('alsa-lib' 'gtk3' 'libxss' 'libxtst' 'nss' 'python')
provides=('rambox' 'ramboxpro')
options=('!emptydirs')
conflicts=('rambox' 'rambox-bin' 'rambox-pro-bin-beta')

# To extract the EULA as a file:
# 1. Go to https://rambox.app/eula in a Javascript-enabled browser.
# 2. Check the timestamp: Last updated Jan 19, 2023
# 3. Save the page to an HTML file.
# 4. Run the shell command line:
#    html2text --body-width=80 file.html | awk '/^# .*EULA/,/^## If/ { print }' | head -n -1
# 5. Update the timestamp in step #2.
source=("${_pkgname}-EULA"
  "${_pkgname}-${pkgver}.deb::https://github.com/ramboxapp/download/releases/download/v${pkgver}/Rambox-${pkgver}-linux-x64.deb")

sha256sums=(
  # eula sum
  '0c94e0c1690afe9414a7ead793bb63417da16b143209d3fed8999370a237d137'
  # deb file sum
  '554316ce93c134dc072092d3c76127a89c5e7fa09b3dc7a69d1e4eae24934ad4'
)

build() {
  rm -rf "${srcdir}/root"
  mkdir -p "${srcdir}/root"
  bsdtar -xf 'data.tar.xz' -C "${srcdir}/root"
}

package() {
  install -d -m 0755 \
    "${pkgdir}/opt/${_pkgname}" \
    "${pkgdir}/usr/bin" \
    "${pkgdir}/usr/share/applications" \
    "${pkgdir}/usr/share/icons" \
    "${pkgdir}/usr/share/licenses/${pkgname}"

  cp -rp "${srcdir}/root/opt/Rambox/." "${pkgdir}/opt/${_pkgname}/."
  cp -rp "${srcdir}/root/usr/share/icons/." "${pkgdir}/usr/share/icons/."

  install -m 0644 "${srcdir}/${_pkgname}-EULA" "${pkgdir}/usr/share/licenses/${pkgname}/EULA"
  install -m 0644 "${srcdir}/root/usr/share/applications/${_pkgname}.desktop" \
    "${pkgdir}/usr/share/applications/${_pkgname}.desktop"

  ln -s "/opt/${_pkgname}/${_pkgname}" "${pkgdir}/usr/bin/${_pkgname}"
  sed -i "s~/opt/Rambox/~/opt/${_pkgname}/~g" "${pkgdir}/usr/share/applications/${_pkgname}.desktop"
}