blob: ce1ea4bcb741f9894e192a472fe4f7e4adae71c5 (
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
47
|
#!/bin/mkpkg
# description: Generate C bindings from Rust code
# url: https://github.com/mozilla/cbindgen
name=cbindgen
version=0.29.4
release=1
makedeps=(rust cargo-audit)
source=(https://github.com/mozilla/$name/archive/v$version/$name-v$version.tar.gz)
renames=($name-$version.tar.gz)
sha256sums=(
"9b5757e915cf8be523d3aca282b9b5651bafa112e14bf1ba488562ba282807d6"
)
patch() {
export CARGO_HOME="$SRC/.cargo"
cd $name-$version
cargo vendor ../vendor
mkdir -p .cargo
printf '%s\n' \
'[source.crates-io]' \
'replace-with = "vendored-sources"' \
'' \
'[source.vendored-sources]' \
'directory = "../vendor"' \
> .cargo/config.toml
cargo audit
}
build() {
export CARGO_HTTP_CAINFO=/etc/ssl/cert.pem
export RUSTFLAGS="-C target-feature=-crt-static"
export TMPDIR="$SRC/tmp"
mkdir -p "$TMPDIR"
cd $name-$version
cargo build --release --offline --bins
install -Dm755 target/release/$name $PKG/usr/bin/$name
}
signify() {
untrusted comment: public key
RWTZ9IduCSQ/mL8337TEUinPwT92xFEUpD92hkS7IxcOnzTt9QdpohT3
}
# vim: filetype=sh
|