summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8d4a1ce0a274d5e4a27353b6fcaf2758d42af695 (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
37
38
39
40
41
42
43
44
45
46
47
48
# Maintainer: Jonne Haß <me@mrzyx.de>

pkgname=dename
pkgver=r166.efbb1c2
pkgrel=1
pkgdesc="NameCoin-style names using consensus instead of proof of work "
arch=('x86_64' 'i686')
url="https://github.com/andres-erbsen/dename/"
license=('Apache')
depends=('bash')
makedepends=('git' 'go' 'mercurial')
options=('!strip' '!emptydirs')
source=('git+https://github.com/andres-erbsen/dename.git')

pkgver() {
  cd "$pkgname"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
  cd "$srcdir"
  mkdir -p go
  export GOPATH="$srcdir/go"
  go get gopkg.in/gcfg.v1
  go get github.com/andres-erbsen/dename/client
}

build() {
 _srcdir="$srcdir/$pkgname"

 cd "$_srcdir/dnmgr/dnmgr"
 go build -o dnmgr main.go

 cd "$_srcdir/dnmlookup"
 go build -o dnmlookup main.go
}

package() {
  cd "$srcdir/$pkgname"

  install -Dm755 dnmgr/dnmgr/dnmgr "$pkgdir/usr/bin/dnmgr"
  install -Dm755 dnmlookup/dnmlookup "$pkgdir/usr/bin/dnmlookup"
  install -Dm755 utils/dnget "$pkgdir/usr/bin/dnget"
  install -Dm755 utils/dngpg "$pkgdir/usr/bin/dngpg"
}

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