summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d6cf13b2e6190e48059f069b909faac405fa10b4 (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
# $Id$
# Maintainer: Sven Fischer <aur.archlinux@linux4tw.de>

pkgname=read-it-later-git
_pkgname=read-it-later
pkgver=0.0.2.r122.b3c7567
pkgrel=1
pkgdesc='A wallabag client GTK GUI'
arch=('i686' 'x86_64')
url='https://belmoussaoui.com/2020/02/04/read-it-later/'
license=('GPL3')
provides=(${pkgname%-*})
conflicts=()
depends=('appstream-glib' 'libhandy' 'webkit2gtk')
makedepends=('git' 'meson' 'rust')
source=('git+https://gitlab.gnome.org/World/read-it-later.git')
sha512sums=('SKIP')
builddir=build

pkgver() {
  cd "${srcdir}/${_pkgname}"
  local srcversion="$(grep "version" Cargo.toml | head -n1 | cut -d '"' -f 2)"
  printf "%s.r%s.%s" $srcversion "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  cd "${srcdir}/${_pkgname}"
  meson --prefix /usr $builddir
  ninja -v -C $builddir
}

check() {
  cd "${srcdir}/${_pkgname}"
  ninja -C $builddir test
}

package() {
  cd "${srcdir}/${_pkgname}"
  DESTDIR="${pkgdir}" ninja -C $builddir install
}