# Contributor: Mika Havela <mika.havela@gmail.com>
# Maintainer: Mika Havela <mika.havela@gmail.com>
pkgname=zziplib
pkgver=0.13.67
pkgrel=1
pkgdesc="Lightweight library to easily extract data from zip files"
url="http://zziplib.sourceforge.net"
arch="all"
license="LGPL-2.0-or-later MPL-1.1"
makedepends="zlib-dev python2 xmlto"
checkdepends="zip"
subpackages="$pkgname-dev $pkgname-doc $pkgname-utils"
source="$pkgname-$pkgver.tar.gz::https://github.com/gdraheim/$pkgname/archive/v$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"

prepare() {
	default_prepare
	update_config_guess
}

build() {
	cd "$builddir"
	./configure \
		--prefix=/usr \
		--disable-static
	make
}

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

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

utils() {
	pkgdesc="Utilities for the zziplib library"
	install -d "$subpkgdir"/usr
	mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
}

sha512sums="a34b801a18a2051aa3898a572508ffd327521b69878413af679b10f6a68b37e770651884ae611bf9c01ce14013c6a1e06adeadd3ef6219d4b9278f1b9e7a6459  zziplib-0.13.67.tar.gz"
