summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a257fde779ac106a2fb7b5192d3fa9f7890d4f05 (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: Nils Grunwald <nils [@] grunwald [dot] fr>

pkgname=marks-git
pkgver=VERSION
pkgrel=1
pkgdesc='A simple and fast search-engine like tool for org/markdown files.'
arch=('x86_64')
url='https://github.com/isamert/marks'
license=('GPL3')
provides=('marks')
makedepends=('cargo'
             'git')
conflicts=()

source=("git+https://github.com/isamert/marks.git")

md5sums=('SKIP')

pkgver() {
  cd ${pkgname/\-git/}
  ( set -o pipefail
    git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
    printf "0.1.0.r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  )
}

build() {
  cd ${pkgname/\-git/}
  cargo build --release --locked --all-features --target-dir=target
}

package() {
  cd ${pkgname/\-git/}
  install -Dm 755 target/release/${pkgname/\-git/} -t "${pkgdir}/usr/bin"
}