summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 628f6243e8f2641562a20ec1a6e9806e4b7f5f90 (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

# Maintainer: Benjamin Navarro <navarro.benjamin13@gmail.com>

pkgname=docker-manager-git
_basename=${pkgname%-git}
pkgver=v0.2.beta.r2.g693a156
pkgrel=1
pkgdesc="Ease the use of docker containers (start/connect/save/stop), written in Golang."
arch=('x86_64' 'i686')
url="https://github.com/BenjaminNavarro/docker-manager"
license=('GPL')
depends=('glibc')
makedepends=('go' 'git')
provides=("$_basename")
conflicts=("$_basename")
options=('!strip' '!emptydirs')
source=('docker-manager::git+http://github.com/BenjaminNavarro/docker-manager#branch=master')
md5sums=('SKIP')

prepare() {
    export GOPATH="$srcdir/go"
    mkdir -p "$srcdir/go/src/github.com/BenjaminNavarro"
    ln -sf "$srcdir/$_basename" "$srcdir/go/src/github.com/BenjaminNavarro/$_basename"
    go get gopkg.in/yaml.v2
}

pkgver() {
    cd $_basename
    git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}


build() {
    cd "$srcdir/go/src/github.com/BenjaminNavarro/$_basename"
    go install
}

package() {
    install -Dm755 "$srcdir/go/bin/$_basename" "$pkgdir/usr/bin/$_basename"
    cd "$srcdir/go/src/github.com/BenjaminNavarro/$_basename"
    # mkdir -p "$pkgdir/usr/share/licenses/$_basename"
    # install -m 0644 LICENSE "$pkgdir/usr/share/licenses/$_basename/"
}