mirror of
https://github.com/urbit/shrub.git
synced 2025-01-08 22:18:12 +03:00
28 lines
470 B
Bash
28 lines
470 B
Bash
|
source $setup
|
||
|
|
||
|
tar -xf $src
|
||
|
mv libusb-* libusb
|
||
|
|
||
|
mkdir build
|
||
|
cd build
|
||
|
|
||
|
if [ -n "$libudev" ]; then
|
||
|
export CFLAGS="${CFLAGS:=} -isystem $libudev/include"
|
||
|
export LDFLAGS="${LDFLAGS:=} -L$libudev/lib"
|
||
|
fi
|
||
|
|
||
|
../libusb/configure \
|
||
|
--prefix=$out \
|
||
|
--host=$host \
|
||
|
--enable-static \
|
||
|
--disable-shared
|
||
|
|
||
|
make
|
||
|
|
||
|
make install
|
||
|
|
||
|
if [ -n "$libudev" ]; then
|
||
|
ln -s $libudev/lib/pkgconfig/*.pc $out/lib/pkgconfig/
|
||
|
echo "Requires: libudev" >> $out/lib/pkgconfig/libusb-1.0.pc
|
||
|
fi
|