aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-05-16 00:48:27 +0200
committerJakub Jirutka <jakub@jirutka.cz>2017-05-17 13:38:42 +0200
commit735829e7c6918524a9f139fc9dd95cf8c73f326d (patch)
tree2255ac5b8e1c36907822b1cf66a39a26d2a3dd30 /testing
parent92cf3505b3a320114e44801ec194ef03da1706a4 (diff)
downloadaports-735829e7c6918524a9f139fc9dd95cf8c73f326d.tar.bz2
aports-735829e7c6918524a9f139fc9dd95cf8c73f326d.tar.xz
testing/idris: fix and improve abuild
Diffstat (limited to 'testing')
-rw-r--r--[-rwxr-xr-x]testing/idris/APKBUILD57
1 files changed, 32 insertions, 25 deletions
diff --git a/testing/idris/APKBUILD b/testing/idris/APKBUILD
index 984d1d6f37..4f8bb22b6e 100755..100644
--- a/testing/idris/APKBUILD
+++ b/testing/idris/APKBUILD
@@ -1,4 +1,3 @@
-#-*-mode: Shell-script; coding: utf-8;-*-
# Maintainer: Mitch Tishmack <mitch.tishmack@gmail.com>
pkgname=idris
pkgver=1.0
@@ -6,22 +5,24 @@ pkgrel=0
pkgdesc="A Language with Dependent Types"
url="http://www.idris-lang.org"
arch="x86_64 armhf"
-license="bsd3"
+license="BSD3"
depends="gmp-dev gcc"
makedepends="ghc cabal libffi-dev ncurses-dev zlib-dev"
-install=""
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/idris-lang/Idris-dev/archive/v$pkgver.tar.gz"
builddir="$srcdir/Idris-dev-$pkgver"
-_home="${builddir}/deps"
-_tmp="${builddir}/tmp"
+_home="$builddir/deps"
+_tmp="$builddir/tmp"
+
prepare() {
+ default_prepare
+
cd "$builddir"
- install -dm755 "${_tmp}" "${_home}"
+ mkdir -p "$_tmp" "$_home"
(
- export HOME="${_home}"
- export TMPDIR="${_tmp}"
+ export HOME="$_home"
+ export TMPDIR="$_tmp"
cabal update
cabal install libffi -v
cabal install --dependencies-only -v
@@ -31,9 +32,9 @@ prepare() {
build() {
cd "$builddir"
(
- export HOME="${_home}"
- export TMPDIR="${_tmp}"
- # Note, ordering of prefixes is important
+ export HOME="$_home"
+ export TMPDIR="$_tmp"
+ # Note, ordering of prefixes is important!
cabal configure --prefix='/usr' \
--docdir='$prefix/share/doc' \
--datadir='$prefix/share' \
@@ -42,28 +43,34 @@ build() {
--libsubdir="$pkgname" \
--datasubdir="$pkgname" \
--dynlibdir="$pkgname" \
- --disable-shared -fGMP -fFFI -fstandalone
+ --disable-shared \
+ --flags='GMP FFI standalone'
cabal build
)
}
-doc() {
- default_doc
+# TODO: Run upstream tests and/or figure out how to set paths to be able
+# to compile hello_world for check.
+check() {
cd "$builddir"
- install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+
+ ./dist/build/idris/idris --version
}
package() {
cd "$builddir"
- cabal copy --destdir="$pkgdir" || return 1
- # We don't need the haskell shared libraries or interface files
- find "$pkgdir" -name "libHSidris*.so" -type f -exec rm {} \;
- rm -fr "$pkgdir/usr/lib/idris"
- # Move the docs from where cabal installs them so the doc pkg can
- # find them
- install -dm755 "$pkgdir/usr/share/doc/idris"
- mv "$pkgdir/usr/share/idris/docs" "$pkgdir/usr/share/doc/idris"
+
+ cabal copy --destdir="$pkgdir"
+
+ cd "$pkgdir"
+
+ # We don't need the haskell shared libraries or interface files.
+ rm -r usr/lib/idris
+
+ mkdir -p usr/share/doc/idris/ \
+ usr/share/licenses/$pkgname/
+ mv usr/share/idris/docs usr/share/doc/idris
+ mv usr/share/doc/LICENSE usr/share/licenses/$pkgname/
}
-md5sums="bcc928484ce50389464be1e5c9893c9e idris-1.0.tar.gz"
-sha256sums="aaed0d01c0395cb7cac2562f689f8589072ad7568acaeb5e20451ffeebab963e idris-1.0.tar.gz"
+
sha512sums="a350004a8510f01d1cc8f965a9a4e2dab219f003980b98354ebb5ae42f73b32c90c98dce193943e9709d994cb92ad35814a46b79412a1afc85d42e1018c6ba10 idris-1.0.tar.gz"