Date: Thursday, January 21, 2016 @ 15:50:26 Author: fyan Revision: 158427
addpkg: agda-stdlib 0.11-1 Added: agda-stdlib/ agda-stdlib/repos/ agda-stdlib/trunk/ agda-stdlib/trunk/PKGBUILD agda-stdlib/trunk/agda-stdlib.install ---------------------+ PKGBUILD | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++ agda-stdlib.install | 18 ++++++++++++++++ 2 files changed, 72 insertions(+) Added: agda-stdlib/trunk/PKGBUILD =================================================================== --- agda-stdlib/trunk/PKGBUILD (rev 0) +++ agda-stdlib/trunk/PKGBUILD 2016-01-21 14:50:26 UTC (rev 158427) @@ -0,0 +1,54 @@ +# $Id: PKGBUILD 152508 2015-12-10 18:09:47Z fyan $ +# Maintainer: Felix Yan <[email protected]> +# Contributor: Arch Haskell Team <[email protected]> + +pkgname=agda-stdlib +pkgver=0.11 +pkgrel=1 +pkgdesc="Agda standard libraries" +url="https://github.com/agda/agda-stdlib" +license=("MIT") +arch=('i686' 'x86_64') +depends=("ghc=7.10.3" "agda") +makedepends=("git" "haskell-filemanip") +install=$pkgname.install +options=('staticlibs') +source=("git+https://github.com/agda/agda-stdlib.git#tag=v$pkgver") +sha256sums=('SKIP') + +build() { + cd "${srcdir}/${pkgname}" + + runhaskell Setup configure + runhaskell Setup build + + dist/build/GenerateEverything/GenerateEverything + + cd ffi + runhaskell Setup configure -O --enable-library-profiling --enable-shared \ + --prefix=/usr --docdir="/usr/share/doc/agda-lib-ffi" \ + --libsubdir=\$compiler/site-local/\$pkgid + runhaskell Setup build + runhaskell Setup haddock --hoogle --html + runhaskell Setup register --gen-script + runhaskell Setup unregister --gen-script + sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh + + cd .. + agda -i. -isrc Everything.agda + agda --html -i. -isrc README.agda +} + +package() { + cd "${srcdir}/${pkgname}/ffi" + install -D -m744 register.sh "${pkgdir}/usr/share/haskell/agda-lib-ffi/register.sh" + install -m744 unregister.sh "${pkgdir}/usr/share/haskell/agda-lib-ffi/unregister.sh" + install -d -m755 "${pkgdir}/usr/share/doc/ghc/html/libraries" + ln -s "/usr/share/doc/agda-lib-ffi/html" "${pkgdir}/usr/share/doc/ghc/html/libraries/agda-lib-ffi" + runhaskell Setup copy --destdir="${pkgdir}" + + cd .. + install -dm755 "$pkgdir/usr/share/agda/lib/prim" + cp -pr Everything.agda* src/* "$pkgdir/usr/share/agda/lib/prim" + install -D -m644 "LICENCE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENCE" +} Added: agda-stdlib/trunk/agda-stdlib.install =================================================================== --- agda-stdlib/trunk/agda-stdlib.install (rev 0) +++ agda-stdlib/trunk/agda-stdlib.install 2016-01-21 14:50:26 UTC (rev 158427) @@ -0,0 +1,18 @@ +HS_DIR=usr/share/haskell/agda-lib-ffi +post_install() { + ${HS_DIR}/register.sh + (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index) +} +pre_upgrade() { + ${HS_DIR}/unregister.sh +} +post_upgrade() { + ${HS_DIR}/register.sh + (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index) +} +pre_remove() { + ${HS_DIR}/unregister.sh +} +post_remove() { + (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index) +}
