|
From 51a01c152597abaa8a84c8d9c7ac6c86d267e5b3 Mon Sep 17 00:00:00 2001 |
|
From: Joost Bremmer <contact@madeofmagicandwires.online> |
|
Date: Mon, 21 Oct 2019 19:06:41 +0200 |
|
Subject: [PATCH] Update pkgbuild to version 3.0.0 |
|
|
|
Signed-off-by: Joost Bremmer <contact@madeofmagicandwires.online> |
|
--- |
|
.SRCINFO | 18 ++++++--------- |
|
PKGBUILD | 67 +++++++++++++++++++++++++++++++++++++++++++------------- |
|
2 files changed, 59 insertions(+), 26 deletions(-) |
|
|
|
diff --git a/.SRCINFO b/.SRCINFO |
|
index 8bfce7b..0f176e9 100644 |
|
--- a/.SRCINFO |
|
+++ b/.SRCINFO |
|
@@ -1,22 +1,18 @@ |
|
-# Generated by mksrcinfo v8 |
|
-# Wed Jan 30 10:02:34 UTC 2019 |
|
pkgbase = cheat-git |
|
pkgdesc = Cheat allows you to create and view interactive cheatsheets on the command-line |
|
- pkgver = 2.4.2 |
|
+ pkgver = 3.0.0 |
|
pkgrel = 1 |
|
url = https://github.com/chrisallenlane/cheat |
|
- arch = any |
|
+ arch = x86_64 |
|
license = GPL3 |
|
makedepends = git |
|
- makedepends = python-setuptools |
|
- depends = python2 |
|
- depends = python2-docopt |
|
- optdepends = python2-pygments |
|
- optdepends = bash-completion |
|
- optdepends = zsh-completions |
|
- optdepends = fish |
|
+ makedepends = go-pie |
|
+ optdepends = fzf: For Fuzzy Finder intergration |
|
+ optdepends = bash: for Fuzzy Finder intergration |
|
+ provides = cheat |
|
conflicts = cheat-bash-git |
|
conflicts = python-cheat |
|
+ conflicts = cheat |
|
source = cheat-git::git+https://github.com/chrisallenlane/cheat.git |
|
md5sums = SKIP |
|
|
|
diff --git a/PKGBUILD b/PKGBUILD |
|
index faaaa8d..fa942f5 100644 |
|
--- a/PKGBUILD |
|
+++ b/PKGBUILD |
|
@@ -1,34 +1,71 @@ |
|
# Maintainer: Alexandr Skurikhin <askurihin@gmail.com> |
|
-# Maintainer: Robert Orzanna <orschiro@gmail.com> |
|
-# Maintainer: Quan Guo < guotsuan@gmail.com> |
|
+# Contributor: Joost Bremmer <contact@madeofmagicandwires.online> |
|
+# Contributor: Robert Orzanna <orschiro@gmail.com> |
|
+# Contributor: Quan Guo < guotsuan@gmail.com> |
|
|
|
pkgname=cheat-git |
|
_gitname=cheat |
|
-pkgver=2.4.2 |
|
+pkgver=3.0.0 |
|
pkgrel=1 |
|
pkgdesc="Cheat allows you to create and view interactive cheatsheets on the command-line" |
|
-arch=('any') |
|
+arch=('x86_64') |
|
license=('GPL3') |
|
url="https://github.com/chrisallenlane/cheat" |
|
-depends=('python2' 'python2-docopt') |
|
-optdepends=('python2-pygments' 'bash-completion' 'zsh-completions' 'fish') |
|
-makedepends=('git' 'python-setuptools') |
|
-conflicts=('cheat-bash-git' 'python-cheat') |
|
+optdepends=('fzf: For Fuzzy Finder intergration' |
|
+ 'bash: for Fuzzy Finder intergration') |
|
+makedepends=('git' 'go-pie') |
|
+conflicts=('cheat-bash-git' 'python-cheat' 'cheat') |
|
+provides=('cheat') |
|
source=("$pkgname::git+https://github.com/chrisallenlane/cheat.git") |
|
md5sums=('SKIP') |
|
|
|
- |
|
pkgver() { |
|
cd $pkgname |
|
git describe | sed 's/^v//;s/-/./g' |
|
} |
|
|
|
+prepare() { |
|
+ cd "$srcdir" |
|
+ |
|
+ # create gopath |
|
+ mkdir -p "${srcdir}/gopath/src/github.com/${_gitname}" |
|
+ ln -rTsf "${pkgname}" "${srcdir}/gopath/src/github.com/${_gitname}/${_gitname}" |
|
+ export GOPATH="${srcdir}/gopath" |
|
+ |
|
+ # fetch dependencies |
|
+ msg "Fetching Go dependencies" |
|
+ go get -u -d -v github.com/alecthomas/chroma |
|
+ go get -u -d -v github.com/davecgh/go-spew/spew |
|
+ go get -u -d -v github.com/danwakefield/fnmatch |
|
+ go get -u -d -v github.com/docopt/docopt-go |
|
+ go get -u -d -v github.com/mgutz/ansi |
|
+ go get -u -d -v github.com/mitchellh/go-homedir |
|
+ go get -u -d -v github.com/tj/front |
|
+ go get -u -d -v gopkg.in/yaml.v2 |
|
+} |
|
+ |
|
+build() { |
|
+ cd "${srcdir}/${pkgname}" |
|
+ go clean "./cmd/cheat" |
|
+ go generate "./cmd/cheat" |
|
+ GOOS=linux \ |
|
+ GOARCH=amd64 go build \ |
|
+ -v \ |
|
+ -trimpath \ |
|
+ -gcflags "all=-trimpath=${srcdir}" \ |
|
+ -asmflags "all=-trimpath=${srcdir}" \ |
|
+ -ldflags "-extldflags ${LDFLAGS}" \ |
|
+ -o "./dist/cheat" ./cmd/cheat |
|
+} |
|
+ |
|
package(){ |
|
- cd "$pkgname" |
|
- python2 setup.py install --root=$pkgdir --optimize=1 |
|
- install -dm755 ${pkgdir}/usr/share/{bash-completion/completions/,zsh/site-functions,fish/completions} |
|
- install -m 644 ${srcdir}/$pkgname/cheat/autocompletion/cheat.bash $pkgdir/usr/share/bash-completion/completions/ |
|
- install -m 644 "$srcdir/$pkgname/$_gitname/autocompletion/cheat.zsh" "$pkgdir/usr/share/zsh/site-functions/$_gitname" |
|
- install -m 644 "$srcdir/$pkgname/$_gitname/autocompletion/cheat.fish" "$pkgdir/usr/share/fish/completions/$_gitname" |
|
+ install -Dm755 "${srcdir}/${pkgname}/dist/cheat" "${pkgdir}/usr/bin/cheat" |
|
+ install -Dm755 "$srcdir/${pkgname}/scripts/fzf.bash" \ |
|
+ "${pkgdir}/usr/share/${pkgname}/fzf.bash" |
|
+ # Install autocompletion once it becomes available |
|
+ install -Dm644 "$srcdir/${pkgname}/configs/conf.yml" \ |
|
+ "${pkgdir}/usr/share/docs/${pkgname}/conf.yml" |
|
+ # Install LICENSE file once it becomes available |
|
} |
|
|
|
+# vim: set ts=2 sts=2 sw=2 et : |
|
-- |
|
2.23.0 |