blob: 5c90cbaee89c6b7a22b5339f0052ceb2b59a5fa1 (
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
45
46
|
# Maintainer: peippo <christoph+aur@christophfink.com>
pkgname=librdp
_pkgname=rdp
pkgdesc="Fast Ramer–Douglas–Peucker and Visvalingam-Whyatt line simplification
algorithms"
url="https://github.com/urschrei/rdp"
license=("MIT")
pkgver=0.13.0
pkgrel=1
arch=("i686" "x86_64")
makedepends=(
"cargo"
)
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/urschrei/rdp/archive/refs/tags/v${pkgver}.tar.gz")
b2sums=("85f521ff93757b1fd3efff6979745d929882a45af5bd82984923a8f35ec837a77db8dde3c39dd87fed945e1d53c70d72229f0834a28dae406de627993bd6d448")
prepare() {
cd ${srcdir}/${_pkgname}-${pkgver}
export RUSTUP_TOOLCHAIN=stable
cargo update
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}
build() {
cd ${srcdir}/${_pkgname}-${pkgver}
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
cargo build --frozen --release --all-features
}
check() {
cd ${srcdir}/${_pkgname}-${pkgver}
export RUSTUP_TOOLCHAIN=stable
cargo test --frozen --all-features
}
package() {
cd ${srcdir}/${_pkgname}-${pkgver}
install -Dm0755 -t "${pkgdir}/usr/lib/" "target/release/${pkgname}.so"
install -Dm0644 "include/header.h" "${pkgdir}/usr/include/${pkgname}/header.h"
install -Dm0644 "license.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
|