summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorjohngowers2018-06-21 21:18:15 +0100
committerjohngowers2018-06-21 21:18:15 +0100
commitf6396eaeccad3f6ec546aa59f0f30964414a752b (patch)
tree29c3a527f6bd7d01b1534ccbf519cda33dfda6ce /PKGBUILD
downloadaur-f6396eaeccad3f6ec546aa59f0f30964414a752b.tar.gz
Added the PKGBUILD and .SRCINFO for the package.
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD70
1 files changed, 70 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..2130dbd47dc0
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,70 @@
+# Maintainer: John Gowers <wjg27 AT bath DOT ac DOT uk>
+# See also the 'agda' package in the 'community' repository.
+pkgname=agda-git
+pkgver=2.5.1.r5468.a4e5f12bc
+pkgrel=1
+pkgdesc="A dependently typed functional programming language and proof assistant: development version"
+arch=('x86_64')
+url="http://wiki.portal.chalmers.se/agda/"
+license=('custom')
+groups=()
+depends=('ghc-libs' 'haskell-async' 'haskell-blaze-html' 'haskell-boxes'
+ 'haskell-cpphs' 'haskell-data-hash' 'haskell-edisonapi' 'haskell-edisoncore'
+ 'haskell-edit-distance' 'haskell-equivalence' 'haskell-geniplate-mirror' 'haskell-gitrev'
+ 'haskell-hashable' 'haskell-hashtables' 'haskell-ieee754' 'haskell-murmur-hash'
+ 'haskell-regex-tdfa' 'haskell-strict' 'haskell-unordered-containers' 'haskell-uri-encode'
+ 'haskell-zlib')
+makedepends=('git' 'alex' 'happy' 'ghc')
+optdepends=('agda-stdlib: for standard library')
+provides=("${pkgname%-git}")
+conflicts=("${pkgname%-git}")
+replaces=()
+backup=()
+options=()
+install=
+source=("${pkgname%-git}::git+http://github.com/${pkgname%-git}/${pkgname%-git}.git")
+noextract=()
+md5sums=('SKIP')
+
+# Please refer to the 'USING VCS SOURCES' section of the PKGBUILD man page for
+# a description of each element in the source array.
+
+pkgver() {
+ cd "$srcdir/${pkgname%-git}"
+ printf "%s" "$(git describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
+}
+
+prepare() {
+ mkdir -p lib-target
+ cp -a ${pkgname%-git}/src/data/lib lib-target/lib
+ sed -e "s|rawSystem agda \\[|rawSystem \"env\" [\"Agda_datadir=$PWD/lib-target\", \"LD_LIBRARY_PATH=$PWD/${pkgname%-git}/dist/build\", agda,|" \
+ -e "s|(ms, datadir dirs|(ms, \"$PWD/lib-target\"|" \
+ -i ${pkgname%-git}/Setup.hs
+}
+
+build() {
+ cd "${srcdir}/${pkgname%-git}"
+
+ runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
+ --prefix=/usr --docdir="/usr/share/doc/${pkgname%-git}" --datasubdir="${pkgname%-git}" \
+ --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid \
+ -fcpphs -f-debug -f-enable-cluster-counting
+ LC_CTYPE=en_US.UTF-8 runhaskell Setup build
+ runhaskell Setup register --gen-script
+ runhaskell Setup unregister --gen-script
+ sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
+ sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+
+package() {
+ cd "${srcdir}/${pkgname%-git}"
+
+ install -D -m744 register.sh "${pkgdir}/usr/share/haskell/register/${pkgname%-git}.sh"
+ install -D -m744 unregister.sh "${pkgdir}/usr/share/haskell/unregister/${pkgname%-git}.sh"
+ runhaskell Setup copy --destdir="${pkgdir}"
+ install -D -m644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname%-git}/LICENSE"
+ rm -f "${pkgdir}/usr/share/doc/${pkgname%-git}/LICENSE"
+
+ install -m644 "$srcdir"/lib-target/lib/prim/Agda/Primitive.agdai "$pkgdir"/usr/share/agda/lib/prim/Agda/Primitive.agdai
+ install -m644 "$srcdir"/lib-target/lib/prim/Agda/Builtin/*.agdai "$pkgdir"/usr/share/agda/lib/prim/Agda/Builtin/
+}