# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=tumbler
pkgver=0.2.0
pkgrel=0
pkgdesc="D-Bus service for applications to request thumbnails"
url="http://git.xfce.org/xfce/tumbler/"
arch="all"
license="GPL-2.0"
depends=
makedepends="gtk+2.0-dev dbus-glib-dev libjpeg-turbo-dev poppler-dev curl-dev"
install=""
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"
source="http://archive.xfce.org/src/apps/tumbler/${pkgver%.*}/tumbler-$pkgver.tar.bz2
	"

_builddir="$srcdir"/tumbler-$pkgver
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
}

sha512sums="54f83f904b32fcde5960f3343f8f4477bd30cd96a784aec5a3cb70aa2c9f924e833b2c0b429d608a36c75104d2689975d688358893127aed501f3cd8f24c280b  tumbler-0.2.0.tar.bz2"
