# Contributor: ScrumpyJack <scrumpyjack@st.ilet.to>
# Maintainer: ScrumpyJack <scrumpyjack@st.ilet.to>
setvar pkgname = 'acme-client'
setvar pkgver = '0.1.16'
setvar _ver = ${pkgver//./_}
setvar pkgrel = '3'
setvar pkgdesc = ""An ACME client for Let's Encrypt written in C""
setvar url = ""https://github.com/kristapsdz/acme-client-portable""
setvar arch = ""all""
setvar license = ""ISC""
setvar depends = ""ca-certificates""
setvar makedepends = ""bsd-compat-headers libressl-dev""
setvar install = """"
setvar subpackages = ""$pkgname-doc""
setvar source = ""$pkgname-$pkgver.tar.gz::https://github.com/kristapsdz/acme-client-portable/archive/VERSION_$_ver.tar.gz
	default-ca.patch
	""

setvar builddir = ""$srcdir/acme-client-portable-VERSION_$_ver""

proc build {
	cd $builddir
	make PREFIX=/usr || return 1
}

proc package {
	cd $builddir
	make DESTDIR=$pkgdir \
		PREFIX=/usr \
		MAN1DIR=/usr/share/man/man1 \
		install || return 1
	install -d "$pkgdir"/var/www/acme "$pkgdir"/etc/ssl/acme
	install -dm0700 "$pkgdir"/etc/ssl/acme/private "$pkgdir"/etc/acme
}

setvar sha512sums = ""7d8dcf0d9dd0eb8f978a0c069266935f59196760ff8e1e774b253310568b2b7595a82944d6276f8493b21608540900d79bdf20bc1220c14116005cc7c448c392  acme-client-0.1.16.tar.gz
ff416bad782a60675e0c42c8f611902403f3bdb3daf4e006434cf07837d4c7998e90eef0701f789672495f7cde2d158953f9365055e834619c2ccf52328598ed  default-ca.patch""