diff options
author | mb64 | 2020-05-26 22:28:34 -0400 |
---|---|---|
committer | mb64 | 2020-05-26 22:28:34 -0400 |
commit | 8728faf5bba543e53a11b8beb7b7c847f3b24397 (patch) | |
tree | 85b48f54a258fff0d10fd99debf4ed2b5181781d /PKGBUILD | |
download | aur-8728faf5bba543e53a11b8beb7b7c847f3b24397.tar.gz |
Initial commit – version 0.2.0
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..f1a5ecc113dd --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,61 @@ +# +# Maintainer: Mark Barbone <mark.l.barbone at gmail> +# + +pkgname=idris2 +pkgver=0.2.0 +pkgrel=1 +pkgdesc="Funtional Programming Lanugage with Dependent Types" +url="https://www.idris-lang.org/" +license=('custom') +arch=('x86_64') +depends=('chez-scheme') +makedepends=('git') +source=('https://www.idris-lang.org/idris2-src/idris2-latest.tgz') +sha256sums=('03869e02cf983947c30fe66660b305114e2d21c96d3dab17efc0c7923d940db6') + +_srcname="Idris2-$pkgver" + +build() { + cd "$srcdir/$_srcname" + + unset MAKEFLAGS # Parallel builds cause problems + export SCHEME=scheme + + mkdir -p "$srcdir/bootstrap" + PREFIX="$srcdir/bootstrap" make bootstrap + PREFIX="$srcdir/bootstrap" make install + make clean + + PATH="$srcdir/bootstrap/bin:$PATH" \ + LD_LIBRARY_PATH="$srcdir/bootstrap/lib:$LD_LIBRARY_PATH" \ + PREFIX=/usr/lib \ + make +} + +package() { + cd "$srcdir/$_srcname" + + unset MAKEFLAGS + export SCHEME=scheme + + PREFIX="$pkgdir/usr/lib" make install-idris2 + PREFIX="$pkgdir/usr/lib" make install-support + for lib in prelude base network contrib ; do + cd libs/$lib + IDRIS2_PREFIX="$pkgdir/usr/lib" ../../build/exec/idris2 --install $lib.ipkg + cd ../.. + done + + # clean up install + mkdir -p "$pkgdir/usr/bin" + mv "$pkgdir/usr/lib/bin/idris2_app/idris2.so" "$pkgdir/usr/bin/idris2" + rm -r "$pkgdir/usr/lib/bin" + mv "$pkgdir"/usr/lib/{lib/,}libidris2_support.so + rmdir "$pkgdir"/usr/lib/lib + + # Fix permissions + find "$pkgdir" -type d -exec chmod 755 {} \; + + install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} |