summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorhaawda2018-08-31 18:35:10 +0200
committerhaawda2018-08-31 18:35:10 +0200
commitf03956796ffd41966c9e7ab5aa24027b11429551 (patch)
treefd49d09aac8e2bd1a47cdf98bc2b0154b82992a9
parent6e85b964f63883996280a869243e9fbbc1c7d15c (diff)
downloadaur-f03956796ffd41966c9e7ab5aa24027b11429551.tar.gz
simplify PKGBUILD
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD68
2 files changed, 11 insertions, 63 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1adbfd7c6fe4..2354aae4cdf0 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,15 @@
pkgbase = slit
pkgdesc = A modern PAGER for viewing logs, get more than most in less time. Written in Go
pkgver = 1.2.0
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/tigrawap/slit
arch = x86_64
arch = i686
license = MIT
- makedepends = go
+ makedepends = go-pie
makedepends = git
+ depends = glibc
options = !strip
- options = !emptydirs
source = git+https://github.com/tigrawap/slit#commit=f1d770e
md5sums = SKIP
diff --git a/PKGBUILD b/PKGBUILD
index f4ebd4f2691f..e1f369074a60 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,13 +2,14 @@
pkgname=slit
pkgver=1.2.0
-pkgrel=1
+pkgrel=2
pkgdesc="A modern PAGER for viewing logs, get more than most in less time. Written in Go"
arch=('x86_64' 'i686')
url="https://github.com/tigrawap/slit"
license=('MIT')
-makedepends=('go' 'git')
-options=('!strip' '!emptydirs')
+depends=('glibc')
+makedepends=('go-pie' 'git')
+options=('!strip')
source=("git+https://github.com/tigrawap/slit#commit=f1d770e")
md5sums=('SKIP')
_gourl=github.com/tigrawap/slit
@@ -19,64 +20,11 @@ pkgver() {
}
build() {
- export GOROOT=/usr/lib/go
- export GOFLAGS='-gcflags "all=-trimpath=${GOPATH}" -asmflags "all=-trimpath=${GOPATH}"'
- [[ -d build ]] && rm -rf build
- mkdir -p build/go
- cd build/go
-
- for f in "$GOROOT/"*; do
- ln -s "$f"
- done
-
- rm pkg
- mkdir pkg
- cd pkg
-
- for f in "$GOROOT/pkg/"*; do
- ln -s "$f"
- done
-
- platform=`for f in "$GOROOT/pkg/"*; do echo \`basename $f\`; done|grep linux`
-
- rm -f "$platform"
- mkdir "$platform"
- cd "$platform"
-
- for f in "$GOROOT/pkg/$platform/"*.h; do
- ln -s "$f"
- done
-
- export GOROOT="$srcdir/build/go"
- export GOPATH="$srcdir/build"
-
- go get -fix "$_gourl"
-
- # Prepare executable
- if [ -d "$srcdir/build/src" ]; then
- cd "$srcdir/build/src/$_gourl"
- go build -o "$srcdir/build/$pkgname"
- else
- echo 'Old sources for a previous version of this package are already present!'
- echo 'Build in a chroot or uninstall the previous version.'
- return 1
- fi
+ cd "$pkgname"
+ go build $_gourl/cmd/slit
}
package() {
- export GOROOT="$GOPATH"
-
- # Package license (if available)
- for f in LICENSE COPYING; do
- if [ -e "$srcdir/build/src/$_gourl/$f" ]; then
- install -Dm644 "$srcdir/build/src/$_gourl/$f" \
- "$pkgdir/usr/share/licenses/$pkgname/$f"
- fi
- done
-
- # Package executables
- if [ -e "$srcdir/build/$pkgname" ]; then
- install -Dm755 "$srcdir/build/$pkgname" \
- "$pkgdir/usr/bin/$pkgname"
- fi
+ install -Dm644 "$srcdir"/$pkgname/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+ install -Dm755 "$srcdir"/$pkgname/$pkgname "$pkgdir"/usr/bin/$pkgname
}