#!/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=execline
pkgver=2.8.3.0
_pkgver=v2.8.3.0
pkgrel=01
pkgdesc="An interpreter-less scripting language."
arch=(x86_64)
url="http://skarnet.org/software/execline/"
groups=(s6-suite)
depends=('skalibs>=2.11.2.0')
makedepends=('git' 'skalibs>=2.11.2.0')
source=("$pkgname::git+git://git.skarnet.org/execline#tag=${_pkgver}")

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

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

package() {
  cd "$srcdir/$pkgname"
  make DESTDIR="$pkgdir/" install

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

  install -Dm644 COPYING "$pkgdir/usr/share/licenses/${pkgname%-*}/COPYING"
}

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

license=('ISC')

sha256sums=(SKIP)
