summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: aa1b595e16cd9c78ecb2bc8be4f3d2b795ff3c62 (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
# Maintainer: Christoph Scholz <christoph.scholz@gmail.com>
# Contributor: James An <james@jamesan.ca>

pkgname=minica-git
_pkgname=${pkgname%-git}
pkgver=v1.0.2.r4.g96a5c93
pkgrel=1
pkgdesc='A small, simple CA intended for use in situations where the CA operator also operates each host where a certificate will be used.'
arch=('i686' 'x86_64')
url="https://github.com/jsha/$_pkgname"
license=('unknown')
makedepends=('git' 'go')
provides=("$_pkgname=$pkgver")
conflicts=("$_pkgname")
source=("$_pkgname"::"git+https://github.com/jsha/$_pkgname.git")
md5sums=('SKIP')

pkgver() {
    cd "$_pkgname"
    (
        set -o pipefail
        git describe --long --tag | sed -r 's/([^-]*-g)/r\1/;s/-/./g' ||
        printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
    )
}

build() {
  cd "$_pkgname"

  go build
}

package() {
  cd "$_pkgname"

  install -Dm755 "$_pkgname" "$pkgdir/usr/bin/$_pkgname"
}