# Contributor: William Pitcock <nenolod@dereferenced.org>
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Maintainer: Valery Kartel <valery.kartel@gmail.com>
pkgname=mm
pkgver=1.4.2
pkgrel=1
pkgdesc="A shared memory abstraction library"
url="http://www.ossp.org/pkg/lib/mm/"
arch="all"
license="custom"
subpackages="$pkgname-dev $pkgname-doc"
source="ftp://ftp.ntua.gr/pub/utils/ossp/lib/$pkgname/$pkgname-$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"

prepare() {
	cd "$builddir"
	update_config_sub
}

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--target=$CTARGET \
		--prefix=/usr
	make
}

check() {
	cd "$builddir"
	make check
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
	install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}

sha512sums="dcc12676453cfaf19560f99fa97e905428051d72b46aeaf574300f51e64f689caa70c81b619b8794ad604e8a2efe6bde1e486a2e315263b5694d6eab1cacc182  mm-1.4.2.tar.gz"
