summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a2b057a547beb3ba2f6b240d1eef3c13b214ed5e (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
41
42
43
44
45
# Maintainer: a821
# Contributor: Matthias Loibl <mail at matthiasloibl dot com>
# Contributor: Morten Linderud <foxboron archlinux.org>

pkgname=gopass-git
pkgver=1.10.1.r32.g93539afc
pkgrel=2
pkgdesc="The slightly more awesome standard unix password manager for teams."
arch=('x86_64' 'i686' 'armv6h' 'armv7h')
url="https://github.com/gopasspw/gopass"
license=('MIT')
makedepends=('go' 'git')
optdepends=('xdotool: for typing passwords selected by dmenu'
            'xsel: clipboard support'
            'xclip: clipboard support')
provides=("gopass")
conflicts=("gopass")
source=("git+${url}")
sha256sums=('SKIP')

pkgver() {
  cd gopass
  git describe --long --tags | sed -e 's/^v//;s/-/.r/;s/-/./g'
}

prepare() {
  cd gopass
  sed -i 's|-gcflags="-trimpath=$(GOPATH)" -asmflags="-trimpath=$(GOPATH)"||' Makefile
}

build() {
  cd gopass
  export CGO_CPPFLAGS="${CPPFLAGS}"
  export CGO_CFLAGS="${CFLAGS}"
  export CGO_CXXFLAGS="${CXXFLAGS}"
  export CGO_LDFLAGS="${LDFLAGS}"
  export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
  make
}

package() {
  cd gopass
  make DESTDIR="${pkgdir}" PREFIX="/usr" install
  install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}