#!/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=mdevd
pkgver=0.1.6.2
pkgrel=02
pkgdesc="a mdev-compatible hotplug manager daemon"
url="http://skarnet.org/software/mdevd/"
makedepends=('git' 'skalibs>=2.13.1.1')
depends=('skalibs>=2.13.1.1')
groups=('s6-suite')
#commit=0838e7bd13c9f847c06d015d86a8a1ff403a2e8f # refs/tags/v0.1.6.1
source=("$pkgname::git+git://git.skarnet.org/mdevd#tag=v${pkgver}")

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"
}

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

arch=(x86_64)

license=(ISC)

sha256sums=(SKIP)

## d784948ce8d8003c154d9ce741794e158af0482e94706a544dfca512eebd22d3  mdevd-0.1.6.2-02-x86_64.pkg.tar.lz
