summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorXiretza2020-04-12 14:28:59 +0200
committerDavide Depau2020-04-14 00:14:25 +0200
commit7d871f56a730ffecbccef6b6ba99174ff6a9e2bc (patch)
treef87de7ac35269c7dda0fe4b8e7a89ea3e9b581a9 /PKGBUILD
parent8525588fa0e6b815ebc1b5db6b09bdc9d3b244d1 (diff)
downloadaur-3mux-git.tar.gz
Fix PKGBUILD
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD41
1 files changed, 17 insertions, 24 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 483ae1c6da1e..f6943bc43c4c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,4 +1,5 @@
# Maintainer: Davide Depau <davide@depau.eu>
+# Contributor: xiretza <xiretza+aur@gmail.com>
_pkgname=3mux
pkgname="${_pkgname}-git"
@@ -7,44 +8,36 @@ pkgrel=1
pkgdesc="Terminal multiplexer inspired by i3"
arch=('i686' 'x86_64' 'arm' 'armv7h' 'armv6h' 'aarch64' 'pentium4')
url="https://github.com/aaronjanse/3mux"
-_gopkg="github.com/aaronjanse/3mux"
+_gopkg="github.com/aaronjanse/$_pkgname"
license=('MIT')
-makedepends=(
- 'go'
-)
-source=(
- "${_pkgname}::git+${url}.git"
-)
-sha1sums=(
- SKIP
-)
+makedepends=('git' 'go-pie' 'golang-github-kr-pty' 'golang-golang-x-crypto')
+provides=('3mux')
+conflicts=('3mux')
+source=("${_pkgname}::git+https://$_gopkg.git")
+sha1sums=('SKIP')
pkgver() {
cd "$srcdir/$_pkgname"
- ( set -o pipefail
- git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
- printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
- )
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
-prepare(){
- cd "$srcdir/$_pkgname"
- go mod init "$_gopkg"
+prepare() {
+ mkdir -p "gopath/src/${_gopkg%/*}"
+ ln -rTsf "$_pkgname" "gopath/src/$_gopkg"
}
-
build() {
- cd "$srcdir/$_pkgname"
- export GOPATH="$srcdir/gopath"
+ export GOPATH="$srcdir/gopath:/usr/share/gocode"
+ cd "gopath/src/$_gopkg"
- go build \
+ go install \
-trimpath \
-ldflags "-extldflags ${LDFLAGS}"
}
package() {
+ install -Dm755 "gopath/bin/$_pkgname" "$pkgdir/usr/bin/$_pkgname"
+
cd "$srcdir/$_pkgname"
- install -Dm755 "$_pkgname" "$pkgdir/usr/bin/$_pkgname"
- install -dm755 "$pkgdir/usr/share/licenses/$pkgname"
- install -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}