summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5612886d5d1d191f86154102faa5dd9e6a97efd0 (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
# Maintainer: Grant Handy <grantshandy AT gmail DOT com>

_pkgname='thes'
pkgname=${_pkgname}-git
pkgver=0.1.2.r0.g2c88e93
pkgrel=1
pkgdesc="A Completely Offline Thesaurus CLI Tool (Written in Rust)"
arch=('x86_64')
url="https://github.com/DefunctLizard/thes"
license=('APACHE-2.0')
depends=('glibc')
makedepends=('rust' 'git')
source=("${_pkgname}::git+https://github.com/DefunctLizard/thes.git")
md5sums=('SKIP')

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

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

package() {
  cd "$srcdir/${_pkgname}"

  # Binary
  install -Dm755 target/release/$_pkgname $pkgdir/usr/bin/$_pkgname
}