# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
setvar pkgname = 'apg'
setvar pkgver = '2.2.3'
setvar pkgrel = '3'
setvar pkgdesc = ""Automated Password Generator.""
setvar url = ""http://www.adel.nursat.kz/apg/index.shtml""
setvar arch = ""all""
setvar license = ""BSD""
setvar depends = """"
setvar makedepends = """"
setvar subpackages = ""$pkgname-doc""
setvar source = ""ftp://ftp.netbsd.org/pub/pkgsrc/distfiles/$pkgname-$pkgver.tar.gz""

setvar _builddir = ""$srcdir"/$pkgname-$pkgver"
proc build {
	cd $_builddir
	sed -i 's:^#\(CS_LIBS = -lnsl\)$:\1:' Makefile
	make || return 1
}

proc package {
	cd $_builddir
	for i in apg apgbfm {
		install -D -m755 $i "$pkgdir"/usr/bin/$i
		install -D -m644 doc/man/$i.1 "$pkgdir"/usr/man/man1/$i.1
	}
	install -D -m 644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
}

setvar sha512sums = ""d2479dc2cb5d571ddea23d98e9d4ddbdfff874013ff27c00073a3231c4c1d0ee9b75d3983331f3513755b57527766cc5a35e6829cdca15d2e9293dfbc4c2788a  apg-2.2.3.tar.gz""