Date: Wednesday, April 5, 2023 @ 06:09:57
Author: felixonmars
Revision: 1436034
archrelease: copy trunk to community-staging-x86_64
Added:
haskell-cborg/repos/community-staging-x86_64/
haskell-cborg/repos/community-staging-x86_64/PKGBUILD
(from rev 1436031, haskell-cborg/trunk/PKGBUILD)
----------+
PKGBUILD | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)
Copied: haskell-cborg/repos/community-staging-x86_64/PKGBUILD (from rev
1436031, haskell-cborg/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD (rev 0)
+++ community-staging-x86_64/PKGBUILD 2023-04-05 06:09:57 UTC (rev 1436034)
@@ -0,0 +1,51 @@
+# Maintainer: Felix Yan <[email protected]>
+
+_hkgname=cborg
+pkgname=haskell-cborg
+pkgver=0.2.8.0
+pkgrel=35
+pkgdesc="Concise Binary Object Representation (CBOR)"
+url="https://github.com/well-typed/cborg"
+license=('BSD')
+arch=('x86_64')
+depends=('ghc-libs' 'haskell-half' 'haskell-primitive')
+makedepends=('ghc' 'uusi' 'haskell-aeson' 'haskell-base-orphans'
'haskell-base16-bytestring'
+ 'haskell-base64-bytestring' 'haskell-quickcheck'
'haskell-scientific' 'haskell-tasty'
+ 'haskell-tasty-hunit' 'haskell-tasty-quickcheck' 'haskell-vector')
+source=(https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz)
+sha512sums=('415afe049475deac12914c06ae94225268163a5a1d59e0783b0dcce529cfb9cfd6aed2c43f67b0ae7c0eac62f222671595daca49ef2d0cb31313c16955bf592d')
+
+prepare() {
+ cd $_hkgname-$pkgver
+ # https://github.com/well-typed/cborg/issues/290
+ sed -i 's/hiding (copyByteArrayToPtr)/hiding (copyByteArrayToPtr,
copyPtrToMutableByteArray)/' src/Codec/CBOR/Magic.hs
+ uusi -u vector $_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 --datasubdir=$pkgname
--enable-tests \
+ --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid
--ghc-option=-fllvm
+ 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 --show-details=direct
+}
+
+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.txt -t "$pkgdir"/usr/share/licenses/$pkgname/
+ rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE.txt
+}