summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 62ad6770be43716ff0f9e7284f39dfb91dbde241 (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
33
34
35
36
# Maintainer: Yen Chi Hsuan <yan12125 at gmail dot com>

pkgname=dhcptest-git
_github_addr=CyberShadow/dhcptest
pkgver=0.5.r0.g56a8834
pkgrel=3
pkgdesc="DHCP test client"
arch=('i686' 'x86_64')
url="https://github.com/CyberShadow/dhcptest"
license=('custom:BSL1.0')
depends=('glibc')
makedepends=('dmd' 'git')
source=("$pkgname"::"git+https://github.com/$_github_addr"
        'http://www.boost.org/LICENSE_1_0.txt')
md5sums=('SKIP'
         'e4224ccaecb14d942c71d31bef20d78c')

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"
  cd "$srcdir"
  install -Dm644 "LICENSE_1_0.txt" "$pkgdir/usr/share/licenses/dhcptest-git/LICENSE.txt"
}