summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 24ecc2c05e5e606ba1fdf91578ffab7c31b26947 (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
# Maintainer: Severin Leonhardt <serviushack at gmx dot de>
pkgname=hypernate
pkgver=1.2.0
pkgrel=1
pkgdesc='Get more out of hibernation'
url='https://gitlab.com/serviushack/hypernate'
license=('ISC')
makedepends=(cargo)
arch=('i686' 'x86_64' 'armv6h' 'armv7h')
source=("git+https://gitlab.com/serviushack/hypernate.git#tag=$pkgver")
md5sums=('SKIP')

prepare() {
  export RUSTUP_TOOLCHAIN=stable
  cd $pkgname
  cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}

build() {
  export RUSTUP_TOOLCHAIN=stable
  export CARGO_TARGET_DIR=target
  cd $pkgname
  cargo build --frozen --release --all-features
}

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