# Maintainer : Yamada Hayao <hayao@fascode.net>
# Contributer: Nissar Chababy <funilrys at outlook dot com>
# Contributer: Jeroen Bollen <jbinero at gmail dot comau>

pkgname=ckbcomp
pkgver=1.203
pkgrel=1
pkgdesc="Compile a XKB keyboard description to a keymap suitable for loadkeys or kbdcontrol"
arch=(any)
url="http://anonscm.debian.org/cgit/d-i/console-setup.git/"
license=('GPL2')
depends=('perl')
source=("http://ftp.de.debian.org/debian/pool/main/c/console-setup/console-setup_${pkgver}.tar.xz")
sha512sums=('e73ade4a35c7d5e4986587067ab081da8b99acd1013ef2f9de63205f43a0777a917c0ce18e35f0fc95bfe22162ad56e0c92f1f9d657a27681a26d525441bcf2a')

package() {
    if [[ -d "${srcdir}/console-setup" ]]; then
        cd console-setup
    elif [[ -d "${srcdir}/console-setup-${pkgver}" ]]; then 
        cd console-setup-${pkgver} 
    else
	    echo "Source directory not found.".
	    exit 1
    fi


    [[ "${?}" != 0 ]] && cd "console-setup-${pkgver}"

    install -Dm755 "Keyboard/ckbcomp" "${pkgdir}/usr/bin/ckbcomp"
}
