diff options
author | Carl Smedstad | 2023-04-15 16:22:48 +0200 |
---|---|---|
committer | Carl Smedstad | 2023-04-15 16:23:26 +0200 |
commit | 58c58ea7292cf02c6eb1c2d4961ddc84326cff77 (patch) | |
tree | 3d8cc796652e1cbeb89d7fb0d0704c73039aefe7 /PKGBUILD | |
parent | 8c15f22af43581cc8d67bc357c92d2b62d85413b (diff) | |
download | aur-58c58ea7292cf02c6eb1c2d4961ddc84326cff77.tar.gz |
Publish version 7.3.4-2
* Set NUGET_PACKAGES so that ~/.nuget/packages/ is not touched during
build.
* Publish with --no-self-contained to avoid installing all .NET DLLs as
part of this package, duplicating them on the system.
* Install PowerShell modules that come bundled with upstream-built -bin
package:
* PSReadLine
* PackageManagement
* PowerShellGet
* ThreadJob
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -7,7 +7,7 @@ pkgname=powershell _binaryname=pwsh pkgver=7.3.4 _pkgnum=${pkgver:0:1} -pkgrel=1 +pkgrel=2 pkgdesc='A cross-platform automation and configuration tool/framework (latest release)' arch=('x86_64') url='https://github.com/PowerShell/PowerShell' @@ -48,6 +48,8 @@ build() { export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true export DOTNET_CLI_TELEMETRY_OPTOUT=true + export NUGET_PACKAGES="$srcdir/$_powershell_archive/nuget" + # Mock git describe output that the build expects export POWERSHELL_GIT_DESCRIBE_OUTPUT="v$pkgver-0-gxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" @@ -55,6 +57,7 @@ build() { dotnet restore src/powershell-unix dotnet restore src/ResGen dotnet restore src/TypeCatalogGen + dotnet restore src/Modules ## Setup the build target to gather dependency information cp "$srcdir/Microsoft.PowerShell.SDK.csproj.TypeCatalog.targets" "src/Microsoft.PowerShell.SDK/obj/Microsoft.PowerShell.SDK.csproj.TypeCatalog.targets" @@ -80,7 +83,7 @@ build() { popd ## Build powershell core - dotnet publish --self-contained --configuration Linux "src/powershell-unix/" --output bin --runtime "linux-x64" + dotnet publish --no-self-contained --configuration Linux "src/powershell-unix/" --output bin --runtime "linux-x64" } check() { @@ -97,6 +100,11 @@ package() { install -Dm644 "$srcdir/$_powershell_archive/LICENSE.txt" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + cp -ar "$srcdir/$_powershell_archive/nuget/psreadline/2.2.6/." "$pkgdir/opt/microsoft/$pkgname/$_pkgnum/Modules/PSReadLine" + cp -ar "$srcdir/$_powershell_archive/nuget/packagemanagement/1.4.8.1/." "$pkgdir/opt/microsoft/$pkgname/$_pkgnum/Modules/PackageManagement" + cp -ar "$srcdir/$_powershell_archive/nuget/powershellget/2.2.5/." "$pkgdir/opt/microsoft/$pkgname/$_pkgnum/Modules/PowerShellGet" + cp -ar "$srcdir/$_powershell_archive/nuget/threadjob/2.0.3/." "$pkgdir/opt/microsoft/$pkgname/$_pkgnum/Modules/ThreadJob" + mkdir -p "$pkgdir/usr/bin" ln -s "/opt/microsoft/$pkgname/$_pkgnum/$_binaryname" "$pkgdir/usr/bin/$_binaryname" } |