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

Felix Yan felixonmars at archlinux.org
Sun Jun 6 19:38:57 UTC 2021


    Date: Sunday, June 6, 2021 @ 19:38:57
  Author: felixonmars
Revision: 956312

archrelease: copy trunk to community-x86_64

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

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

Copied: haskell-ghc-api-compat/repos/community-x86_64/PKGBUILD (from rev 956311, haskell-ghc-api-compat/trunk/PKGBUILD)
===================================================================
--- community-x86_64/PKGBUILD	                        (rev 0)
+++ community-x86_64/PKGBUILD	2021-06-06 19:38:57 UTC (rev 956312)
@@ -0,0 +1,45 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+_hkgname=ghc-api-compat
+pkgname=haskell-ghc-api-compat
+pkgver=8.6
+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')
+source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz")
+sha256sums=('7a70211154601ec88cb1acc4e4c69f023a4258bbbb23e3e13bdf25977159b6df')
+
+prepare() {
+  cd $_hkgname-$pkgver
+  gen-setup
+}
+
+build() {
+  cd $_hkgname-$pkgver
+
+  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-$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
+}



More information about the arch-commits mailing list