#!/usr/bin/bash
# JOBoRun		: Jwm OpenBox Obarun RUNit
# Maintainer	: Joe Bo Run <joborun@disroot.org>
# PkgSource		: url="https://gittea.disroot.org/joborun-pkg/jobcore/skarnet/$pkgname"
# Website		: https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------
# Maintainer: Eric Vidal <eric@obarun.org>

pkgname=s6-dns
pkgver=2.3.5.5
_pkgver=v2.3.5.5
pkgrel=01
pkgdesc="A suite of DNS client programs and libraries for Unix systems"
arch=(x86_64)
url="http://skarnet.org/software/s6/"
makedepends=('git' 'skalibs>=2.13.1.0')
depends=('skalibs>=2.13.1.0')
groups=(s6-suite)
source=("$pkgname::git+git://git.skarnet.org/s6-dns#tag=${_pkgver}")
#_commit=070fb7154e7d0d0065b701ff6c41682b5f6ab2d9 # refs/tags/v2.3.5.5
#source=("$pkgname::git+git://git.skarnet.org/s6-dns#commit=$_commit")

_pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

build() {
  cd ${srcdir}/${pkgname}
  ./configure --prefix=/usr \
              --bindir=/usr/bin \
              --sbindir=/usr/bin \
              --datadir=/etc \
              --disable-shared \
              --with-lib=/usr/lib/skalibs
  make
}

package() {
  cd ${srcdir}/${pkgname}

  DESTDIR=${pkgdir} make install

  # add doc
  install -dm 0755 $pkgdir/usr/share/doc/$pkgname/
  cp -R doc/* $pkgdir/usr/share/doc/$pkgname/

  install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"

}

#---- license gpg-key sha256sums ----

license=(ISC)

sha256sums=(SKIP)

