Date: Thursday, August 25, 2022 @ 10:58:57 Author: felixonmars Revision: 1278438
addpkg: ihaskell 0.10.2.2-1 Added: ihaskell/ ihaskell/repos/ ihaskell/trunk/ ihaskell/trunk/PKGBUILD ----------+ PKGBUILD | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) Added: ihaskell/trunk/PKGBUILD =================================================================== --- ihaskell/trunk/PKGBUILD (rev 0) +++ ihaskell/trunk/PKGBUILD 2022-08-25 10:58:57 UTC (rev 1278438) @@ -0,0 +1,68 @@ +# Maintainer: Felix Yan <felixonm...@archlinux.org> +# Contributor: Martin Rodriguez Reboredo <yakoy...@gmail.com> + +pkgname=ihaskell +pkgver=0.10.2.2 +pkgrel=1 +pkgdesc="A Haskell backend kernel for the IPython project." +url="http://github.com/gibiansky/IHaskell" +license=("MIT") +arch=('x86_64') +depends=('ghc-libs' 'ipython' 'python-jupyter_client' 'haskell-aeson' 'haskell-base64-bytestring' + 'haskell-cmdargs' 'haskell-ghc' 'haskell-ghc-parser' 'haskell-ghc-paths' 'hlint' + 'haskell-http-client' 'haskell-http-client-tls' 'haskell-ipython-kernel' 'haskell-random' + 'haskell-shelly' 'haskell-split' 'haskell-strict' 'haskell-unordered-containers' + 'haskell-utf8-string' 'haskell-vector') +makedepends=('ghc' 'haskell-hunit' 'haskell-here' 'haskell-hspec' 'haskell-hspec-contrib' + 'haskell-raw-strings-qq' 'haskell-setenv') +source=("https://hackage.haskell.org/packages/archive/$pkgname/$pkgver/$pkgname-$pkgver.tar.gz" + enable-dynamic-way.patch) +sha256sums=('09f10f3007d892d811a5de2567399078e9ef1e612e0c4997619c909d82849ed1' + '043a8c6f32f48923127216e337d0b8a6b63207dbd9c4ccac7029535dc874cab8') + +prepare() { + cd $pkgname-$pkgver + patch -p1 -i ../enable-dynamic-way.patch +} + +build() { + cd $pkgname-$pkgver + + runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \ + --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname --enable-tests \ + --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid \ + --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \ + --ghc-option='-pie' \ + -fuse-hlint + + 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 +} + +check() { + cd $pkgname-$pkgver + GHC_PACKAGE_PATH="$PWD/dist/package.conf.inplace:$(ghc --print-global-package-db)" \ + runhaskell Setup test +} + +package() { + cd $pkgname-$pkgver + + install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh + install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh + runhaskell Setup copy --destdir="$pkgdir" + install -D -m644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/ + rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE + + PATH="$pkgdir/usr/bin:$PATH" \ + LD_LIBRARY_PATH="$pkgdir"/usr/lib \ + ihaskell_datadir="$pkgdir"/usr/share/ihaskell \ + "$pkgdir"/usr/bin/ihaskell install --prefix="$pkgdir"/usr + sed -i "s|$pkgdir||" "$pkgdir"/usr/share/jupyter/kernels/haskell/kernel.json + + install -dm755 "$pkgdir"/usr/share/jupyter/labextensions + ln -s /usr/share/ihaskell/jupyterlab-ihaskell/labextension "$pkgdir"/usr/share/jupyter/labextensions/jupyterlab-ihaskell +}