1 # Maintainer: George Rawlinson <grawlinson@archlinux.org>
2 # Contributor: Alkindi42
7 pkgdesc='Compile SQL to type-safe Go'
11 depends=('glibc' 'gcc-libs')
12 makedepends=('git' 'go')
14 _commit='e4b1c1873690a5b1006436024f0e6c25166bed76'
15 source=("$pkgname::git+https://github.com/kyleconroy/sqlc.git#commit=$_commit")
21 git describe --tags | sed 's/^v//'
27 # create folder for build output
30 # download dependencies
31 export GOPATH="${srcdir}"
39 export CGO_CPPFLAGS="${CPPFLAGS}"
40 export CGO_CFLAGS="${CFLAGS}"
41 export CGO_CXXFLAGS="${CXXFLAGS}"
42 export GOPATH="${srcdir}"
49 -ldflags "-compressdwarf=false \
51 -extldflags ${LDFLAGS}" \
55 # generate shell completions
56 for sh in bash fish zsh; do
57 ./build/sqlc completion "$sh" > "build/$sh"
64 # skip internal/endtoend
65 rm -f internal/endtoend/endtoend_test.go
74 install -vDm755 -t "$pkgdir/usr/bin" build/sqlc
77 install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
80 install -vDm644 build/bash "$pkgdir/usr/share/bash-completion/completions/sqlc"
81 install -vDm644 build/fish "$pkgdir/usr/share/fish/vendor_completions.d/sqlc.fish"
82 install -vDm644 build/zsh "$pkgdir/usr/share/zsh/site-functions/_sqlc"