summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f282fd8a6348f288bbc3d37c1bd64d45d1223a67 (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
# Maintainer : Kevin MacMartin <prurigro@gmail.com>

_pkgname=goofys
pkgname=$_pkgname-git
pkgver=359v0.0.13
pkgrel=1
pkgdesc='A high-performance, POSIX-ish Amazon S3 file system written in Go'
url='https://github.com/kahing/goofys'
license=('Apache')
depends=('glibc')
makedepends=('git' 'go' 'godep')
arch=('i686' 'x86_64' 'arm' 'armv6h' 'armv7h')
source=('git+https://github.com/kahing/goofys')
sha512sums=('SKIP')

pkgver() {
  cd $_pkgname
  printf '%s' "$(git rev-list --count HEAD)$(git log | egrep -o 'v[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9a-z]*' | head -n 1)"
}

prepare() {
  cd $_pkgname
  sed -i 's|github\.com/kahing/goofys/|./|' main.go
}

build() {
  cd $_pkgname
  export GOPATH="$srcdir"
  go get -d -tags purego
  go build -i -v -ldflags -w
}

package() {
  # Install license
  cd $_pkgname
  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"

  # Install the binary
  install -Dm755 $_pkgname "$pkgdir/usr/bin/$_pkgname"
}