dev-db/sqlcmd: new package, add 1.7.0

Signed-off-by: Jonas Frei <freijon@pm.me>
This commit is contained in:
Jonas Frei 2024-06-15 09:14:24 +02:00
parent 2932a8031d
commit 2cb0c231ed
No known key found for this signature in database
GPG Key ID: F8C5C87BDD1E28A8
3 changed files with 57 additions and 0 deletions

2
dev-db/sqlcmd/Manifest Normal file
View File

@ -0,0 +1,2 @@
DIST sqlcmd-1.7.0-deps.tar.xz 50175352 BLAKE2B 703d6c1e5b3013cc4dae98b89d0afe2db695d3e8b57e42ae452bcb351d12825655909284a99592f96165c6b18ffab90060b76b3db075f5417407cb795bfbebf1 SHA512 a69ac0f1b340e652f61a610f7ae72dd2097603fbdb9ce8e97cd9c471170955aa9dcc582b57f541b29799ebc82a65510c9709f5e7700d4a83d80f93106c8ec570
DIST sqlcmd-1.7.0.tar.gz 1046900 BLAKE2B 1dfe1df4cd37cb951b0801d44db1407ad40166925223bf64d27bc73d5e1acfa204d4bc65faf486ad3856110c2b45a652a6762fa8b7e7606f001b5a6dc12f65db SHA512 86ccf8a48c858bdf52353cc124957db76377c948c86f8200609db4c00c280e8bbd0b540ca8744174ed715ee7ca4abb974307413ff1d02a49eed1acaa7deeb59f

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<name>Jonas Frei</name>
<email>freijon@pm.me</email>
</maintainer>
<upstream>
<remote-id type="github">microsoft/go-sqlcmd</remote-id>
<bugs-to>https://github.com/microsoft/go-sqlcmd/issues</bugs-to>
</upstream>
</pkgmetadata>

View File

@ -0,0 +1,43 @@
# Copyright 2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit go-module shell-completion
DESCRIPTION="The MSSQL SQLCMD CLI tool"
HOMEPAGE="https://learn.microsoft.com/sql/tools/sqlcmd/go-sqlcmd-utility"
SRC_URI="https://github.com/microsoft/go-${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
# Using a dependency tarball as per https://devmanual.gentoo.org/eclass-reference/go-module.eclass/index.html
DEPS_URI="https://gitlab.com/freijon_gentoo/${CATEGORY}/${PN}/-/raw/main/${P}-deps.tar.xz"
SRC_URI+=" ${DEPS_URI}"
S="${WORKDIR}/go-${P}"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"
DOCS=(
"README.md"
"SECURITY.md"
)
src_compile() {
ego build -o "${PN}" -ldflags="-X main.version=${PV}" ./cmd/modern
}
src_install() {
dobin "${PN}"
mkdir "completions" || die
./sqlcmd completion bash > "completions/${PN}" || die
./sqlcmd completion fish > "completions/${PN}.fish" || die
./sqlcmd completion zsh > "completions/_${PN}" || die
dobashcomp "completions/${PN}"
dofishcomp "completions/${PN}.fish"
dozshcomp "completions/_${PN}"
einstalldocs
}