mirror of
https://github.com/blacktop/ipsw.git
synced 2026-05-08 12:22:26 +00:00
27 lines
659 B
Bash
Executable File
27 lines
659 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -e
|
|
|
|
if [[ $# -eq 0 ]]; then
|
|
echo 'You must specify a target architecture (x86_64 or aarch64)'
|
|
exit 1
|
|
fi
|
|
|
|
rm -rf /tmp/libusb_$1
|
|
|
|
LIBUSB_VERSION=1.0.26
|
|
|
|
export CC="zig cc -target $1-linux-musl"
|
|
export LD="zig cc -target $1-linux-musl"
|
|
|
|
cd /tmp
|
|
|
|
wget -N https://github.com/libusb/libusb/releases/download/v$LIBUSB_VERSION/libusb-$LIBUSB_VERSION.tar.bz2
|
|
mkdir libusb_$1
|
|
tar -xf libusb-$LIBUSB_VERSION.tar.bz2 --strip-components=1 -C /tmp/libusb_$1
|
|
|
|
cd libusb_$1
|
|
|
|
./configure --host=$1-linux-musl --disable-shared --enable-static -disable-udev
|
|
make -j$(sysctl -n hw.ncpu)
|
|
make -j$(sysctl -n hw.ncpu) install DESTDIR=/tmp/install_$1
|