blob: f841f341d327fa06a26ce81c7133baed171caa62 (
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
42
43
44
|
# Maintainer: qubidt <qubidt at gmail dot com>
pkgname=riffdiff
_pkgname=riff
pkgver=2.23.4
pkgrel=1
pkgdesc="A diff filter highlighting which line parts have changed"
arch=('i686' 'x86_64' 'aarch64')
url='https://github.com/walles/riff'
license=('MIT')
depends=('glibc' 'gcc-libs')
makedepends=('cargo')
conflicts=("${_pkgname}") # binary name conflicts with riff dependency manager
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/${pkgver}.tar.gz")
sha256sums=('59a7a9b3f87fa63b3d15672b58412a412525c12dc683be9c98cf544ad2aa2200')
prepare() {
cd "${_pkgname}-${pkgver}"
export RUSTUP_TOOLCHAIN=stable
cargo fetch --locked --target "${CARCH}-unknown-linux-gnu"
}
build() {
cd "${_pkgname}-${pkgver}"
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
cargo build --release --frozen --all-features
}
check() {
cd "${_pkgname}-${pkgver}"
export RUSTUP_TOOLCHAIN=stable
# test potentially (though not currently) overwrites binary from `build`
# see: https://gitlab.com/sequoia-pgp/sequoia-sq/-/issues/96
export CARGO_TARGET_DIR=target-test
cargo test --release --frozen --all-features
}
package() {
cd "${_pkgname}-${pkgver}"
install -Dm 755 -t "${pkgdir}/usr/bin" "target/release/${_pkgname}"
install -Dm 644 -t "${pkgdir}/usr/share/doc/${pkgname}" README.md
install -Dm 644 -t "${pkgdir}/usr/share/licenses/${pkgname}" LICENSE
}
|