Date: Monday, October 10, 2022 @ 20:37:28
  Author: felixonmars
Revision: 1327284

addpkg: cbor-tool 0.2.2.0-1

Added:
  cbor-tool/
  cbor-tool/repos/
  cbor-tool/trunk/
  cbor-tool/trunk/PKGBUILD

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

Added: cbor-tool/trunk/PKGBUILD
===================================================================
--- cbor-tool/trunk/PKGBUILD                            (rev 0)
+++ cbor-tool/trunk/PKGBUILD    2022-10-10 20:37:28 UTC (rev 1327284)
@@ -0,0 +1,44 @@
+# Maintainer: Felix Yan <[email protected]>
+
+pkgname=cbor-tool
+pkgver=0.2.2.0
+pkgrel=1
+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=haskell-cbor-tool --enable-tests \
+    --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid \
+    --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \
+    --ghc-option='-pie' 
+
+  runhaskell Setup build
+}
+
+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
+}

Reply via email to