#!/bin/sh -e

./configure \
    --disable-alsaconf \
    --disable-bat \
    --disable-xmlto \
    --prefix=/usr

make
make DESTDIR="$1" install

# Get rid of sbin
mv "$1/usr/sbin/alsactl" "$1/usr/sbin/alsa-info.sh" "$1/usr/bin"
rm -rf "$1/usr/sbin"