blob: 5c8c3472ebb8b969e3c528b1d2fa629e7d65c154 (
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
|
# Maintainer: Vincent Petithory <vincent.petithory at gmail dot com>
pkgname=kraken-git
pkgver=r70.2c5f7ce
pkgrel=1
pkgdesc='File sharing with HTTP servers.'
arch=('x86_64' 'i686' 'ARM')
url='https://github.com/vincent-petithory/kraken'
license=('MIT')
makedepends=('go' 'git')
depends=()
options=('!strip' '!emptydirs')
source=('git+https://github.com/vincent-petithory/kraken.git')
md5sums=('SKIP')
_gourl='github.com/vincent-petithory/kraken'
pkgver() {
cd "$srcdir/kraken"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
build() {
p="${srcdir}/src/${_gourl}"
if [ -d "${p}/.git" ]; then
git --git-dir="${p}/.git" --work-tree="$p" remote set-url origin "file://${srcdir}/kraken"
git --git-dir="${p}/.git" --work-tree="$p" pull origin
else
git clone file://"${srcdir}/kraken" "${p}"
fi
export GOPATH="$srcdir"
go get -v "${_gourl}/..."
go install "${_gourl}/..."
}
package() {
install -D -m755 "${srcdir}/bin/krakend" "${pkgdir}/usr/bin/krakend"
install -D -m755 "${srcdir}/bin/krakenctl" "${pkgdir}/usr/bin/krakenctl"
install -D -m644 "${srcdir}/src/${_gourl}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
|