summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorethandbaker2020-10-16 20:35:32 +0000
committerethandbaker2020-10-16 20:35:32 +0000
commit1508bf80c01ba1be46a930c4e64c5e19eaa17ac7 (patch)
treea7f47f1947037fed4d73da0b1ca4ab1521f63754 /PKGBUILD
parentbdaab172ef0c1415d0ef5fc7841cedd2d99a6677 (diff)
downloadaur-1508bf80c01ba1be46a930c4e64c5e19eaa17ac7.tar.gz
Revisons with pkgver function, tar download, and checksums
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD22
1 files changed, 11 insertions, 11 deletions
diff --git a/PKGBUILD b/PKGBUILD
index c809f8f69d08..84084093fb56 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,22 +6,17 @@ pkgdesc="Extensive color picker in the terminal."
arch=('x86_64')
url="https://gitlab.com/ethanbakerdev/cpick"
license=('Apache')
-makedepends=('git' 'go')
-source=("git+https://gitlab.com/ethanbakerdev/cpick.git#tag=$pkgver")
-sha256sums=('SKIP')
-
-pkgver() {
- cd "$pkgname"
- git describe --long | sed -r 's/-(.*)//'
-}
+makedepends=('go')
+source=("$url/-/archive/$pkgver/cpick-$pkgver.tar.gz")
+sha256sums=('a35040101c802d932ebf60d3db7d0d3ef61c9898af06e98b027096bc0cd19036')
prepare() {
- cd "$pkgname"
+ cd "$pkgname-$pkgver"
mkdir -p build/
}
build() {
- cd "$pkgname"
+ cd "$pkgname-$pkgver"
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
@@ -30,8 +25,13 @@ build() {
go build -o build ./cmd/...
}
+check() {
+ cd "$pkgname-$pkgver"
+ go test ./...
+}
+
package() {
- cd "$pkgname"
+ cd "$pkgname-$pkgver"
install -Dm755 build/cpick "$pkgdir"/usr/bin/"$pkgname"
install -Dm644 README.md -t "$pkgdir"/usr/share/doc/"$pkgname"
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/"$pkgname"/LICENSE