summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaleb Maclennan2020-02-19 16:33:18 +0300
committerCaleb Maclennan2020-02-22 16:57:28 +0300
commit2c1bae0f169a441347abcda21f3199f8cf31ab2f (patch)
treee2d9ecc4ea465689f7ec15cb5be44a4d3c22b43e
parentbbf1151d81cb9cb05aaa80c81ab1fa00f1bde07f (diff)
downloadaur-2c1bae0f169a441347abcda21f3199f8cf31ab2f.tar.gz
Build static binary using stack
This avoids using the system's ever changing shared Haskell deps
-rw-r--r--.SRCINFO63
-rw-r--r--PKGBUILD50
2 files changed, 14 insertions, 99 deletions
diff --git a/.SRCINFO b/.SRCINFO
index a434db0203b1..88b20266f8c6 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,68 +1,11 @@
pkgbase = pandoc-sile-git
- pkgdesc = Conversion between markup formats (sile fork)
+ pkgdesc = Conversion between markup formats (sile fork, static build)
pkgver = 2.9.2.r8.g78db4f240
- pkgrel = 3
+ pkgrel = 4
url = https://pandoc.org
arch = x86_64
license = GPL
- makedepends = ghc
- makedepends = haskell-diff
- makedepends = haskell-tasty
- makedepends = haskell-tasty-hunit
- makedepends = haskell-tasty-lua
- makedepends = haskell-tasty-quickcheck
- makedepends = haskell-tasty-golden
- makedepends = haskell-quickcheck
- makedepends = haskell-executable-path
- depends = ghc-libs
- depends = haskell-http
- depends = haskell-juicypixels
- depends = haskell-sha
- depends = haskell-aeson
- depends = haskell-aeson-pretty
- depends = haskell-attoparsec
- depends = haskell-base-compat
- depends = haskell-base64-bytestring
- depends = haskell-blaze-html
- depends = haskell-blaze-markup
- depends = haskell-case-insensitive
- depends = haskell-cmark-gfm
- depends = haskell-data-default
- depends = haskell-doclayout
- depends = haskell-doctemplates
- depends = haskell-emojis
- depends = haskell-exceptions
- depends = haskell-glob
- depends = haskell-haddock-library
- depends = haskell-ipynb
- depends = haskell-jira-wiki-markup
- depends = haskell-skylighting
- depends = haskell-skylighting-core
- depends = haskell-hslua
- depends = haskell-hslua-module-system
- depends = haskell-hslua-module-text
- depends = haskell-http-client
- depends = haskell-syb
- depends = haskell-hsyaml
- depends = haskell-http-client-tls
- depends = haskell-http-types
- depends = haskell-safe
- depends = haskell-split
- depends = haskell-texmath
- depends = haskell-network
- depends = haskell-pandoc-types
- depends = haskell-random
- depends = haskell-scientific
- depends = haskell-tagsoup
- depends = haskell-temporary
- depends = haskell-text-conversions
- depends = haskell-network-uri
- depends = haskell-unicode-transforms
- depends = haskell-unordered-containers
- depends = haskell-zip-archive
- depends = haskell-vector
- depends = haskell-xml
- depends = haskell-zlib
+ makedepends = stack
optdepends = pandoc-citeproc: for citation rendering with pandoc-citeproc filter
optdepends = pandoc-crossref: for numbering figures, equations, tables and cross-references to them with pandoc-crossref filter
optdepends = texlive-core: for pdf output
diff --git a/PKGBUILD b/PKGBUILD
index dfc4c8f2ed9e..56b466d980a4 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,33 +6,18 @@ _pkgname=pandoc
pkgname=$_pkgname-sile-git
_pkgver=2.9.2
pkgver=2.9.2.r8.g78db4f240
-pkgrel=3
-pkgdesc='Conversion between markup formats (sile fork)'
+pkgrel=4
+pkgdesc='Conversion between markup formats (sile fork, static build)'
url='https://pandoc.org'
license=('GPL')
arch=('x86_64')
-depends=('ghc-libs' 'haskell-http' 'haskell-juicypixels' 'haskell-sha' 'haskell-aeson'
- 'haskell-aeson-pretty' 'haskell-attoparsec' 'haskell-base-compat'
- 'haskell-base64-bytestring' 'haskell-blaze-html' 'haskell-blaze-markup'
- 'haskell-case-insensitive' 'haskell-cmark-gfm' 'haskell-data-default' 'haskell-doclayout'
- 'haskell-doctemplates' 'haskell-emojis' 'haskell-exceptions' 'haskell-glob'
- 'haskell-haddock-library' 'haskell-ipynb' 'haskell-jira-wiki-markup' 'haskell-skylighting'
- 'haskell-skylighting-core' 'haskell-hslua' 'haskell-hslua-module-system'
- 'haskell-hslua-module-text' 'haskell-http-client' 'haskell-syb' 'haskell-hsyaml'
- 'haskell-http-client-tls' 'haskell-http-types' 'haskell-safe' 'haskell-split'
- 'haskell-texmath' 'haskell-network' 'haskell-pandoc-types' 'haskell-random'
- 'haskell-scientific' 'haskell-tagsoup' 'haskell-temporary' 'haskell-text-conversions'
- 'haskell-network-uri' 'haskell-unicode-transforms' 'haskell-unordered-containers'
- 'haskell-zip-archive' 'haskell-vector' 'haskell-xml' 'haskell-zlib')
optdepends=('pandoc-citeproc: for citation rendering with pandoc-citeproc filter'
'pandoc-crossref: for numbering figures, equations, tables and cross-references to them with pandoc-crossref filter'
'texlive-core: for pdf output')
conflicts=('haskell-pandoc' "$_pkgname")
replaces=('haskell-pandoc')
provides=("$_pkgname")
-makedepends=('ghc' 'haskell-diff' 'haskell-tasty' 'haskell-tasty-hunit' 'haskell-tasty-lua'
- 'haskell-tasty-quickcheck' 'haskell-tasty-golden' 'haskell-quickcheck'
- 'haskell-executable-path')
+makedepends=('stack')
source=("git://github.com/alerque/$_pkgname.git#branch=sile-${_pkgver}")
sha512sums=('SKIP')
@@ -44,9 +29,6 @@ pkgver() {
prepare() {
cd "$_pkgname"
- # Nuke build time test options, SILE fork isn't expected to pass yet
- sed -i -e 's!--\(enable-\)\?tests\? ! !' Makefile
-
# TODO: find a better solution
sed -i "s|let env' = dynlibEnv ++ |let env' = dynlibEnv ++ [(\"LD_LIBRARY_PATH\", \"$PWD/dist/build\")] ++ |" test/Tests/Command.hs
}
@@ -54,27 +36,17 @@ prepare() {
build() {
cd "$_pkgname"
- runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
- --prefix=/usr --docdir="/usr/share/doc/${pkgbase}" --datasubdir="$pkgname" --enable-tests \
- --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid \
- -f-trypandoc -f-embed_data_files -f-static
- runhaskell Setup build
- 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 "$_pkgname"
- LC_CTYPE=en_US.UTF-8 runhaskell Setup test || warning "Tests failed"
+ stack setup
+ stack build \
+ --install-ghc \
+ --ghc-options='-fdiagnostics-color=always' \
+ --flag 'pandoc:embed_data_files' \
+ --fast
}
package() {
cd "$_pkgname"
- 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}"
- rm "${pkgdir}/usr/share/doc/${pkgname}/COPYING.md"
+ find ./ -path '*/dist/*' -type f -name pandoc -perm /u+x \
+ -execdir install -Dm755 -t "$pkgdir/usr/bin/" {} \;
install -Dm644 man/pandoc.1 "${pkgdir}"/usr/share/man/man1/pandoc.1
}