# Contributor: A. Wilcox <awilfox@adelielinux.org>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=fastjar
pkgver=0.98
pkgrel=0
pkgdesc="Java archiver tool, tuned for performance"
url="https://savannah.nongnu.org/projects/fastjar/"
arch="all"
license="GPL-2.0+ AND LGPL-2.0+"
depends=""
makedepends="zlib-dev"
subpackages="$pkgname-doc"
source="https://download.savannah.nongnu.org/releases/fastjar/fastjar-$pkgver.tar.gz
	null-terminate.patch
	write-return.patch
	efficiency.patch
	"

prepare() {
	default_prepare
	update_config_sub
}

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

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
	rm -f "$pkgdir"/usr/lib/charset.alias
}

sha512sums="c0f9fca7b58d6acd00b90a5184dbde9ba3ffc5bf4d69512743e450649a272baf1f6af98b15d79d2b53990eaf84ef402c986035e6b615a19e35ed424348143903  fastjar-0.98.tar.gz
073c4fcc780588f146f2970f8718dbd70597ce46be8429b86d989056811bd331e209edf90e49d9ed8507e518fd7d7f57a76749f36eb308c12f9a74c7ab10beca  null-terminate.patch
061c9ca0a13136b5eacef453822f71b8dc27f7501e2bbf5243785c147800f5793cffa6d1998dce0c12ce12fd892f3f0f03c06350e50621b5782dfb9a16c375ae  write-return.patch
16584ebe2bc104c2489ee8ff0f0aca471dc0d95c79b199fc463d6bdd6fe99425d583948ebb7e9aab775dffbffdea3babbd824df5debdbd445f559e1334815583  efficiency.patch"