[arch-commits] Commit in (dbmate dbmate/repos dbmate/trunk dbmate/trunk/PKGBUILD)
George Rawlinson
grawlinson at gemini.archlinux.org
Sat Nov 6 07:09:19 UTC 2021
Date: Saturday, November 6, 2021 @ 07:09:18
Author: grawlinson
Revision: 1037423
addpkg: dbmate 1.12.1-2
Added:
dbmate/
dbmate/repos/
dbmate/trunk/
dbmate/trunk/PKGBUILD
----------+
PKGBUILD | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 61 insertions(+)
Added: dbmate/trunk/PKGBUILD
===================================================================
--- dbmate/trunk/PKGBUILD (rev 0)
+++ dbmate/trunk/PKGBUILD 2021-11-06 07:09:18 UTC (rev 1037423)
@@ -0,0 +1,61 @@
+# Maintainer: George Rawlinson <grawlinson at archlinux.org>
+# Contributor: Marco A Rojas <marco.rojas at zentek.com.mx>
+
+pkgname=dbmate
+pkgver=1.12.1
+pkgrel=2
+pkgdesc="A lightweight, framework-agnostic database migration tool"
+arch=('x86_64')
+url="https://github.com/amacneil/dbmate"
+license=('MIT')
+depends=('glibc')
+makedepends=('go' 'git')
+optdepends=(
+ 'mariadb: for local MariaDB instance'
+ 'postgresql: for local PostgreSQL instance'
+ 'sqlite: for local SQLite instance'
+)
+source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
+sha512sums=('2661bc995255c1ad54dacf987f8d5ed2d494aecd49bdf91be31d3c3b09a7a81cea11ca7b107cffc8593250becaa4bb96434357abf90cc551a5af8778af4790b3')
+b2sums=('d80a0757663e2e166cbc78c42a0cb3a713a27d045e57b199f10cc77bef1b19319a758ba1437c8132884008110674337842bc105e29ef8eaa2f5d754db8e9c08e')
+
+prepare() {
+ cd "$pkgname-$pkgver"
+
+ # create directory for build output
+ mkdir build
+
+ # download dependencies
+ go mod download
+}
+
+build() {
+ cd "$pkgname-$pkgver"
+
+ # set Go flags
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+
+ go build -v \
+ -trimpath \
+ -buildmode=pie \
+ -mod=readonly \
+ -modcacherw \
+ -ldflags "-linkmode external -extldflags ${LDFLAGS}" \
+ -o build \
+ .
+}
+
+package() {
+ cd "$pkgname-$pkgver"
+
+ # binary
+ install -vDm755 -t "$pkgdir/usr/bin" "build/$pkgname"
+
+ # documentation
+ install -vDm644 -t "$pkgdir/usr/share/doc/$pkgname" README.md
+
+ # license
+ install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
+}
More information about the arch-commits
mailing list