summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Steel2016-11-26 22:15:09 +0000
committerJonathan Steel2016-11-26 22:15:09 +0000
commit509e125356770eab9d40a75b73f647b2d6d8ddec (patch)
tree93034b53205f9b135ddef49e2e13aa7176c4d6bc
parentd01c01726976e1025ee0ff20a3a8d7d580310cf1 (diff)
downloadaur-509e125356770eab9d40a75b73f647b2d6d8ddec.tar.gz
6.0.0-alpha.13
https://github.com/PowerShell/PowerShell/releases/tag/v6.0.0-alpha.13
-rw-r--r--.SRCINFO29
-rw-r--r--PKGBUILD81
-rwxr-xr-xbuild.sh20
-rw-r--r--os-release9
-rw-r--r--revert-commit-c695d41.patch21
5 files changed, 142 insertions, 18 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 9e30e297f4c2..29f055cb78b2 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,30 @@
# Generated by mksrcinfo v8
-# Thu Aug 18 20:37:05 UTC 2016
+# Sat Nov 26 22:06:06 UTC 2016
pkgbase = powershell
- pkgdesc = PowerShell
- pkgver = 6.0.0-alpha.9
+ pkgdesc = A cross-platform automation and configuration tool/framework.
+ pkgver = 6.0.0.alpha.13
pkgrel = 1
url = https://github.com/PowerShell/PowerShell
- arch = any
+ arch = x86_64
license = MIT
- options = !strip
- source = powershell-6.0.0-alpha.9.deb::https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.9/powershell_6.0.0-alpha.9-1ubuntu1.16.04.1_amd64.deb
- sha256sums = 1ddbeee47cf49383fd486853384ba97024a539457fcbdfa355716914fd44d75d
+ makedepends = git
+ makedepends = cmake
+ makedepends = proot
+ makedepends = dotnet-cli
+ depends = bash
+ depends = icu55
+ source = powershell::git+https://github.com/PowerShell/PowerShell.git#commit=67e9bf6
+ source = pester::git+https://github.com/PowerShell/psl-pester.git#branch=develop
+ source = googletest::git+https://github.com/google/googletest.git
+ source = os-release
+ source = revert-commit-c695d41.patch
+ source = build.sh
+ md5sums = SKIP
+ md5sums = SKIP
+ md5sums = SKIP
+ md5sums = f5841baa62b1322c07f9394940cec818
+ md5sums = b75d22e1c794dded7308f5bc70dea409
+ md5sums = d20378ea8504200919c65de6592f0b24
pkgname = powershell
diff --git a/PKGBUILD b/PKGBUILD
index 8554c541970a..9492ff343725 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,19 +1,78 @@
-# Maintainer: Grigorii Horos <horosgrisa@gmail.com>
+# Maintainer: Sergio Correia <sergio@correia.cc>
pkgname=powershell
-pkgver=6.0.0.alpha.9
+_pkgver=6.0.0-alpha.13
+pkgver=${_pkgver/-/.}
pkgrel=1
-pkgdesc="PowerShell"
-arch=('any')
+pkgdesc="A cross-platform automation and configuration tool/framework."
+arch=('x86_64')
url="https://github.com/PowerShell/PowerShell"
license=('MIT')
-depends=()
-makedepends=()
-options=('!strip')
-source=("${pkgname}-${pkgver}.deb::https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.9/powershell_6.0.0-alpha.9-1ubuntu1.16.04.1_amd64.deb")
-sha256sums=('1ddbeee47cf49383fd486853384ba97024a539457fcbdfa355716914fd44d75d')
+makedepends=('git' 'cmake' 'proot' 'dotnet-cli')
+depends=('bash' 'icu55')
+source=($pkgname::git+https://github.com/PowerShell/PowerShell.git#tag=v$_pkgver
+ pester::git+https://github.com/PowerShell/psl-pester.git#branch=develop
+ googletest::git+https://github.com/google/googletest.git
+ os-release
+ revert-commit-c695d41.patch
+ build.sh)
+md5sums=('SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'f5841baa62b1322c07f9394940cec818'
+ 'b75d22e1c794dded7308f5bc70dea409'
+ 'd20378ea8504200919c65de6592f0b24')
+
+prepare() {
+ cd "${pkgname}"
+ git submodule init
+ git config submodule.src/Modules/Pester.url "${srcdir}/pester"
+ git config submodule.src/libpsl-native/test/googletest.url "${srcdir}/googletest"
+ git submodule update
+
+ # Starting off clean.
+ git clean -dfx
+
+ # Workaround due to
+ # https://github.com/PowerShell/PowerShell/commit/c695d41c47c8baa48db1a590fe7378641a9e0ab9
+ net_version=$(dotnet --version)
+ net_build_number=${net_version##*-}
+ if [[ "${build_number}" -lt "3546" ]]; then
+ msg "Reverting powershell commit c695d41"
+ patch -p1 < ../revert-commit-c695d41.patch
+ fi
+}
+
+build() {
+ cd "${pkgname}"
+
+ pushd src/libpsl-native
+ cmake .
+ make
+ popd
+
+ PROOT_NO_SECCOMP=1 \
+ proot -b "${srcdir}/os-release":/etc/os-release "${srcdir}/build.sh"
+}
+
+check() {
+ cd "${pkgname}"/src/libpsl-native
+
+ PROOT_NO_SECCOMP=1 \
+ proot -b "${srcdir}/os-release":/etc/os-release \
+ make test
+}
+
package() {
- true
+ cd "${pkgname}"/src/powershell-unix
+
+ mkdir -p "${pkgdir}/usr/lib/${pkgname}"
+ cp -a bin/Linux/netcoreapp1.0/ubuntu.16.04-x64 "${pkgdir}/usr/lib/${pkgname}"
+
+ mkdir -p "${pkgdir}/usr/share/licenses/${pkgname}"
+ cp ../../LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+
+ mkdir -p "${pkgdir}/usr/bin"
+ ln -s "/usr/lib/${pkgname}/ubuntu.16.04-x64/powershell" "${pkgdir}/usr/bin/powershell"
}
-
diff --git a/build.sh b/build.sh
new file mode 100755
index 000000000000..de97396b2159
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,20 @@
+#!/usr/bin/env bash
+
+dotnet restore
+
+pushd src/ResGen
+dotnet run -c Linux
+popd
+
+pushd src/TypeCatalogParser
+dotnet run -c Linux
+popd
+
+pushd src/TypeCatalogGen
+dotnet run -c Linux ../Microsoft.PowerShell.CoreCLR.AssemblyLoadContext/CorePsTypeCatalog.cs powershell.inc
+popd
+
+cd src/powershell-unix
+dotnet build -c Linux && dotnet publish --no-build -c Linux
+
+# vim:set ts=2 sw=2 et:
diff --git a/os-release b/os-release
new file mode 100644
index 000000000000..5cff123fce0a
--- /dev/null
+++ b/os-release
@@ -0,0 +1,9 @@
+NAME="Ubuntu"
+VERSION="16.04.1 LTS"
+ID=ubuntu
+ID_LIKE=debian
+PRETTY_NAME="Ubuntu 16.04.1 LTS"
+VERSION_ID="16.04"
+HOME_URL="http://www.ubuntu.com/"
+SUPPORT_URL="http://help.ubuntu.com/"
+BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/" \ No newline at end of file
diff --git a/revert-commit-c695d41.patch b/revert-commit-c695d41.patch
new file mode 100644
index 000000000000..9dc03085dd9b
--- /dev/null
+++ b/revert-commit-c695d41.patch
@@ -0,0 +1,21 @@
+commit 2618e4421663f0f6edb6598e417b9be47a868ac5
+Author: Sergio Correia <sergio@correia.cc>
+Date: Mon Sep 5 20:16:53 2016 -0400
+
+ Revert "Use lowercase name for package folders (#2162)"
+
+ This reverts commit c695d41c47c8baa48db1a590fe7378641a9e0ab9.
+
+diff --git a/src/TypeCatalogParser/Main.cs b/src/TypeCatalogParser/Main.cs
+index 91ec7e9..3e7f07b 100644
+--- a/src/TypeCatalogParser/Main.cs
++++ b/src/TypeCatalogParser/Main.cs
+@@ -34,7 +34,7 @@ namespace TypeCatalogParser
+ // Get the real reference assemblies
+ from y in x.CompileTimeAssemblies where y.Path.EndsWith(".dll")
+ // Construct the path to the assemblies
+- select $"{context.PackagesDirectory}/{x.Name.ToLower()}/{x.Version}/{y.Path};");
++ select $"{context.PackagesDirectory}/{x.Name}/{x.Version}/{y.Path};");
+
+ Console.WriteLine($"List of reference assemblies written to {outputPath}");
+ }