summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authoryochananmarqos2019-09-27 08:06:15 -0600
committeryochananmarqos2019-09-27 08:06:15 -0600
commit480bfc961f15b0b5cea16a020b752db35c2ce0df (patch)
treecc5ea1b759b980e311c0bfce072726597eae68a6
parentc0c0a5db3ace179589a1f5dbb6f6412f51d396e9 (diff)
downloadaur-480bfc961f15b0b5cea16a020b752db35c2ce0df.tar.gz
rewrite according to package guidelines
-rw-r--r--.SRCINFO5
-rw-r--r--PKGBUILD33
2 files changed, 24 insertions, 14 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 7f2d5d034bd..5782dfec585 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,11 +1,12 @@
pkgbase = tldr++
pkgdesc = Community driven man pages improved with smart user interaction
pkgver = 0.6.1
- pkgrel = 1
+ pkgrel = 2
url = https://isacikgoz.me/tldr
arch = any
license = MIT
- makedepends = go
+ makedepends = go-pie
+ makedepends = dep
provides = tldr
conflicts = tldr
conflicts = tldr-bash
diff --git a/PKGBUILD b/PKGBUILD
index 5b6a3aae771..2c7ec1ee809 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,26 +1,35 @@
# Maintainer: Mark Wagie <yochanan dot marqos at gmail dot com>
pkgname=tldr++
-_gitname=tldr
pkgver=0.6.1
-pkgrel=1
+pkgrel=2
pkgdesc="Community driven man pages improved with smart user interaction"
arch=('any')
url="https://isacikgoz.me/tldr"
license=('MIT')
-makedepends=('go')
-provides=("$_gitname")
-conflicts=("$_gitname" 'tldr-bash' 'nodejs-tldr' 'tldr-python-client')
-source=("$pkgname-$pkgver.tar.gz"::"https://github.com/isacikgoz/$_gitname/archive/v$pkgver.tar.gz")
+makedepends=('go-pie' 'dep')
+provides=("${pkgname%++}")
+conflicts=("${pkgname%++}" 'tldr-bash' 'nodejs-tldr' 'tldr-python-client')
+source=("$pkgname-$pkgver.tar.gz"::"https://github.com/isacikgoz/tldr/archive/v$pkgver.tar.gz")
sha256sums=('e377942c6dd9cbe3f9f55b7614e17b7c5f0694b326ad3993d0cde59aca8dc8fa')
+prepare() {
+ mkdir -p gopath/src/github.com/isacikgoz
+ ln -rTsf "${pkgname%++}-$pkgver" "gopath/src/github.com/isacikgoz/${pkgname%++}"
+ export GOPATH="$srcdir"/gopath
+
+ cd "gopath/src/github.com/isacikgoz/${pkgname%++}"
+ dep init
+ dep ensure
+}
+
+
build() {
- cd "$_gitname-$pkgver"
- go get -u "github.com/isacikgoz/$_gitname"
- go build
+ export GOPATH="$srcdir"/gopath
+ cd "gopath/src/github.com/isacikgoz/${pkgname%++}"
+ go install -v
}
package() {
- cd "$_gitname-$pkgver"
- install -Dm755 "$_gitname-$pkgver" "$pkgdir/usr/bin/$_gitname"
- install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ install -Dm755 "$srcdir/gopath/bin/${pkgname%++}" "$pkgdir/usr/bin/${pkgname%++}"
+ install -Dm644 "${pkgname%++}-$pkgver/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}