summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: fe5392adecd1b85cbc03ebbb6fb46b32e48f9fae (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
# Maintainer: KokaKiwi <kokakiwi+aur at kokakiwi dot net>
# Maintainer: Martin Dünkelmann <nc-duenkekl3 at netcologne.de>

pkgname=ferdi-nightly-bin
pkgver=5.6.1.nightly.38
pkgrel=1
pkgdesc='A messaging browser that allows you to combine your favorite messaging services into one application - nightly binary version'
url='https://getferdi.com'
license=('Apache')
arch=('x86_64')
makedepends=('curl' 'jq')
depends=('c-ares' 'ffmpeg' 'gtk3' 'libevent' 'libnghttp2' 'libxkbfile' 'libxslt' 'minizip' 'nss' 're2' 'snappy')
provides=('ferdi')
conflicts=('ferdi' 'ferdi-bin')
source=(git+https://github.com/getferdi/nightlies.git)
sha512sums=('SKIP')
_github_api_uri=https://api.github.com/repos/getferdi/nightlies/releases

pkgver() {
  newest_nightly_version=$(curl --silent ${_github_api_uri} | jq -r '.[0].tag_name[1:]')
  printf ${newest_nightly_version/-/.}
}

prepare() {
  cd "${srcdir}"

  newest_nightly_download_url=$(curl --silent ${_github_api_uri} | jq -r '.[0].assets[] | select(.name | contains("rpm")).browser_download_url')
  curl ${newest_nightly_download_url} -L --output ferdi.rpm
}

package() {
  cd "${pkgdir}"

  bsdtar -xf ${srcdir}/ferdi.rpm
}