summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0b797db846fd88f60a60391f707b3b3df6716f80 (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
# Maintainer: Daniel Souza <aur at posix dot dev dot br>

_pkgname="yarr"
_gitauthor="nkanaev"
_gitbranch="master"
_outdir="_output/linux"

pkgname="${_pkgname}-git"
pkgver=v2.3.r41.g95ebbb9
pkgrel=3
pkgdesc="Self-hosted RSS reader with Vue.js front and Go/SQLite back."
arch=("any")
url="https://github.com/${_gitauthor}/${_pkgname}"
license=("MIT")
groups=()
depends=()
makedepends=("go" "make" "git")
optdepends=()
provides=("${_pkgname}")
conflicts=()
replaces=()
backup=()
options=()
install=
changelog=
source=("git+https://github.com/${_gitauthor}/${_pkgname}.git#branch=${_gitbranch}")
noextract=()
sha512sums=('SKIP')

pkgver() {
  cd "$srcdir/$_pkgname"
  # Use tags but fallback to revision
  ( set -o pipefail
    git describe --tags --long --abbrev=7 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
  )
}

build(){
  cd "$_pkgname"
  make build_linux
}

package() {
  cd "$_pkgname"
  install -Dm755 "${_outdir}/yarr" "$pkgdir/usr/bin/yarr"
  install -Dm0644 license "$pkgdir/usr/share/licenses/${_pkgname}/LICENSE"
}