# Exit on error:
set -e

wget -c http://www.x.org/releases/individual/app/xkbcomp-1.2.4.tar.bz2
tar xf xkbcomp-1.2.4.tar.bz2
cd xkbcomp-1.2.4

PKG_CONFIG=/static/bin/pkg-config \
    CC=/static/bin/musl-gcc \
    LDFLAGS='-s -L/static/lib -static -static-libgcc' \
    ./configure --prefix=/static

make \
    LIBS="-lX11 -lxcb -lXau" \
    install

cd ..
rm -rf xkbcomp-1.2.4
rm xkbcomp-1.2.4.tar.bz2

exit 0
