Date: Saturday, February 4, 2023 @ 21:16:06
  Author: felixonmars
Revision: 1392421

addpkg: pandoc-cli 0.1-1

Added:
  pandoc-cli/
  pandoc-cli/repos/
  pandoc-cli/trunk/
  pandoc-cli/trunk/PKGBUILD

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

Added: pandoc-cli/trunk/PKGBUILD
===================================================================
--- pandoc-cli/trunk/PKGBUILD                           (rev 0)
+++ pandoc-cli/trunk/PKGBUILD   2023-02-04 21:16:06 UTC (rev 1392421)
@@ -0,0 +1,50 @@
+# Maintainer: Felix Yan <[email protected]>
+
+pkgname=pandoc-cli
+pkgver=0.1
+pkgrel=1
+pkgdesc="Conversion between documentation formats"
+url="https://pandoc.org";
+license=("GPL")
+arch=('x86_64')
+provides=('pandoc')
+conflicts=('pandoc')
+replaces=('pandoc')
+depends=('ghc-libs' 'hslua-cli' 'haskell-pandoc' 'haskell-pandoc-lua-engine' 
'haskell-pandoc-server'
+         'haskell-safe' 'haskell-wai-extra' 'haskell-warp')
+makedepends=('ghc' 'uusi')
+source=("https://hackage.haskell.org/packages/archive/$pkgname/$pkgver/$pkgname-$pkgver.tar.gz";)
+sha256sums=('c5d6ac5fecfcbc0c2a69c696dc543e60bcf9685fc3db3ae5d9929abe6c28cb05')
+
+prepare() {
+  cd $pkgname-$pkgver
+  gen-setup
+}
+
+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-pandoc-cli --enable-tests \
+    --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid \
+    --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \
+    --ghc-option='-pie' \
+    -flua -f-nightly -fserver
+
+  runhaskell Setup build
+}
+
+check() {
+  cd $pkgname-$pkgver
+  runhaskell Setup test
+}
+
+package() {
+  cd $pkgname-$pkgver
+  runhaskell Setup copy --destdir="$pkgdir"
+  install -D -m644 COPYING.md -t "$pkgdir"/usr/share/licenses/$pkgname/
+  rm -f "$pkgdir"/usr/share/doc/$pkgname/COPYING.md
+
+  LD_LIBRARY_PATH="$PWD/dist/build" dist/build/pandoc/pandoc --bash-completion 
> pandoc-completion.bash
+  install -Dm644 pandoc-completion.bash 
"$pkgdir"/usr/share/bash-completion/completions/pandoc
+}

Reply via email to