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

Felix Yan felixonmars at archlinux.org
Wed Dec 23 21:21:47 UTC 2020


    Date: Wednesday, December 23, 2020 @ 21:21:47
  Author: felixonmars
Revision: 785302

archrelease: copy trunk to community-staging-x86_64

Added:
  haskell-type-equality/repos/community-staging-x86_64/
  haskell-type-equality/repos/community-staging-x86_64/PKGBUILD
    (from rev 785301, haskell-type-equality/trunk/PKGBUILD)

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

Copied: haskell-type-equality/repos/community-staging-x86_64/PKGBUILD (from rev 785301, haskell-type-equality/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2020-12-23 21:21:47 UTC (rev 785302)
@@ -0,0 +1,48 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+_hkgname=type-equality
+pkgname=haskell-type-equality
+pkgver=1
+pkgrel=8
+pkgdesc="Data.Type.Equality compat package"
+url="https://github.com/commercialhaskell/type-equality"
+license=('BSD')
+arch=('x86_64')
+depends=('ghc-libs')
+makedepends=('ghc')
+source=(https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz)
+sha512sums=('633675251719afa59c311ae82d18476d6e000fbbdc553a29da598da38a29cf73fffcbcd4b23a70dd397f10734ba6617633390874eea8a563a1e258654a9fe7d8')
+
+prepare() {
+    cd $_hkgname-$pkgver
+    sed -i 's/< *4.14/<5/' $_hkgname.cabal
+    echo -e "import Distribution.Simple\nmain = defaultMain" > Setup.hs
+}
+
+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
+    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