# Contributor: Timo Teräs <timo.teras@iki.fi>
# Maintainer: Timo Teräs <timo.teras@iki.fi>
pkgname=libodfgen
pkgver=0.1.6
pkgrel=0
pkgdesc="Import filter and tools for Open Document Format"
url="https://sourceforge.net/projects/libwpd/"
arch="all"
license="MPL-2.0"
depends=""
depends_dev="boost-dev librevenge-dev"
makedepends="$depends_dev pkgconfig doxygen"
install=""
subpackages="$pkgname-dev $pkgname-doc"
source="https://sourceforge.net/projects/libwpd/files/$pkgname/$pkgname-$pkgver/$pkgname-$pkgver.tar.xz"

builddir="$srcdir"/$pkgname-$pkgver

prepare() {
	default_prepare
	update_config_sub
}

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

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

md5sums="731fd5e5513c55ed64458a0a8c33a830  libodfgen-0.1.6.tar.xz"
sha256sums="03b210ab44f05e38091508cdca6ba0ff73de3ea8a168f849b8f1c5059c20b9e9  libodfgen-0.1.6.tar.xz"
sha512sums="bc5e6908ee14c576adececdf8a94ae01f2ed487e6f2490e41aab787e1e8f72a3fb2a786f51ceeefa327710af215741ce13bcf4bb3d99d2aaf403f568c5db75a5  libodfgen-0.1.6.tar.xz"
