[arch-commits] Commit in haskell-ghc-api-compat/repos (2 files)

Felix Yan felixonmars at archlinux.org
Mon Jun 21 02:20:40 UTC 2021


    Date: Monday, June 21, 2021 @ 02:20:40
  Author: felixonmars
Revision: 966279

archrelease: copy trunk to community-staging-x86_64

Added:
  haskell-ghc-api-compat/repos/community-staging-x86_64/
  haskell-ghc-api-compat/repos/community-staging-x86_64/PKGBUILD
    (from rev 966278, haskell-ghc-api-compat/trunk/PKGBUILD)

----------+
 PKGBUILD |   49 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)

Copied: haskell-ghc-api-compat/repos/community-staging-x86_64/PKGBUILD (from rev 966278, haskell-ghc-api-compat/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2021-06-21 02:20:40 UTC (rev 966279)
@@ -0,0 +1,49 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+_hkgname=ghc-api-compat
+pkgname=haskell-ghc-api-compat
+pkgver=8.6.1
+_commit=9e8c1ec540bc0a68700e8541d44dca14913c5c9e
+pkgrel=1
+pkgdesc="GHC-API compatibility helpers"
+url="https://hackage.haskell.org/package/ghc-api-compat"
+license=("BSD")
+arch=('x86_64')
+depends=('ghc-libs' 'haskell-ghc')
+makedepends=('ghc' 'uusi')
+# https://gitlab.haskell.org/haskell/ghc-api-compat/-/issues/1
+#source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz")
+source=("https://gitlab.haskell.org/haskell/ghc-api-compat/-/archive/$_commit/ghc-api-compat-$_commit.tar.bz2")
+sha256sums=('c9ff586aca0ccd6ccffe333403d21c9b86ed6dbd6335830419c0875c7df891bc')
+
+prepare() {
+  cd $_hkgname-$_commit
+  gen-setup
+  sed -i 's/GHC.Platform.ARM64/GHC.Platform.AArch64/' $_hkgname.cabal
+}
+
+build() {
+  cd $_hkgname-$_commit
+
+  runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
+    --prefix=/usr --docdir=/usr/share/doc/$pkgname --enable-tests \
+    --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid \
+    --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \
+    --ghc-option='-pie'
+
+  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 $_hkgname-$_commit
+
+  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
+}



More information about the arch-commits mailing list