# Contributor: Timo Teräs <timo.teras@iki.fi>
# Maintainer: Max Rees <maxcrees@me.com>
pkgname=libmwaw
pkgver=0.3.15
pkgrel=0
pkgdesc="Import filter and tools for old Mac documents"
url="https://sourceforge.net/projects/libmwaw/"
arch="all"
options="!check"  # No test suite.
license="MPL-2.0 OR LGPL-2.0+"
depends=""
depends_dev="boost-dev attr-dev zlib-dev"
makedepends="$depends_dev librevenge-dev doxygen"
subpackages="$pkgname-dev $pkgname-doc $pkgname-tools"
source="http://downloads.sourceforge.net/project/$pkgname/$pkgname/$pkgname-$pkgver/$pkgname-$pkgver.tar.bz2"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--disable-werror
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

tools() {
	mkdir -p "$subpkgdir"/usr
	mv "$pkgdir"/usr/bin "$subpkgdir"/usr
}

sha512sums="e1799b4cad4f67f525d55183a96bec21d082532371a8ec2f0ab78f9623e5dd8e019e036882da956a9858378096dda3fdebff5e5b76f03b54533f632e0ca8822b  libmwaw-0.3.15.tar.bz2"