diff options
author | Bao Trinh | 2023-04-20 07:31:53 -0500 |
---|---|---|
committer | Bao Trinh | 2023-04-20 07:31:53 -0500 |
commit | 50a4b1b561b0a22e1d40e58847ef453697828773 (patch) | |
tree | 4d261540db68bf5a15e771ac106af4b528ecf421 | |
download | aur-dbshell.tar.gz |
init
-rw-r--r-- | .SRCINFO | 14 | ||||
-rw-r--r-- | PKGBUILD | 39 |
2 files changed, 53 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..7f88dfe0cbed --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,14 @@ +pkgbase = dbshell + pkgdesc = Multi-Database SQL Command Line Client + pkgver = 210311 + pkgrel = 1 + url = https://dbschema.com/documentation/dbshell.html + arch = any + license = Apache + makedepends = unzip + depends = java-runtime + depends = sh + source = https://dbschema.com/download/dbshell/dbshell_no_jre.tar.gz + sha256sums = 7f843ecc3cc308eef6ee9dac61fcfc35930bd26ca772856a6edc398f813b977b + +pkgname = dbshell diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..030a3223aa28 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,39 @@ +# Maintainer: Bao Trinh <qubidt at gmail dot com> + +pkgname=dbshell +pkgver=210311 +pkgrel=1 +pkgdesc="Multi-Database SQL Command Line Client" +arch=('any') +url="https://dbschema.com/documentation/dbshell.html" +license=('Apache') +depends=('java-runtime' 'sh') +makedepends=('unzip') +source=("https://dbschema.com/download/dbshell/dbshell_no_jre.tar.gz") +sha256sums=('7f843ecc3cc308eef6ee9dac61fcfc35930bd26ca772856a6edc398f813b977b') + +pkgver() { + cd "${pkgname}" + # appears to be date in YYMMDD format + unzip -p lib/dbshell.jar META-INF/MANIFEST.MF | + sed -En '/Implementation-Version:/{s/^Implementation-Version:\s*//;s/\r//g;p}' +} + +check() { + [[ -x "${pkgname}/dbshell" ]] + for f in ${pkgname}/drivers/*/*.jar; do + [[ -e "$f" ]] && continue + return 1 + done +} + +package() { + install -vdm755 "${pkgdir}/opt" + cp -favt "${pkgdir}/opt" "dbshell" + + cd "${pkgname}" + install -vdm755 "${pkgdir}/usr/bin" + ln -svT "/opt/dbshell/dbshell" "${pkgdir}/usr/bin/dbshell" + install -vDm644 -t "$pkgdir/usr/share/licenses/${pkgname}" "license/license.txt" + install -vDm644 -t "${pkgdir}/usr/share/doc/${pkgname}" "Readme.txt" +} |