summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 316151e0e93ccd0a2a8bed473bdf46aac266a77b (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
# Maintainer: Miko (mikoxyz) <mikoxyzzz@gmail.com>
pkgname=backdown-git
pkgver=r12.52507b8
pkgrel=1
pkgdesc="A deduplicator"
arch=('x86_64')
url="https://github.com/Canop/backdown"
license=('MIT')
depends=()
makedepends=('clang' 'git' 'rust')
options=('!lto')
source=("$pkgname::git+https://github.com/Canop/backdown.git")
sha512sums=('SKIP')

pkgver() {
  cd "$pkgname"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  cd "$pkgname"
  RUSTUP_TOOLCHAIN=stable cargo build --release --locked --all-features --target-dir=target
}

check() {
  cd "$pkgname"
  RUSTUP_TOOLCHAIN=stable cargo test --release --locked --target-dir=target
}

package() {
   cd "$pkgname"
   install -Dm755 target/release/backdown "${pkgdir}/usr/bin/backdown"
   install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}