summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarl Smedstad2022-05-27 14:22:30 +0200
committerCarl Smedstad2022-05-27 14:22:30 +0200
commit2d612c676123cd4a25634a1e80666c7456935b53 (patch)
treedd22af16a363f2bce9537a236cf01bfc4d393f4e
parent1d254a97ad11d9e558f6f2f6cca59c7181198c60 (diff)
downloadaur-2d612c676123cd4a25634a1e80666c7456935b53.tar.gz
Publish pkgver 2: Use tar.gz sources to enable more architectures
-rw-r--r--.SRCINFO13
-rw-r--r--PKGBUILD35
2 files changed, 37 insertions, 11 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 21e725ae4389..e41f3d5885cd 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,10 +1,12 @@
pkgbase = powershell-bin
pkgdesc = A cross-platform automation and configuration tool/framework (binary package)
pkgver = 7.2.4
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/Powershell/Powershell
install = powershell.install
arch = x86_64
+ arch = armv7h
+ arch = aarch64
license = MIT
depends = krb5
depends = gcc-libs
@@ -14,9 +16,14 @@ pkgbase = powershell-bin
depends = icu
provides = powershell
conflicts = powershell
+ noextract = powershell-bin-7.2.4-2.tar.gz
options = staticlibs
options = !strip
- source = https://github.com/PowerShell/PowerShell/releases/download/v7.2.4/powershell_7.2.4-1.deb_amd64.deb
- sha256sums = 7e764b26ba87196e78dec20665e166eee536d117deb91562a6e4ccf75cc1b6e8
+ source_x86_64 = powershell-bin-7.2.4-2.tar.gz::https://github.com/Powershell/Powershell/releases/download/v7.2.4/powershell-7.2.4-linux-x64.tar.gz
+ sha256sums_x86_64 = 935b874a2e5f5662ab23efbe7392dc96c27d4fd064041d28a25a487ec5f6cc2e
+ source_armv7h = powershell-bin-7.2.4-2.tar.gz::https://github.com/Powershell/Powershell/releases/download/v7.2.4/powershell-7.2.4-linux-arm32.tar.gz
+ sha256sums_armv7h = 32e5675b0eefc30c9d42505565d398cbcbdd0941fbf2aa54a1f6afdae5b4c077
+ source_aarch64 = powershell-bin-7.2.4-2.tar.gz::https://github.com/Powershell/Powershell/releases/download/v7.2.4/powershell-7.2.4-linux-arm64.tar.gz
+ sha256sums_aarch64 = 00e09f1d4aa24dda76943b0f46aa5175b8ea0556827acd91ea0046ab91fc30ac
pkgname = powershell-bin
diff --git a/PKGBUILD b/PKGBUILD
index 66d9d252e971..9ab8c24a45c4 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,9 +4,9 @@
pkgname=powershell-bin
pkgver=7.2.4
-pkgrel=1
+pkgrel=2
pkgdesc='A cross-platform automation and configuration tool/framework (binary package)'
-arch=('x86_64')
+arch=('x86_64' 'armv7h' 'aarch64')
url='https://github.com/Powershell/Powershell'
license=('MIT')
depends=('krb5' 'gcc-libs' 'glibc' 'lttng-ust' 'zlib' 'icu')
@@ -15,13 +15,32 @@ conflicts=('powershell')
options=(staticlibs !strip)
install=powershell.install
-sha256sums=('7e764b26ba87196e78dec20665e166eee536d117deb91562a6e4ccf75cc1b6e8')
-source=("https://github.com/PowerShell/PowerShell/releases/download/v${pkgver}/powershell_${pkgver}-1.deb_amd64.deb")
+_artifact="${pkgname}-${pkgver}-${pkgrel}.tar.gz"
+source_armv7h=("${_artifact}::${url}/releases/download/v${pkgver}/powershell-${pkgver}-linux-arm32.tar.gz")
+source_aarch64=("${_artifact}::${url}/releases/download/v${pkgver}/powershell-${pkgver}-linux-arm64.tar.gz")
+source_x86_64=("${_artifact}::${url}/releases/download/v${pkgver}/powershell-${pkgver}-linux-x64.tar.gz")
+noextract=("$_artifact")
+
+sha256sums_x86_64=('935b874a2e5f5662ab23efbe7392dc96c27d4fd064041d28a25a487ec5f6cc2e')
+sha256sums_armv7h=('32e5675b0eefc30c9d42505565d398cbcbdd0941fbf2aa54a1f6afdae5b4c077')
+sha256sums_aarch64=('00e09f1d4aa24dda76943b0f46aa5175b8ea0556827acd91ea0046ab91fc30ac')
+
+prepare() {
+ mkdir -p ${pkgname}-${pkgver}-${pkgrel}
+ tar -xf $_artifact -C ${pkgname}-${pkgver}-${pkgrel}
+}
package() {
- tar xf "${srcdir}/data.tar.gz" -C "${pkgdir}"
+ cd ${pkgname}-${pkgver}-${pkgrel}
+
+ for path in $(find $(pwd) -type f); do
+ path_rel=$(realpath --relative-to=$(pwd) "$path")
+ install -Dm644 "${path_rel}" "${pkgdir}/opt/microsoft/powershell/7/${path_rel}"
+ done
+
+ chmod 755 "${pkgdir}/opt/microsoft/powershell/7/pwsh"
+ mkdir -p "${pkgdir}/usr/bin/"
+ ln -s /opt/microsoft/powershell/7/pwsh "${pkgdir}/usr/bin/pwsh"
- mv "${pkgdir}/usr/local/share/man" "${pkgdir}/usr/share/"
- rm -r "${pkgdir}/usr/local"
- install -Dm644 "$pkgdir/opt/microsoft/powershell/7/LICENSE.txt" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ install -Dm644 LICENSE.txt "${pkgdir}/usr/share/licenses/powershell-bin/LICENSE"
}