blob: 48d4f1697cce8789af3ac1a6eccbe0b0818f0322 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
# Contributor: Jean-Louis Fuchs <jean-louis.fuchs@adfinis-sygroup.ch>
# Maintainer: Jean-Louis Fuchs <jean-louis.fuchs@adfinis-sygroup.ch>
pkgname=pandoc
pkgver=2.9.2
pkgrel=0
pkgdesc="universal markup converter"
url="https://pandoc.org/"
# ghc only supports x86_64
arch="x86_64"
license="GPL-2.0-or-later"
makedepends="ghc cabal zlib-dev zlib-static"
subpackages="$pkgname-doc"
source="http://hackage.haskell.org/package/pandoc-$pkgver/pandoc-$pkgver.tar.gz
cabal.project.freeze
disable-pandoc-citeproc.patch"
# Cabal seems to be built without sandbox, moving the cabal-dir into src
export CABAL_DIR="$srcdir/cabal"
prepare() {
default_prepare
cp "$srcdir/cabal.project.freeze" . # Created using "cabal freeze"
cabal update
cabal configure \
--prefix='/usr' \
--enable-tests \
--enable-split-sections \
--ghc-option="-split-sections" \
--ghc-option="-j" \
--ghc-option="-O1" \
--flags="+embed_data_files -trypandoc +static"
}
build() {
cabal install --only-dependencies
cabal build
}
check() {
cabal test
}
package() {
_bindir="$pkgdir/usr/bin"
mkdir -p "$_bindir"
cabal install \
--installdir="$_bindir" \
--install-method=copy
install -Dm644 man/pandoc.1 "$pkgdir"/usr/share/man/man1/pandoc.1
}
sha512sums="af67ad7ff6f5f16d62a9a5b988bb402f17e5774fcc91a7be56d95b2694640051628495c526ae9f92095ec7050ebb096db5d23ef07a105e73bbf50386a67eb532 pandoc-2.9.2.tar.gz
d4378db2ebcac803d4b2fb1d4c8a6828acdbab6dae52825014f04cc056a149304ec759716a35de51a73f656824e466847d877b049d9ea3859b54fa9cec3145ea cabal.project.freeze
d00f46b0f7bc1848ae228233b2243717adb50c648fd6101ac4abf610a3c4fa130130b6944fc90c207466590f27d800793f578e742aff46a2677bbdcd22066e42 disable-pandoc-citeproc.patch"
|