summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Loibl2017-02-06 00:54:38 +0100
committerMatthias Loibl2017-02-06 00:54:38 +0100
commitba4fcb1e4125c4d6f247e90716ef47d19700daa6 (patch)
treefb5c926b72f116a95981c6d86c3a50e3463df634
parentd6b84f457661e740d8cf20ea605a0f457f2e9a9a (diff)
downloadaur-ba4fcb1e4125c4d6f247e90716ef47d19700daa6.tar.gz
Actually build the package youself from git
-rw-r--r--.SRCINFO19
-rw-r--r--.gitignore1
-rw-r--r--PKGBUILD34
3 files changed, 40 insertions, 14 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 4109baddecc..71f7ede5080 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,16 +1,23 @@
pkgbase = gopass-git
- pkgdesc = The team password manager. Written in Go.
- pkgver = git
+ pkgdesc = The slightly more awesome standard unix password manager for teams.
+ pkgver = r24.bddd1e0
pkgrel = 1
url = https://github.com/justwatchcom/gopass
arch = x86_64
+ arch = i686
+ arch = armv6h
+ arch = armv7h
license = MIT
- depends = xclip
+ makedepends = go>=1.7
+ makedepends = git
+ makedepends = make
depends = bash
+ depends = git
depends = gnupg
- provides = gopass=git
- source_x86_64 = gopass-1.0.0-1-x86_64.tar.xz::https://www.justwatch.com/gopass/releases/1.0.0/gopass-1.0.0-1-x86_64.pkg.tar.xz
- sha256sums_x86_64 = d1d012a80a7bfca02bc49bfb59fcf1f8f7f1ca2b61278d96d4b89cabbd65bb01
+ depends = xclip
+ provides = gopass=r24.bddd1e0
+ source = git://github.com/justwatchcom/gopass.git
+ sha256sums = SKIP
pkgname = gopass-git
diff --git a/.gitignore b/.gitignore
index 3c69db02679..79df7c20abd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
*.tar.xz
+/gopass/
/pkg/
/src/
/usr/bin/gopass
diff --git a/PKGBUILD b/PKGBUILD
index 06eafd333a4..cb44e8d4e67 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,19 +1,37 @@
# Maintainer: Matthias Loibl <mail at matthiasloibl dot com>
+_pkgname=gopass
+_gourl="github.com/justwatchcom"
pkgname=gopass-git
-pkgver=git
+pkgver=r24.bddd1e0
pkgrel=1
-pkgdesc="The team password manager. Written in Go."
-arch=('x86_64')
+pkgdesc="The slightly more awesome standard unix password manager for teams."
+arch=('x86_64' 'i686' 'armv6h' 'armv7h')
url="https://github.com/justwatchcom/gopass"
license=('MIT')
-depends=('xclip' 'bash' 'gnupg')
+depends=('bash' 'git' 'gnupg' 'xclip')
+makedepends=('go>=1.7' 'git' 'make')
provides=("gopass=${pkgver}")
+source=('git://github.com/justwatchcom/gopass.git')
+sha256sums=('SKIP')
-source_x86_64=("gopass-1.0.0-1-x86_64.tar.xz::https://www.justwatch.com/gopass/releases/1.0.0/gopass-1.0.0-1-x86_64.pkg.tar.xz")
-sha256sums_x86_64=('d1d012a80a7bfca02bc49bfb59fcf1f8f7f1ca2b61278d96d4b89cabbd65bb01')
+pkgver() {
+ cd "${srcdir}/${_pkgname}"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+build() {
+ mkdir -p "${srcdir}/go/src/${_gourl}/${_pkgname}"
+ mv "${srcdir}/${_pkgname}" "${srcdir}/go/src/${_gourl}"
+
+ export GOPATH="$srcdir/go"
+
+ cd ${srcdir}/go/src/${_gourl}/${_pkgname}
+ LDFLAGS='' make build
+}
package() {
- cd "$srcdir"
- install -Dm755 usr/bin/gopass "$pkgdir"/usr/bin/gopass
+ export GOOS=$(go version | cut -d' ' -f4 | cut -d'/' -f1)
+ export GOARCH=$(go version | cut -d' ' -f4 | cut -d'/' -f2)
+ install -Dm755 "${srcdir}/go/src/${_gourl}/${_pkgname}/${_pkgname}-${GOOS}-${GOARCH}" "${pkgdir}/usr/bin/${_pkgname}"
}