summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6a0a2ffa6e69588c253c2fdadd15a63999cf5d33 (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
# Maintainer: Jean Lucas <jean@4ray.co>

pkgname=oxy-git
pkgver=3.0.0+r105+g891cedf
pkgrel=1
pkgdesc='SSH-alike that uses the Noise protocol (git)'
arch=(i686 x86_64)
url=https://github.com/oxy-secure/oxy
license=(BSD)
depends=(gcc-libs)
makedepends=(git rust)
provides=(oxy)
conflicts=(oxy)
source=(git+$url)
sha512sums=('SKIP')

pkgver() {
  cd oxy
  echo $(grep '^version =' Cargo.toml | head -n1 | cut -d\" -f2 | sed s/-/+/)+r$(git rev-list --count HEAD)+g$(git describe --always)
}

build() {
  cd oxy
  cargo build --release --locked
}

check() {
  cd oxy
  cargo test --release --locked || true
}

package() {
  cd oxy
  install -D target/release/oxy -t "$pkgdir"/usr/bin
  install -Dm 644 LICENSE -t "$pkgdir"/usr/share/licenses/oxy
}