summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 34fd7a1e99734db1d5f2ff948b4898ad08ab7ab3 (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
# Maintainer: Francesc d'Assís Requesens i Roca <francescrequesens.com>

pkgname=api-calls-bin
pkgver=0.18.0
pkgrel=1
pkgdesc="A lightweight Electron-based desktop tool for sending and inspecting REST API requests."
arch=('x86_64')
url="https://github.com/elpeix/apicalls"
license=('GPL-3.0-only')
makedepends=('libarchive')
depends=(
  'gtk3'
  'nss'
  'nspr'
  'alsa-lib'
  'at-spi2-core'
  'libxcomposite'
  'libxdamage'
  'libxrandr'
  'libxkbcommon'
  'libxss'
  'libxtst'
  'mesa'
  'libdrm'
  'xdg-utils'
  'hicolor-icon-theme'
  'libnotify'
)
provides=('api-calls')
conflicts=('api-calls')
source=("${pkgname}-${pkgver}.deb::https://github.com/elpeix/apicalls/releases/download/v0.18.0/api-calls_0.18.0_amd64.deb")
sha256sums=('2c18cbf62164a042d2b0cf0fd31a083cfdb8f637edf32192f43359171624a56b')

package() {
  cd "${srcdir}"

  # Extract the .deb to a temporary directory
  rm -rf debpkg
  mkdir -p debpkg
  bsdtar -xf "${pkgname}-${pkgver}.deb" -C debpkg

  # Extract the payload to pkgdir
  bsdtar -xf debpkg/data.tar.* -C "${pkgdir}"

  # Install license
  _license_path="$(find "${pkgdir}" -maxdepth 4 -type f -iname 'LICENSE' | head -n1)"

  if [[ -n "${_license_path}" ]]; then
    install -Dm644 "${_license_path}" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
  fi
}