Date: Wednesday, December 23, 2020 @ 21:42:11
  Author: felixonmars
Revision: 785370

archrelease: copy trunk to community-staging-x86_64

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

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

Copied: haskell-magic/repos/community-staging-x86_64/PKGBUILD (from rev 785369, 
haskell-magic/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD                           (rev 0)
+++ community-staging-x86_64/PKGBUILD   2020-12-23 21:42:11 UTC (rev 785370)
@@ -0,0 +1,38 @@
+# Maintainer: Felix Yan <felixonm...@archlinux.org>
+# Contributor: Arch Haskell Team <arch-hask...@haskell.org>
+
+_hkgname=magic
+pkgname=haskell-magic
+pkgver=1.1
+pkgrel=20
+pkgdesc="Interface to C file/magic library"
+url="https://hackage.haskell.org/package/magic";
+license=("BSD")
+arch=('x86_64')
+depends=('ghc-libs' "file")
+makedepends=('ghc')
+source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz";)
+sha512sums=('f400396b0f82f9655376ac72e721badcf60c356c8594b4b67922890f55bac8e15b7aa856fdf61942c40b2622bdc231914994968af3b98d353bf50aed09ebbef5')
+
+build() {
+    cd $_hkgname-$pkgver
+    
+    runhaskell Setup configure -O --enable-shared --enable-executable-dynamic 
--disable-library-vanilla \
+        --prefix=/usr --docdir=/usr/share/doc/$pkgname \
+        --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
+}
+
+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 "COPYING" 
"${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
+    rm -f "${pkgdir}/usr/share/doc/${pkgname}/COPYING"
+}

Reply via email to