# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=xfce4-xkb-plugin
pkgver=0.7.1
_maj=${pkgver%%.*}
_min=${pkgver#${_maj}.}
_min=${_min%%.*}
_ver=${_maj}.${_min}
pkgrel=0
pkgdesc="plugin to switch keyboard layouts for the Xfce4 panel"
url="http://goodies.xfce.org/projects/panel-plugins/xfce4-xkb-plugin"
arch="all"
license="custom"
subpackages="$pkgname-doc $pkgname-lang"
depends=
makedepends="xfce4-panel-dev libxklavier-dev librsvg-dev intltool libwnck-dev
	libxi-dev libxkbfile-dev libsm-dev libgsf-dev e2fsprogs-dev bzip2-dev
	libxfce4ui-dev garcon-dev"
source="http://archive.xfce.org/src/panel-plugins/xfce4-xkb-plugin/$_ver/xfce4-xkb-plugin-$pkgver.tar.bz2"

prepare() {
	cd "$srcdir"/$pkgname-$pkgver
}

build () {
	cd "$srcdir"/$pkgname-$pkgver
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--libexecdir=/usr/lib \
		--localstatedir=/var \
		--disable-static \
		|| return 1
	make || return 1
}

package() {
	cd "$srcdir"/$pkgname-$pkgver
	make DESTDIR="$pkgdir" install || return 1
	install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
}
md5sums="2f68e0d53baf68ecc1a7165ad33c26a9  xfce4-xkb-plugin-0.7.1.tar.bz2"
sha256sums="61fe2e33fe99939d5d06a682e94e40e05ef844c930ad612154090d158b2ce681  xfce4-xkb-plugin-0.7.1.tar.bz2"
sha512sums="a6d83a614f85ada6470efbca9d19073ecf31e6531dafff000c1c9d439d7e4a6d02188296810933f28f4cf9b61addd1f99a6a47c8adc6423c44adbf7ffa525094  xfce4-xkb-plugin-0.7.1.tar.bz2"
