[arch-commits] Commit in dbmate/repos (community-x86_64 community-x86_64/PKGBUILD)

George Rawlinson grawlinson at gemini.archlinux.org
Sat Nov 6 07:10:55 UTC 2021


    Date: Saturday, November 6, 2021 @ 07:10:55
  Author: grawlinson
Revision: 1037424

archrelease: copy trunk to community-x86_64

Added:
  dbmate/repos/community-x86_64/
  dbmate/repos/community-x86_64/PKGBUILD
    (from rev 1037423, dbmate/trunk/PKGBUILD)

----------+
 PKGBUILD |   61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 61 insertions(+)

Copied: dbmate/repos/community-x86_64/PKGBUILD (from rev 1037423, dbmate/trunk/PKGBUILD)
===================================================================
--- community-x86_64/PKGBUILD	                        (rev 0)
+++ community-x86_64/PKGBUILD	2021-11-06 07:10:55 UTC (rev 1037424)
@@ -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