pkgbuild-powershell-bin

Command-line shell, an associated scripting language and a framework for processing cmdlets
git clone git://fossdaily.xyz/pkgbuild-powershell-bin
Log | Files | Refs

commit 8d0484bf98e1f60df2facca82628684c7e9d97cd
Author: caltlgin <contact@fossdaily.xyz>
Date:   Wed, 18 Nov 2020 17:07:56 +1300

Add to caltlgin repo

Diffstat:
A.SRCINFO | 22++++++++++++++++++++++
A.gitignore | 5+++++
APKGBUILD | 32++++++++++++++++++++++++++++++++
Apowershell.install | 11+++++++++++
4 files changed, 70 insertions(+), 0 deletions(-)

diff --git a/.SRCINFO b/.SRCINFO @@ -0,0 +1,22 @@ +pkgbase = powershell-bin + pkgdesc = Command-line shell, an associated scripting language and a framework for processing cmdlets + pkgver = 7.1.0 + pkgrel = 1 + url = https://microsoft.com/PowerShell + install = powershell.install + arch = x86_64 + license = MIT + depends = icu + depends = krb5 + depends = lttng-ust + depends = openssl-1.0 + depends = zlib + provides = powershell + conflicts = powershell + options = staticlibs + options = !strip + source = powershell-7.1.0.deb::https://github.com/PowerShell/PowerShell/releases/download/v7.1.0/powershell_7.1.0-1.ubuntu.20.04_amd64.deb + sha256sums = 09ac03bdcd7c74a36807beca62eb4ccfca690be1dc3936ed08a7b8f14fe0cff9 + +pkgname = powershell-bin + diff --git a/.gitignore b/.gitignore @@ -0,0 +1,5 @@ +* +!.gitignore +!.SRCINFO +!PKGBUILD +!powershell.install diff --git a/PKGBUILD b/PKGBUILD @@ -0,0 +1,32 @@ +# Maintainer: Caltlgin Stsodaat <contact@fossdaily.xyz> + +_name='pwsh' +_pkgname='powershell' +pkgname="${_pkgname}-bin" + +pkgver=7.1.0 +pkgrel=1 +_debver='ubuntu.20.04' + +pkgdesc='Command-line shell, an associated scripting language and a framework for processing cmdlets' +arch=('x86_64') +url='https://microsoft.com/PowerShell' +_url_source='https://github.com/PowerShell/PowerShell' +license=('MIT') +depends=('icu' 'krb5' 'lttng-ust' 'openssl-1.0' 'zlib') +options=('staticlibs' '!strip') +provides=("${_pkgname}") +conflicts=("${_pkgname}") +install=powershell.install +source=("${_pkgname}-${pkgver}.deb::${_url_source}/releases/download/v${pkgver}/${_pkgname}_${pkgver}-1.${_debver}_amd64.deb") +sha256sums=('09ac03bdcd7c74a36807beca62eb4ccfca690be1dc3936ed08a7b8f14fe0cff9') + +package() { + tar -xvf 'data.tar.gz' -C "${pkgdir}" + install -Dvm644 "${pkgdir}/usr/local/share/man/man1/${_name}.1.gz" -t "${pkgdir}/usr/share/man/man1" + rm -rf "${pkgdir}/usr/local" "${pkgdir}/usr/share/doc" + install -Dvm644 "${pkgdir}/opt/microsoft/${_pkgname}/${pkgver::1}/LICENSE.txt" \ + "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE" +} + +# vim: ts=2 sw=2 et: diff --git a/powershell.install b/powershell.install @@ -0,0 +1,11 @@ +post_install() { + grep -qe '^/usr/bin/pwsh$' 'etc/shells' || echo '/usr/bin/pwsh' >> 'etc/shells' +} + +post_upgrade() { + post_install +} + +pre_remove() { + sed -ri '\|^/usr/bin/pwsh$|d' 'etc/shells' +}