summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c648207dbce502a04f1a8b728a0cb771f87bee0e (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: Michael Nussbaum <michaelnussbaum08@gmail.com>
pkgname="mozlz4"
pkgdesc="Decompress / compress mozlz4 files"
pkgver=0.1.0
pkgrel=2
arch=("x86_64")
url="https://github.com/jusw85/mozlz4"
license=("MIT")
makedepends=("git" "rust" "cargo")
source=("git+https://github.com/jusw85/mozlz4.git#tag=v${pkgver}")
sha256sums=("SKIP")

prepare() {
  cd "$pkgname"
  patch --forward --strip=1 --input="${startdir}/fix-arm.patch"
}

build(){
  cd "$pkgname"
  env CARGO_INCREMENTAL=0 cargo build --release --locked
}

check(){
  cd "$pkgname"
  env CARGO_INCREMENTAL=0 cargo test --release --locked
}

package() {
  cd "$pkgname"
  install -D -m755 "target/release/mozlz4" "$pkgdir/usr/bin/mozlz4"
}