summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c0cf14e4cf3a6e49f5a5c10c2883f34c4811b400 (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
# Maintainer: johnjq <dev [at] johnjq (dot) com>

pkgname=go-megaannex-git
pkgver=0
pkgrel=2
pkgdesc="A git-annex special remote using mega"
arch=("x86_64" "i686")
url="https://github.com/dxtr/megaannex-go"
license=("MIT")
depends=("go")
optdepends=("git-annex" "git-annex-git")
options=("!strip" "!emptydirs")
source=("git+https://github.com/dxtr/megaannex-go")
sha512sums=("SKIP")
_go_mega_url=("github.com/t3rm1n4l/go-mega")

#pkgver() {
    #cd "$srcdir/megaannex-go"
    #git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
#}

build() {
    export GOPATH="$srcdir"
    go get -fix -v -x "${_go_mega_url}"
    (cd "$srcdir/megaannex-go" && go build)
}

package() {
    cd "$srcdir/megaannex-go"
    install -Dm755 "megaannex-go" "$pkgdir/usr/bin/git-annex-remote-mega"
    install -m 644 -D LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}