summaryrefslogtreecommitdiffstats
path: root/haskell
diff options
context:
space:
mode:
author Lockywolf2023-10-19 08:00:18 +0200
committer Willy Sudiarto Raharjo2023-10-19 08:33:36 +0200
commitc1c1df0616d8e5a73537260059454e40a2bd8beb (patch)
treee3483a5dda0cdacdc97e515ccb81d4a09bec318b /haskell
parent1cb0db460d9f44ad40d798f89bcf5fcffe8a3a65 (diff)
downloadslackbuilds-c1c1df0616d8e5a73537260059454e40a2bd8beb.tar.gz
haskell/cabal-install: Added (Common Architecture Building Applications Libraries).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'haskell')
-rw-r--r--haskell/cabal-install/README20
-rw-r--r--haskell/cabal-install/cabal-install.SlackBuild109
-rw-r--r--haskell/cabal-install/cabal-install.info10
-rw-r--r--haskell/cabal-install/slack-desc19
4 files changed, 158 insertions, 0 deletions
diff --git a/haskell/cabal-install/README b/haskell/cabal-install/README
new file mode 100644
index 0000000000..fd546af36a
--- /dev/null
+++ b/haskell/cabal-install/README
@@ -0,0 +1,20 @@
+cabal-install is a tool to manage Haskell's package building.
+
+Cabal is a system for building and packaging Haskell libraries and
+programs. It defines a common interface for package authors and
+distributors to easily build their applications in a portable way.
+Cabal is part of a larger infrastructure for distributing, organizing,
+and cataloging Haskell libraries and programs.
+
+This is a binary repack.
+
+Although SBo provides ghc, which, in turn,
+can theoretically build everything using the Setup.hs files in
+package distributions, managing versions in Haskell is not trivial,
+and also sematically dubious, since most Haskell libraries are static.
+
+Cabal is intended to remediate this issue. Each cabal-based
+SlackBuild would have to carry a large number of source files, but,
+in turn, would avoid having to micro-manage dependencies, and
+pollute the file system with single-use static libraries.
+
diff --git a/haskell/cabal-install/cabal-install.SlackBuild b/haskell/cabal-install/cabal-install.SlackBuild
new file mode 100644
index 0000000000..e355dcd5d1
--- /dev/null
+++ b/haskell/cabal-install/cabal-install.SlackBuild
@@ -0,0 +1,109 @@
+#!/bin/bash
+
+# Slackware build script for cabal-install
+
+# 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=cabal-install
+VERSION=${VERSION:-3.10.1.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
+
+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}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+ SRC_SUFFIX=i386-linux-deb9
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+ SRC_SUFFIX=i386-linux-deb9
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+ SRC_SUFFIX=x86_64-linux-ubuntu20_04
+elif [ "$ARCH" = "aarch64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+ printf "Unsupported architecture: ARM.\n" 1>&2
+ exit 1
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+ printf "Unsupported architecture: unknown.\n" 1>&2
+ exit 2
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+mkdir $PRGNAM-$VERSION
+cd $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION-$SRC_SUFFIX.tar.xz
+chown -R root:root .
+find -L . \
+ \( -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 {} \;
+
+install -D -m755 cabal "$PKG"/opt/cabal-install/cabal
+install -d -m755 "$PKG"/usr/bin
+
+(
+ cd $PKG/usr/bin
+ ln -sr ../../opt/cabal-install/cabal ./cabal
+)
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ plan.json \
+ $PKG/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
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/haskell/cabal-install/cabal-install.info b/haskell/cabal-install/cabal-install.info
new file mode 100644
index 0000000000..b597cfe098
--- /dev/null
+++ b/haskell/cabal-install/cabal-install.info
@@ -0,0 +1,10 @@
+PRGNAM="cabal-install"
+VERSION="3.10.1.0"
+HOMEPAGE="https://www.haskell.org/cabal/"
+DOWNLOAD="https://downloads.haskell.org/~cabal/cabal-install-3.10.1.0/cabal-install-3.10.1.0-i386-linux-deb9.tar.xz"
+MD5SUM="ad3773d50d26fc229eaaa0500f8fce72"
+DOWNLOAD_x86_64="https://downloads.haskell.org/~cabal/cabal-install-3.10.1.0/cabal-install-3.10.1.0-x86_64-linux-ubuntu20_04.tar.xz"
+MD5SUM_x86_64="3cb02cc60db86efbf460f639146728fe"
+REQUIRES=""
+MAINTAINER="Lockywolf"
+EMAIL="for_sbo.cabal-install_2023-10-17@lockywolf.net"
diff --git a/haskell/cabal-install/slack-desc b/haskell/cabal-install/slack-desc
new file mode 100644
index 0000000000..64eed7ecb4
--- /dev/null
+++ b/haskell/cabal-install/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------------------------------------------------------|
+cabal-install: cabal-install (Common Architecture Building Applications Libraries)
+cabal-install:
+cabal-install: cabal-install provides a binary cabal, which is required to build
+cabal-install: Haskell libraries and applications. It may be seen as a Haskell
+cabal-install: equivalent of rustup, cargo, or go get.
+cabal-install:
+cabal-install:
+cabal-install:
+cabal-install:
+cabal-install:
+cabal-install: