summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD40
1 files changed, 21 insertions, 19 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 6fc7ed3a5e14..2f76ef197a95 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,35 +1,37 @@
-# Maintainer: orhun <github.com/orhun>
+# Maintainer: orhun <orhunparmaksiz@gmail.com>
+# https://github.com/orhun/pkgbuilds
pkgname=pkgtop-git
-pkgdesc="Interactive package manager & resource monitor"
-pkgver=2.1.r1.gd56d840
+pkgdesc="Interactive package manager & resource monitor (git)"
+pkgver=2.5.1.r0.ga367254
pkgrel=1
-arch=('any')
+arch=('x86_64')
url="https://github.com/orhun/pkgtop"
license=('GPL3')
-depends=('git')
-makedepends=('go')
-provides=("${pkgname%-git}")
+depends=('glibc')
+makedepends=('git' 'go')
conflicts=("${pkgname%-git}")
-source=('git://github.com/orhun/pkgtop.git#branch=master')
+provides=("${pkgname%-git}")
+source=("git+$url")
sha256sums=('SKIP')
pkgver() {
- cd "$srcdir/${pkgname%-git}"
+ cd "${pkgname%-git}"
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
build() {
- cd "$srcdir/${pkgname%-git}/src"
- go get -d ./...
- go build \
- -gcflags "all=-trimpath=$PWD" \
- -asmflags "all=-trimpath=$PWD" \
- -ldflags "-extldflags $LDFLAGS" \
- -o "${pkgname%-git}" .
+ cd "${pkgname%-git}/cmd"
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+ export CGO_LDFLAGS="${LDFLAGS}"
+ export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
+ go build -o "${pkgname%-git}" .
}
package() {
- cd "$srcdir/${pkgname%-git}/src"
- install -Dm755 "${pkgname%-git}" "$pkgdir/usr/local/bin/${pkgname%-git}"
-} \ No newline at end of file
+ cd "${pkgname%-git}/cmd"
+ install -Dm 755 "${pkgname%-git}" -t "$pkgdir/usr/bin"
+ install -Dm 644 "../README.md" -t "$pkgdir/usr/share/doc/$pkgname"
+}