blob: 984d1d6f3738de5125b38a274d2fc048e2ff6df4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
#-*-mode: Shell-script; coding: utf-8;-*-
# Maintainer: Mitch Tishmack <mitch.tishmack@gmail.com>
pkgname=idris
pkgver=1.0
pkgrel=0
pkgdesc="A Language with Dependent Types"
url="http://www.idris-lang.org"
arch="x86_64 armhf"
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"
prepare() {
cd "$builddir"
install -dm755 "${_tmp}" "${_home}"
(
export HOME="${_home}"
export TMPDIR="${_tmp}"
cabal update
cabal install libffi -v
cabal install --dependencies-only -v
)
}
build() {
cd "$builddir"
(
export HOME="${_home}"
export TMPDIR="${_tmp}"
# Note, ordering of prefixes is important
cabal configure --prefix='/usr' \
--docdir='$prefix/share/doc' \
--datadir='$prefix/share' \
--htmldir='$docdir/html' \
--libdir='$prefix/lib' \
--libsubdir="$pkgname" \
--datasubdir="$pkgname" \
--dynlibdir="$pkgname" \
--disable-shared -fGMP -fFFI -fstandalone
cabal build
)
}
doc() {
default_doc
cd "$builddir"
install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
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"
}
md5sums="bcc928484ce50389464be1e5c9893c9e idris-1.0.tar.gz"
sha256sums="aaed0d01c0395cb7cac2562f689f8589072ad7568acaeb5e20451ffeebab963e idris-1.0.tar.gz"
sha512sums="a350004a8510f01d1cc8f965a9a4e2dab219f003980b98354ebb5ae42f73b32c90c98dce193943e9709d994cb92ad35814a46b79412a1afc85d42e1018c6ba10 idris-1.0.tar.gz"
|