summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: dedc04896b148e9e7867fa089dadf02e0aa9790f (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
# Maintainer: Tobias Martin <tm-x at gmx dot net>

_pkgname=cni
pkgname=${_pkgname}-git
pkgver=r551.21d9639
pkgrel=2
pkgdesc="Specification and libraries for writing plugins to configure network interfaces in Linux containers"
arch=('i686' 'x86_64')
url="https://github.com/containernetworking/cni"
license=('apache')
makedepends=('git' 'go')
depends=('glibc')
source=("${pkgname}::git+https://github.com/containernetworking/${_pkgname}.git#branch=master")
sha512sums=('SKIP')

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

build() {
  cd "${srcdir}/${pkgname}"
  ./build.sh
}

package() {
  cd "${srcdir}/${pkgname}"
  mkdir -p "${pkgdir}/opt/${_pkgname}/"
  cp -dr --no-preserve=ownership bin "${pkgdir}/opt/${_pkgname}/"

  mkdir -p ${pkgdir}/usr/share/licenses/${_pkgname}
  install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE"
}

# vim:set ts=2 sw=2 et: