summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorPhil Ruffwind2017-08-27 17:32:26 -0400
committerPhil Ruffwind2017-08-27 19:14:03 -0400
commit98e9e09c6e3ca234bca6411f000fafad2c6087df (patch)
treec05061815e1a0c6e15b56a5f4f764679445b5464 /PKGBUILD
parent6fc57c8a7d9e140adb72f3f33b2e7718f99a7bb8 (diff)
downloadaur-98e9e09c6e3ca234bca6411f000fafad2c6087df.tar.gz
0.12.2.1
TL;DR: Make sure your BUILDDIR has at least 8 GiB of space. Switched from cabal to stack because cabal lacks isolation. Cabal uses the global package database, so linking is affected by what packages the user has installed at the time of build. One can't exactly ignore the global database because the boot packages are needed. One could ask for all the haskell-* system packages to be installed, but that's a lot of tedious bookkeeping and we still have to deal with the packages that aren't available through pacman, which would be stuck inside the sandbox (unless one could somehow statically link those libraries and dynamically link the system packages). All in all, building using cabal sandboxes has become too complicated due to the presence of dynamic-only system libraries in Arch. Stack works out to be a bit simpler now, even though it involves reinstalling ghc, incurring a dependency on stack, and having a large BUILDDIR. Oh well.
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD30
1 files changed, 12 insertions, 18 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 82bfbed7097..f8e0bfbf4a3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,34 +1,28 @@
# Maintainer: Phil Ruffwind <rf@rufflewind.com>
pkgname=gitit
-pkgver=0.12.2
-pkgrel=2
+pkgver=0.12.2.1
+pkgrel=1
pkgdesc="A wiki backed by a git, darcs, or mercurial filestore"
arch=(i686 x86_64)
url=https://hackage.haskell.org/package/$pkgname
license=(GPL)
-depends=()
+depends=(gmp zlib)
optdepends=("git: git support" "mercurial: mercurial support")
-makedepends=(ghc cabal-install)
-source=(https://hackage.haskell.org/package/$pkgname-$pkgver/$pkgname-$pkgver.tar.gz)
-sha256sums=('160a928d992847823ab11982fa6465a4d80e59ce2a45e54e8a5e1838aba22b78')
+makedepends=(ncurses5-compat-libs stack)
+source=(https://github.com/jgm/$pkgname/archive/$pkgver.tar.gz)
+sha256sums=('017cd716c8844036600e8aee858861ac41d8ef3c1ab02b43cd50532e4d5472b9')
build() {
+ if [ `df -P "$srcdir" | awk 'NR==2 {print $4}'` -lt 8388608 ]; then
+ echo >&2 "Error: need at least 8GiB of space in $srcdir"
+ return 1
+ fi
cd "$srcdir/$pkgname-$pkgver"
- cabal sandbox init
- cabal --require-sandbox update
- cabal --require-sandbox install \
- --force-reinstalls --reinstall --only-dependencies --enable-tests
- cabal --require-sandbox configure --prefix=/usr --enable-tests --ghc-options=-rtsopts
- cabal --require-sandbox build
-}
-
-check() {
- cd "$srcdir/$pkgname-$pkgver"
- cabal --require-sandbox test
+ stack --stack-root "$srcdir/.stack" --install-ghc build --ghc-options=-rtsopts
}
package() {
cd "$srcdir/$pkgname-$pkgver"
- cabal --require-sandbox copy --destdir="$pkgdir"
+ stack --stack-root "$srcdir/.stack" install --local-bin-path "$pkgdir/usr/bin"
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}