aboutsummaryrefslogtreecommitdiff
path: root/haskell
diff options
context:
space:
mode:
authorLockywolf <for_sbo.ghcup_2023-11-27@lockywolf.net>2023-12-03 17:44:28 +0900
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2023-12-09 07:50:06 +0700
commit321f9d93daaa6ffad55bd52f4f2a8e5d1c583aed (patch)
tree683c6219cec8cca36e805227532f0b750298404d /haskell
parent466395d17c19ff119a73c4e35affac1c28b317d7 (diff)
haskell/ghcup: Added (haskell installer).
Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'haskell')
-rw-r--r--haskell/ghcup/README7
-rw-r--r--haskell/ghcup/ghcup.SlackBuild89
-rw-r--r--haskell/ghcup/ghcup.info10
-rw-r--r--haskell/ghcup/slack-desc19
4 files changed, 125 insertions, 0 deletions
diff --git a/haskell/ghcup/README b/haskell/ghcup/README
new file mode 100644
index 0000000000000..267d0a9859710
--- /dev/null
+++ b/haskell/ghcup/README
@@ -0,0 +1,7 @@
+GHCup makes it easy to install specific versions of GHC on GNU/Linux,
+macOS (aka Darwin), FreeBSD and Windows and can also bootstrap a fresh
+Haskell developer environment from scratch. It follows the UNIX
+philosophy of do one thing and do it well. Similar in scope to rustup,
+pyenv and jenv.
+
+This is a binary repack.
diff --git a/haskell/ghcup/ghcup.SlackBuild b/haskell/ghcup/ghcup.SlackBuild
new file mode 100644
index 0000000000000..aed6ea6ec63df
--- /dev/null
+++ b/haskell/ghcup/ghcup.SlackBuild
@@ -0,0 +1,89 @@
+#!/bin/bash
+
+# Slackware build script for ghcup
+
+# Copyright 2023, Lockywolf
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=ghcup
+VERSION=${VERSION:-0.1.20.0}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+case "$ARCH" in
+ i?86) SRCARCH=i386 ;;
+ x86_64) SRCARCH=$ARCH ;;
+ *) printf "%s unsupported\n" "$ARCH" 1>&2 ; exit 1 ;;
+esac
+
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+
+mkdir -p $PKG/usr/bin/
+install -m 755 $CWD/$SRCARCH-linux-$PRGNAM-$VERSION $PKG/usr/bin/$SRCARCH-linux-$PRGNAM-$VERSION
+
+(
+ cd $PKG/usr/bin
+ ln -sr $SRCARCH-linux-$PRGNAM-$VERSION $PRGNAM
+)
+
+chown -R root:root .
+find -L $PKG/ \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/haskell/ghcup/ghcup.info b/haskell/ghcup/ghcup.info
new file mode 100644
index 0000000000000..644357d1efdab
--- /dev/null
+++ b/haskell/ghcup/ghcup.info
@@ -0,0 +1,10 @@
+PRGNAM="ghcup"
+VERSION="0.1.20.0"
+HOMEPAGE="https://www.haskell.org/ghcup/"
+DOWNLOAD="https://downloads.haskell.org/~ghcup/0.1.20.0/i386-linux-ghcup-0.1.20.0"
+MD5SUM="c89e96a3a348891065d9350a5b24a203"
+DOWNLOAD_x86_64="https://downloads.haskell.org/~ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0"
+MD5SUM_x86_64="0edabd54c4053a62fa54ec0091642ce0"
+REQUIRES=""
+MAINTAINER="Lockywolf"
+EMAIL="for_sbo.ghcup_2023-11-27@lockywolf.net"
diff --git a/haskell/ghcup/slack-desc b/haskell/ghcup/slack-desc
new file mode 100644
index 0000000000000..b627b7174dbfd
--- /dev/null
+++ b/haskell/ghcup/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+ghcup: ghcup (Glasgow Haskell Compiler version manager)
+ghcup:
+ghcup: GHCup is the main installer for the general purpose language
+ghcup: Haskell.
+ghcup:
+ghcup: ghcup allows installing different versions of GHC as a user, and
+ghcup: switch them as desired.
+ghcup:
+ghcup:
+ghcup:
+ghcup: