summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 853ae1b6e98385cb44225c7c68a8bbbb9f18bdbc (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
49
50
51
# Maintainer: David Flemström <david.flemstrom@gmail.com>
pkgname=record-query-git
pkgver=v1.0.0.r1.g594d6a9
pkgrel=1
epoch=
pkgdesc="A tool for doing record analysis and transformation"
arch=('x86_64')
url="https://github.com/dflemstr/rq"
license=('Apache')
groups=()
depends=(gcc-libs)
makedepends=(cargo git rust)
checkdepends=()
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=
changelog=
source=(
  $pkgname::git+https://github.com/dflemstr/rq.git
)
noextract=()
md5sums=(
  SKIP
)

pkgver() {
  cd "$srcdir/$pkgname"
  git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd "$srcdir/$pkgname"
  cargo build --release
}

check() {
  cd "$srcdir/$pkgname"
  cargo test
}

package() {
  cd "$srcdir/$pkgname"
  mkdir -p "$pkgdir/usr/bin"
  install -m755 target/release/rq -t "$pkgdir/usr/bin"
}

# vim:set ts=2 sw=2 et: