iglunix/bootstrap/rust/build.sh

34 lines
663 B
Bash
Raw Normal View History

2021-12-26 14:30:09 +00:00
pkgname=rust
pkgver=beta
fetch() {
2022-04-28 20:17:01 +00:00
curl "https://static.rust-lang.org/dist/rust-$pkgver-$ARCH-unknown-linux-musl.tar.gz" -o rust.tar.gz
tar -xf rust.tar.gz
2021-12-26 14:30:09 +00:00
}
build() {
2022-04-28 20:17:01 +00:00
[ -f libgcc_s.so ] \
2021-12-26 14:30:09 +00:00
|| clang -shared -o libgcc_s.so \
-Wl,--allow-multiple-definition -Wl,--whole-archive \
2022-04-28 20:17:01 +00:00
$(clang -print-libgcc-file-name) -lunwind
2021-12-26 14:30:09 +00:00
}
package() {
2022-04-28 19:52:34 +00:00
[ -f $pkgdir/opt/rust/lib/rustlib/uninstall.sh ] \
2021-12-26 14:30:09 +00:00
|| ./rust-$pkgver-$ARCH-unknown-linux-musl/install.sh \
--disable-ldconfig \
--destdir=$pkgdir \
--prefix=/opt/rust
2022-04-28 19:52:34 +00:00
[ -f $pkgdir/opt/rust/lib/libgcc_s.so.1 ] \
|| cp ./libgcc_s.so $pkgdir/opt/rust/lib/libgcc_s.so.1
2021-12-26 14:30:09 +00:00
}
backup() {
return
}
license() {
return
}