[arch-commits] Commit in haskell-shellmet/repos (2 files)

Felix Yan felixonmars at archlinux.org
Thu Sep 10 18:18:50 UTC 2020


    Date: Thursday, September 10, 2020 @ 18:18:50
  Author: felixonmars
Revision: 702132

archrelease: copy trunk to community-staging-x86_64

Added:
  haskell-shellmet/repos/community-staging-x86_64/
  haskell-shellmet/repos/community-staging-x86_64/PKGBUILD
    (from rev 702131, haskell-shellmet/trunk/PKGBUILD)

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

Copied: haskell-shellmet/repos/community-staging-x86_64/PKGBUILD (from rev 702131, haskell-shellmet/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2020-09-10 18:18:50 UTC (rev 702132)
@@ -0,0 +1,52 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: berberman <hatsue at typed.icu>
+
+_hkgname=shellmet
+pkgname=haskell-shellmet
+pkgver=0.0.3.1
+pkgrel=9
+pkgdesc="Shellmet provides easy and convenient way to call shell commands from Haskell programs."
+url="https://github.com/kowainik/shellmet"
+license=('MPL2')
+arch=('x86_64')
+depends=('ghc-libs')
+makedepends=('ghc' 'haskell-doctest' 'haskell-glob')
+source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz")
+sha256sums=('b9f084f47a6ae711b1e505e2f90d8d202d94f62950be98ceafc668b306473b25')
+
+prepare(){
+  cd $_hkgname-$pkgver
+  echo -e "import Distribution.Simple\nmain = defaultMain" > Setup.hs
+  sed -i '/executable readme/a\  buildable: False' $_hkgname.cabal
+}
+
+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 $MAKEFLAGS
+  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 $_hkgname-$pkgver
+  runhaskell Setup test
+}
+
+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 "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+  rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE
+}


More information about the arch-commits mailing list