blob: 8dfa7a5f4e6a41d6c2c1e7758a0faa4683928b47 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
# Maintainer: Jerry Y. Chen <chen@jyny.dev>
pkgname=atlas-git
pkgdesc="A modern tool for managing database schemas"
pkgver=0.28.0
pkgrel=1
binary=atlas
arch=("x86_64")
makedepends=("go")
license=("Apache-2.0")
provides=('atlas')
conflicts=('atlas')
url="https://github.com/ariga/${binary}"
source=(
"${binary}-${pkgver}.tar.gz::https://github.com/ariga/${binary}/archive/v${pkgver}.tar.gz"
)
sha256sums=('e93a3e60b7cff098645e0f2c619c5957ab52c2ab7c9bf52fafdc723c7e5ae861')
b2sums=('138f658ecb3c5e280cfd31e7804e6e8894e5ff59f7e1bd73e72e97db9202fdac53bb0ad486b1a734ad9f95a8798b47bd8ce548d124e97fe9de59b7b7ff2d1341')
prepare() {
cd "${srcdir}/${binary}-${pkgver}"
}
build() {
export GOPATH="${srcdir}/.go"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw -x -v"
cd "${srcdir}/${binary}-${pkgver}/cmd/${binary}"
go build -ldflags "-X 'ariga.io/atlas/cmd/atlas/internal/cmdapi.version=v${pkgver}'" .
go clean -x -modcache
}
package() {
install -Dm755 "${srcdir}/${binary}-${pkgver}/cmd/${binary}/${binary}" "${pkgdir}/usr/bin/${binary}"
}
|