# Exit on error:
set -e

wget https://www.kernel.org/pub/linux/utils/kernel/hotplug/udev-175.tar.gz
tar xf udev-175.tar.gz
cd udev-175

CC=/static/bin/musl-gcc \
    LDFLAGS='-s -L/static/lib -static -static-libgcc' \
    ./configure --prefix=/static \
    --disable-introspection \
    --with-pci-ids-path=no \
    --with-usb-ids-path=no \
    --disable-gudev

make install
cd ..
rm -rf udev-175
rm udev-175.tar.gz

exit 0
