summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: dab826b8f277d4291c21d0f67a971092c972d1ff (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
39
40
41
# Maintainer: Imperator Storm <imperatorstorm@protonmail.com>

pkgname=repak
pkgver=0.2.2
pkgrel=1
pkgdesc='Unreal Engine .pak file library and CLI in rust'
url='https://github.com/trumank/repak'
license=('Apache-2.0' 'MIT')
makedepends=('cargo')
depends=(glibc gcc-libs)
options=(!lto)
arch=('i686' 'x86_64' 'armv6h' 'armv7h')
source=(git+https://github.com/trumank/repak#tag=v$pkgver)
sha256sums=('20dc367f1316ec56f4bd0379a85ae62a71ff1de1b768ae96758cf6bd2ced4528')

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

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

check() {
	cd $srcdir/repak
    export RUSTUP_TOOLCHAIN=stable
    cargo test --frozen --all-features
}

package() {
	cd $srcdir/repak
    install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/repak"
    # for custom license, e.g. MIT
    install -Dm644 LICENSE-MIT "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
    install -Dm644 LICENSE-APACHE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}