summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorAdrian Petrescu2020-03-17 17:10:15 -0400
committerAdrian Petrescu2020-03-17 17:10:15 -0400
commita6041cf1b5f55afd813e4f4731f800e555df3524 (patch)
tree93d7d3cc5a084ac323227ce6950ce2818ff871bb /PKGBUILD
parentc1e140308c48b70a5c62114b70ce7d177fe3680d (diff)
downloadaur-a6041cf1b5f55afd813e4f4731f800e555df3524.tar.gz
pkgrel 2: some PKGBUILD improvements
Thanks to pfischbeck for the suggestions :)
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD22
1 files changed, 10 insertions, 12 deletions
diff --git a/PKGBUILD b/PKGBUILD
index f9b1b5ebbfb2..7adca0b25398 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,34 +2,32 @@
pkgname=cf-tool
pkgver=1.0.0
-pkgrel=1
+pkgrel=2
pkgdesc="A command-line tool for Codeforces contests"
arch=('x86_64')
url="https://github.com/xalanq/cf-tool"
license=('MIT')
depends=('glibc')
-makedepends=('go-pie' 'git')
+makedepends=('go-pie')
source=("$pkgname-$pkgver.tar.gz::https://github.com/xalanq/cf-tool/archive/v$pkgver.tar.gz")
sha512sums=('5800f79c391d82a8cfd1649c1833d1e1d89f4113beefc6bbbd97e8c4bff48add427b4038d9113cb287d5549c61609e10ee4c06c6e3d3d38ad2b8eea59a903bb3')
prepare() {
- cd $pkgname-$pkgver
-
- mkdir -p .gopath/src/github.com/xalanq
- ln -sf "$PWD" .gopath/src/github.com/xalanq/cf-tool
+ mkdir -p gopath/src/github.com/xalanq
+ ln -rTsf "$pkgname-$pkgver" gopath/src/github.com/xalanq/cf-tool
export GOPATH="$PWD/.gopath"
-
- go get github.com/xalanq/cf-tool
+ cd gopath/src/github.com/xalanq/cf-tool
}
build() {
- cd $pkgname-$pkgver/.gopath/src/github.com/xalanq/cf-tool
+ export GOPATH="$srcdir"/gopath
+ cd gopath/src/github.com/xalanq/cf-tool
- go build -o cf -trimpath -ldflags "-s -w" cf.go
+ go build -o cf -trimpath -ldflags "-s -w -extldflags $LDFLAGS" cf.go
}
package() {
cd $pkgname-$pkgver
-
- install -Dm755 cf "$pkgdir"/usr/bin/cf
+ install -Dm755 cf "$pkgdir/usr/bin/cf"
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}