summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Bulmer2019-09-22 17:51:53 +0100
committerJames Bulmer2019-09-22 17:51:53 +0100
commit7f7f82d11505c34ab8a903bf6448d15fc290a92a (patch)
treefb7b72e213fe731c9b99fd85cd90a715f6a8d4bf
parent20dbedbc13d1b07a23f2835020e29704fc7a4bc3 (diff)
downloadaur-7f7f82d11505c34ab8a903bf6448d15fc290a92a.tar.gz
moving away from prebuilt binary
-rw-r--r--.SRCINFO10
-rw-r--r--PKGBUILD14
2 files changed, 15 insertions, 9 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 33ae9abe5318..c196e9e64da3 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,12 +1,12 @@
pkgbase = migrate
- pkgdesc = Database migration handling in Golang
+ pkgdesc = Database migration handling
pkgver = 4.6.2
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/golang-migrate/migrate
arch = x86_64
license = MIT
- source_x86_64 = https://github.com/golang-migrate/migrate/releases/download/v4.6.2/migrate.linux-amd64.tar.gz
- sha256sums_x86_64 = bf68db05bf8490c7960dc6ce5d2e60462a42baec207859282e8663f447ab31dd
+ makedepends = go
+ source = migrate-4.6.2.tar.gz::https://github.com/golang-migrate/migrate/archive/v4.6.2.tar.gz
+ sha256sums = f7f07e240bc2d0afbcafc83f46eef0136ceb678ced4ece87ed619e901993c569
pkgname = migrate
-
diff --git a/PKGBUILD b/PKGBUILD
index b04b7544f2c4..4c2cbf406c34 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,15 +4,21 @@
pkgname=migrate
pkgver=4.6.2
-pkgrel=1
+pkgrel=2
pkgdesc="Database migration handling"
url="https://github.com/golang-migrate/migrate"
arch=("x86_64")
license=("MIT")
-source_x86_64=("https://github.com/golang-migrate/migrate/releases/download/v${pkgver}/migrate.linux-amd64.tar.gz")
-sha256sums_x86_64=("bf68db05bf8490c7960dc6ce5d2e60462a42baec207859282e8663f447ab31dd")
+source=("$pkgname-$pkgver.tar.gz::https://github.com/golang-migrate/migrate/archive/v$pkgver.tar.gz")
+sha256sums=("f7f07e240bc2d0afbcafc83f46eef0136ceb678ced4ece87ed619e901993c569")
+makedepends=("go")
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make build-cli VERSION=$pkgver
+}
package() {
install -d "${pkgdir}/usr/bin"
- mv "${srcdir}/migrate.linux-amd64" "${pkgdir}/usr/bin/migrate"
+ mv "$srcdir/$pkgname-$pkgver/cli/build/$pkgname.linux-amd64" "$pkgdir/usr/bin/$pkgname"
}