Date: Saturday, May 13, 2023 @ 22:11:31
Author: felixonmars
Revision: 1460599
archrelease: copy trunk to community-staging-x86_64
Added:
cbor-tool/repos/community-staging-x86_64/
cbor-tool/repos/community-staging-x86_64/PKGBUILD
(from rev 1460597, cbor-tool/trunk/PKGBUILD)
----------+
PKGBUILD | 44 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 44 insertions(+)
Copied: cbor-tool/repos/community-staging-x86_64/PKGBUILD (from rev 1460597,
cbor-tool/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD (rev 0)
+++ community-staging-x86_64/PKGBUILD 2023-05-13 22:11:31 UTC (rev 1460599)
@@ -0,0 +1,44 @@
+# Maintainer: Felix Yan <[email protected]>
+
+pkgname=cbor-tool
+pkgver=0.2.2.0
+pkgrel=34
+pkgdesc="A tool for manipulating CBOR"
+url="https://github.com/well-typed/cborg"
+license=("BSD")
+arch=('x86_64')
+depends=('ghc-libs' 'haskell-aeson' 'haskell-aeson-pretty' 'haskell-cborg'
'haskell-cborg-json'
+ 'haskell-scientific' 'haskell-unordered-containers' 'haskell-vector')
+makedepends=('ghc' 'uusi')
+source=("https://hackage.haskell.org/packages/archive/$pkgname/$pkgver/$pkgname-$pkgver.tar.gz")
+sha256sums=('d720f1caa98153bebea7ade4a0f1f53010a5febd2d53925c945e26f8c3b75667')
+
+prepare() {
+ cd $pkgname-$pkgver
+ uusi -u aeson -u vector $pkgname.cabal
+}
+
+build() {
+ cd $pkgname-$pkgver
+
+ runhaskell Setup configure -O --enable-shared --enable-executable-dynamic
--disable-library-vanilla \
+ --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname
--datasubdir=haskell-cbor-tool --enable-tests \
+ --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid
--ghc-option=-fllvm \
+ --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \
+ --ghc-option='-pie'
+
+ runhaskell Setup build $MAKEFLAGS
+}
+
+check() {
+ cd $pkgname-$pkgver
+ runhaskell Setup test --show-details=direct
+}
+
+package() {
+ cd $pkgname-$pkgver
+
+ 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
+}