# Exit on error:
set -e

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

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

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

cd ..
rm -rf setxkbmap-1.3.0
rm setxkbmap-1.3.0.tar.bz2

exit 0
