summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 89a10b18edcbd00ed08b59e19a44c9e1ca36f0c5 (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
# Mainintainer : Lucas Rooyakkers <lucas dot rooyakkers at queensu at ca>
pkgname=proverbilo
pkgver=f570a97
pkgrel=1
pkgdesc="Montras hazardajn proverbaojn kaj diraĵojn en terminalo."
arch=('any')
url="https://github.com/Fierthraix/proverbilo"
license=('GPL3')
provides=("proverbilo")
makedepends=('git' 'cargo')
conflicts=('proverbilo')
source=("$pkgname::git+https://github.com/Fierthraix/proverbilo")
sha1sums=('SKIP')

build() {
  cd "$pkgname"
  if command -v rustup > /dev/null 2>&1; then
    RUSTFLAGS="-C target-cpu=native" rustup run stable \
      cargo build --release
  elif rustc --version | grep -q nightly; then
    RUSTFLAGS="-C target-cpu=native" \
      cargo build --release
  else
    cargo build --release
  fi
}

pkgver() {
  cd "$pkgname"
  echo $(git describe --always | sed 's/-/./g')
}

package() {
  cd "$pkgname"
  install -Dm755 "target/release/proverbilo" "$pkgdir/usr/bin/proverbilo"
}

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