diff --git a/.gitignore b/.gitignore index 10cca37..de5c6f8 100644 --- a/.gitignore +++ b/.gitignore @@ -147,3 +147,6 @@ crashlytics.properties crashlytics-build.properties fabric.properties +src/ +consul-git/ +*.tar.xz diff --git a/01-remove-golang16-dependency.patch b/01-remove-golang16-dependency.patch deleted file mode 100644 index 182eb75..0000000 --- a/01-remove-golang16-dependency.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- a/consul/prepared_query/template.go 2016-03-28 11:24:45.887857728 +0900 -+++ b/consul/prepared_query/template.go 2016-03-28 11:26:28.921151636 +0900 -@@ -12,6 +12,11 @@ - "github.com/mitchellh/copystructure" - ) - -+func regexCopy(re *regexp.Regexp) *regexp.Regexp { -+ r := regexp.MustCompile(re.String()) -+ return r -+} -+ - // IsTemplate returns true if the given query is a template. - func IsTemplate(query *structs.PreparedQuery) bool { - return query.Template.Type != "" -@@ -116,7 +121,7 @@ - // from multiple goroutines. - var matches []string - if ct.re != nil { -- re := ct.re.Copy() -+ re := regexCopy(ct.re) - matches = re.FindStringSubmatch(name) - } - diff --git a/PKGBUILD b/PKGBUILD index 35bc82d..345b1d7 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -2,7 +2,7 @@ # Contributor: Sebastian Krebs pkgname=consul-git -pkgver=v0.6.4.r0.g26a0ef8 +pkgver=v0.7.1.r0.ga9455cd pkgrel=1 pkgdesc='Service discovery and high-available (CP) KV storage' arch=('i686' 'x86_64') @@ -13,13 +13,11 @@ conflicts=('consul') makedepends=('inetutils' 'git' 'go' 'godep') depends=('glibc') source=( - "$pkgname::git+https://github.com/hashicorp/consul.git#tag=v0.6.4" -# "01-remove-golang16-dependency.patch" + "$pkgname::git+https://github.com/hashicorp/consul.git#tag=v0.7.1" "consul.service" ) sha512sums=('SKIP' -# 'c1feded1b32438fe2713bff3c97624fd62a9d4bb76221b5140245896ce94f37daf6c1b38c5426f2b8d8811f0dbb2d4082eed72e5919a10492a7cbf1fcd434414' 'ecfb5b6ab3623d0e74895c6d8e379fa07b44b3c7f20dc5ad774e88bc61b00d8d4063cd2577874c181359fa2036276cd3c8d75d8ffd314d5f85dd07bfb092c0c2') pkgver() { @@ -29,19 +27,19 @@ pkgver() { prepare(){ cd "$srcdir/$pkgname" -# patch -p1 -i "$srcdir/01-remove-golang16-dependency.patch" mkdir -p "${srcdir}/gopath" export GOPATH="${srcdir}/gopath" } + build() { cd "$pkgname" - mkdir -p Godeps/_workspace/src/github.com/hashicorp - ln -sfT ../../../../../ Godeps/_workspace/src/github.com/hashicorp/consul - godep restore . - godep go build -o ${pkgname} . + mkdir -p "${GOPATH}/src/github.com/hashicorp" + ln -sfT "$PWD" "${GOPATH}/src/github.com/hashicorp/consul" + + go get github.com/mitchellh/cli + go build -o ${pkgname} . -# export GOPATH="$srcdir/" } package() {