#!/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 |---------------------------------------

pkgname=s6
_pkgver=v2.11.3.2
pkgver=2.11.3.2
pkgrel=01
pkgdesc="A process supervision suite"
url="http://skarnet.org/software/s6/"
makedepends=('git' 'skalibs>=2.13.1.1' 'execline>=2.9.2.0')
depends=('skalibs>=2.13.1.1' 'execline>=2.9.2.0')
groups=('base' 's6-suite')
#_commit=24cb21d4aa3e364529d62c2c7310c189443c0843 # refs/tags/v2.11.2.0
#source=("$pkgname::git+git://git.skarnet.org/s6#commit=$_commit")
source=("$pkgname::git+git://git.skarnet.org/s6#tag=${_pkgver}")

_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 \
              --with-lib=/usr/lib/execline
  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"
}

#---- arch license gpg-key & sha256sums ----

arch=(x86_64)

license=(ISC)

sha256sums=(SKIP)

##  037cfcc5cfda0d226861ea11d0fb6ff47a7fd5ee240b7180a85e7297c84c4013  s6-2.11.3.2-01-x86_64.pkg.tar.lz
