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

Felix Yan felixonmars at archlinux.org
Thu Dec 24 06:59:09 UTC 2020


    Date: Thursday, December 24, 2020 @ 06:59:09
  Author: felixonmars
Revision: 786648

archrelease: copy trunk to community-staging-x86_64

Added:
  haskell-optics-th/repos/community-staging-x86_64/
  haskell-optics-th/repos/community-staging-x86_64/PKGBUILD
    (from rev 786647, haskell-optics-th/trunk/PKGBUILD)

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

Copied: haskell-optics-th/repos/community-staging-x86_64/PKGBUILD (from rev 786647, haskell-optics-th/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2020-12-24 06:59:09 UTC (rev 786648)
@@ -0,0 +1,48 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+_hkgname=optics-th
+pkgname=haskell-optics-th
+pkgver=0.3.0.2
+pkgrel=6
+pkgdesc="Optics construction using TemplateHaskell"
+url="https://github.com/well-typed/optics"
+license=('BSD')
+arch=('x86_64')
+depends=('ghc-libs' 'haskell-optics-core' 'haskell-th-abstraction')
+makedepends=('ghc' 'uusi' 'haskell-tagged')
+source=(https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz)
+sha512sums=('0ebce42453d8bbdc621f8f97aa4a34a8defc66d4ea9d09b466447f01ed440cf84896d8d9326a61eb77daa1b844dd2bf6b8e73b86f585b3c0b1c2ffbab7391691')
+
+prepare() {
+    cd $_hkgname-$pkgver
+    echo -e "import Distribution.Simple\nmain = defaultMain" > Setup.hs
+    uusi $_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
+    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