# Contributor: Andrzej Trzaska <atrzaska2@gmail.com>
# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=ossp-uuid
pkgver=1.6.2
pkgrel=5
pkgdesc="Open Source Software Project Universally Unique Identifier (UUID)"
url="http://www.ossp.org/pkg/lib/uuid/"
arch="all"
license="MIT"
subpackages="$pkgname-static $pkgname-dev $pkgname-doc $pkgname-libs"
source="https://mirrors.ocf.berkeley.edu/debian/pool/main/o/ossp-uuid/ossp-uuid_$pkgver.orig.tar.gz
	uuid.patch
	"
builddir="$srcdir/uuid-$pkgver"

prepare() {
	default_prepare

	update_config_sub
	update_config_guess
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--without-pgsql \
		--without-perl \
		--without-php
	make
}

check() {
	make check
}

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

	# includes license text
	install -Dvm644 README \
		-t "$pkgdir"/usr/share/doc/$pkgname/
}

sha512sums="
16c7e016ce08d7679cc6ee7dec43a886a8c351960acdde99f8f9b590c7232d521bc6e66e4766d969d22c3f835dcc2814fdecc44eef1cd11e7b9b0f9c41b5c03e  ossp-uuid_1.6.2.orig.tar.gz
5247357f73ba667e4530af80f38bac17dd3395d8152ba1bf239abb1ab53f334d405a8673a3f99ac82c73737c19eccea71886b2ebc61ac37bc64e9ed69ab1bc0a  uuid.patch
"
