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

_pkgname="journal"
_gitauthor="danisztls"
_gitbranch="main"

pkgname="${_pkgname}-git"
pkgver=r31.a521775
pkgrel=1
pkgdesc="Note-taking and tasks management tool"
arch=('any')
url="https://github.com/${_gitauthor}/${_pkgname}"
license=('GPL3')
groups=()
depends=('bash' 'ripgrep' 'sed' 'fd' 'fzf' 'bat')
makedepends=('git' 'make')
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)"
  )
}

package() {
  cd "$srcdir/${_pkgname}"
  make DESTDIR="${pkgdir}/" install
  install -vDm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${_pkgname}"
  install -vDm 644 README.md -t "${pkgdir}/usr/share/doc/${_pkgname}"
}