aboutsummaryrefslogtreecommitdiff
path: root/system/powershell/powershell.SlackBuild
diff options
context:
space:
mode:
authorReza Talebi <reza.talebi.73@outlook.com>2021-04-10 03:44:01 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2021-04-10 17:04:43 +0700
commit82f9836e8cd5213212a584f9225e3fe517ed4efa (patch)
treeec21535f509eecbb72020aed5136bd32f9854146 /system/powershell/powershell.SlackBuild
parentd27397ecf736f963c4278b43bd4e7c4fe54d0b6b (diff)
system/powershell: Updated for version 7.1.3.
Signed-off-by: Dave Woodfall <dave@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/powershell/powershell.SlackBuild')
-rw-r--r--system/powershell/powershell.SlackBuild33
1 files changed, 13 insertions, 20 deletions
diff --git a/system/powershell/powershell.SlackBuild b/system/powershell/powershell.SlackBuild
index 9232ac2e5ef7b..bcdfa13d76595 100644
--- a/system/powershell/powershell.SlackBuild
+++ b/system/powershell/powershell.SlackBuild
@@ -23,16 +23,19 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=powershell
-VERSION=${VERSION:-7.0.3}
+VERSION=${VERSION:-7.1.3}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
- case "$( uname -m )" in
- i?86) ARCH=i586 ;;
- arm*) ARCH=arm ;;
- *) ARCH=$( uname -m ) ;;
- esac
+ ARCH=$( uname -m )
+fi
+
+if [ "$ARCH" = "x86_64" ]; then
+ ARCHITECTURE="x64"
+else
+ echo "Package for $ARCH architecture is not available."
+ exit 1
fi
CWD=$(pwd)
@@ -40,20 +43,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-
set -e
-if [ "$( uname -m )" = "x86_64" ]; then
- ARCH="x86_64"
- ARCHITECTURE="x64"
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
- BITS="amd64"
-else
- echo "Package for $(uname -m) architecture is not available."
- exit 1
-fi
-
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
@@ -64,12 +55,14 @@ mkdir -p opt/microsoft/powershell
tar -zxf $CWD/$PRGNAM-${VERSION}-linux-${ARCHITECTURE}.tar.gz -C opt/microsoft/powershell
chown -R root:root opt/microsoft/powershell
+mkdir -p usr/bin/
+ln -s /opt/microsoft/powershell/pwsh usr/bin/pwsh
+
mkdir -p usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
-cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg --linkadd y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}