package ghcup binary
This commit is contained in:
parent
5cdaade57c
commit
21d6b085b6
1 changed files with 49 additions and 0 deletions
49
d/ghcup/SlackBuild
Executable file
49
d/ghcup/SlackBuild
Executable file
|
@ -0,0 +1,49 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
CWD=$(pwd)
|
||||
|
||||
PRGNAM=$(basename $CWD)
|
||||
VERSION=${VERSION:-$(curl -s "https://gitlab.haskell.org/haskell/ghcup-hs/-/tags?format=atom" | grep "title>v" | head -n1 | grep -o "[0-9rc.-]*")}
|
||||
ARCH=$(uname -m)
|
||||
BUILD=${BUILD:-1}
|
||||
TAG=${TAG:-gwh}
|
||||
TMP=${TMP:-/tmp/$TAG}
|
||||
PKG=$TMP/pkg-$PRGNAM
|
||||
OUTPUT=${OUTPUT:-/tmp}
|
||||
|
||||
[ ! -e $CWD/${PRGNAM}-${VERSION} ] && wget -c -O $CWD/${PRGNAM}-${VERSION} https://downloads.haskell.org/~ghcup/$VERSION/${ARCH}-linux-ghcup-$VERSION
|
||||
|
||||
rm -fr $PKG
|
||||
mkdir -p $PKG/bin
|
||||
|
||||
cp $CWD/${PRGNAM}-${VERSION} $PKG/bin/$PRGNAM
|
||||
|
||||
mkdir -p $PKG/install
|
||||
|
||||
cat <<EOF > $PKG/install/slack-desc
|
||||
# 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 ':'.
|
||||
|
||||
|-----handy-ruler------------------------------------------------------|
|
||||
${PRGNAM}: ${PRGNAM} ( installer for Haskell )
|
||||
${PRGNAM}:
|
||||
${PRGNAM}: ghcup makes it easy to install specific versions of ghc on GNU/Linux,
|
||||
${PRGNAM}: macOS (aka Darwin) and FreeBSD and can also bootstrap a fresh Haskell
|
||||
${PRGNAM}: developer environment from scratch. It follows the unix UNIX
|
||||
${PRGNAM}: philosophy of do one thing and do it well.
|
||||
${PRGNAM}:
|
||||
${PRGNAM}: Similar in scope to rustup, pyenv and jenv.
|
||||
${PRGNAM}:
|
||||
${PRGNAM}: https://www.haskell.org/ghcup/
|
||||
${PRGNAM}: https://gitlab.haskell.org/haskell/ghcup-hs
|
||||
EOF
|
||||
|
||||
cd $PKG
|
||||
rm -f $PKG/{,usr/}lib$(uname -m | grep -o 64)/*.la
|
||||
/sbin/makepkg -l y -c n ${OUTPUT}/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txz
|
Loading…
Reference in a new issue