summaryrefslogtreecommitdiff
path: root/skip/cabal/cabal.xibuild
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-05-31 11:04:17 +0100
committerdavidovski <david@davidovski.xyz>2022-05-31 11:04:17 +0100
commit871b2b573f01c1b3176a0f65458b3d281b41c437 (patch)
tree1311c682a9307026b039de9ba0e93bd22e35e2f5 /skip/cabal/cabal.xibuild
parentdfcdf333c80ae1d7171f6fa145fd87fecb8c5b73 (diff)
added pandoc and qt5
Diffstat (limited to 'skip/cabal/cabal.xibuild')
-rw-r--r--skip/cabal/cabal.xibuild40
1 files changed, 40 insertions, 0 deletions
diff --git a/skip/cabal/cabal.xibuild b/skip/cabal/cabal.xibuild
new file mode 100644
index 0000000..501b0e3
--- /dev/null
+++ b/skip/cabal/cabal.xibuild
@@ -0,0 +1,40 @@
+#!/bin/sh
+
+NAME="cabal"
+DESC="The Haskell Cabal"
+
+MAKEDEPS="cabal-stage0"
+DEPS="gmp libffi musl zlib "
+
+PKG_VER=3.6.2.0
+SOURCE="https://hackage.haskell.org/package/cabal-install-$PKG_VER/cabal-install-$PKG_VER.tar.gz"
+ADDITIONAL="cabal.project.freeze "
+
+
+prepare () {
+ export cabal_home="$BUILD_ROOT/dist"
+
+ ln -sf cabal.project.freeze \
+ "cabal.project.freeze"
+}
+
+build () {
+ HOME="$cabal_home" cabal v2-update
+ HOME="$cabal_home" cabal v2-build all \
+ --allow-newer \
+ --jobs=${JOBS:-1} \
+ --prefix=/usr \
+ --docdir=/usr/share/doc/cabal \
+ --sysconfdir=/etc
+}
+
+package () {
+ HOME="$cabal_home" cabal list-bin --allow-newer all:exes | \
+ xargs install -Dm755 -t "$PKG_DEST"/usr/bin
+
+ mkdir -p "$PKG_DEST"/usr/share/man/man1
+ HOME="$cabal_home" cabal man --raw \
+ > "$PKG_DEST"/usr/share/man/man1/cabal.1
+
+ install -Dm644 LICENSE "$PKG_DEST/usr/share/licenses/cabal/LICENSE"
+}