# Maintainer: Karuna Murti pkgname=mssql-tools pkgver=18.2.1.1 pkgrel=1 pkgdesc="Microsoft® SQL Server® Tools for Linux" arch=('x86_64') url="https://www.microsoft.com/en-us/sql-server/sql-server-vnext-including-Linux" license=('custom') depends=('msodbcsql') options=('!strip') source=("https://packages.microsoft.com/rhel/8/prod/${pkgname}18-$pkgver-1.x86_64.rpm") sha512sums=('c33936e0e1e2c74d72e02682fafa39d821352ae2783c8c580bdd96261628bacc7c90a12335ce09e65ce924024347e458189e3146a460575df9e8355b406227a5') package() { cd "$srcdir" mv usr/share/{doc,licenses} mv usr/share/licenses/{${pkgname}18,$pkgname} mv opt/{${pkgname}18,$pkgname} mv usr opt "$pkgdir" install -dm755 "$pkgdir"/usr/bin/ cd "$pkgdir"/opt/$pkgname/bin for bin in *; do ln -s ../../opt/$pkgname/bin/"$bin" "$pkgdir"/usr/bin/"$bin" done }