# $Id: PKGBUILD 293866 2018-02-13 15:16:09Z seblu $
# Maintainer: Sébastien Luttringer
# Contributor: Jens Adam <jra@byte.cx>

pkgname=picocom
pkgver=3.1
pkgrel=1
pkgdesc='Minimal dumb-terminal emulation program, very much like minicom'
url='https://github.com/npat-efault/picocom'
license=('GPL2')
arch=('x86_64')
makedepends=('git')
depends=('glibc')
source=("git+https://github.com/npat-efault/picocom.git#tag=$pkgver")

build() {
  cd $pkgname
  make UUCP_LOCK_DIR=/run/lock/picocom
}

package() {
  cd $pkgname
  install -D -m 755 picocom "$pkgdir/usr/bin/picocom"
  install -D -m 644 picocom.1 "$pkgdir/usr/share/man/man1/picocom.1"
  # install tmpfiles for lock files
  # http://lists.freedesktop.org/archives/systemd-devel/2011-March/001823.html
  install -D -m 644 /dev/null "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf"
  echo "d /run/lock/$pkgname 0770 root uucp" \
    > "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf"
}

# vim:set ts=2 sw=2 et:
md5sums=('SKIP')
