summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e35edb2b82028bcb3fd9939dfb6b23403d16aa50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Maintainer: Yen Chi Hsuan <yan12125 at gmail dot com>

_pkgname=dhcptest
pkgname=$_pkgname-git
pkgver=0.7.r0.g1c51271
pkgrel=1
pkgdesc="DHCP test client"
arch=('i686' 'x86_64')
url="https://github.com/CyberShadow/dhcptest"
license=('Boost')
depends=('glibc' 'gcc-libs')
makedepends=('dmd' 'git')
source=("$_pkgname"::"git+https://github.com/CyberShadow/dhcptest")
md5sums=('SKIP')

pkgver() {
  cd "$srcdir/$_pkgname"
  # Use the tag of the last commit
  git describe --long --tags | sed -E 's/([^-]*-g)/r\1/;s/-/./g'
}

build() {
  cd "$srcdir/$_pkgname"
  dmd dhcptest.d
}

package() {
  cd "$srcdir/$_pkgname"
  install -Dm755 "dhcptest" "$pkgdir/usr/bin/dhcptest"
  install -Dm644 "README.md" "$pkgdir/usr/share/doc/dhcptest/README.md"
}