blob: 9a8aa6690572831bcb4dc0e2b70f4b415570c27b (
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
|
pkgname=haskell-latex-formulae-pandoc
_hkgname=latex-formulae-pandoc
pkgver=0.2.0.6
pkgrel=4
pkgdesc="Render LaTeX formulae in pandoc documents to images with an actual LaTeX installation"
url="https://hackage.haskell.org/package/latex-formulae-pandoc"
license=('BSD')
arch=('x86_64' 'i686' 'aarch64')
depends=('ghc-libs'
'haskell-juicypixels'
'haskell-base64-bytestring'
'haskell-pandoc-types'
'haskell-latex-formulae-image')
makedepends=('ghc')
source=(${pkgname}-${pkgver}.tar.gz::"https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz"
cabal.patch
Pandoc.hs.patch)
sha256sums=('2efc0b9238e237eeacdf3c24f80b7a7546175d4edcb5e86a6f6ffad4769d0c88'
'6d1dfb1d95ffbeb09ae82a1e202260cf77688aabb9318916edb42eaa7d8928f2'
'33e6cb538ce21351ff0d6211c6d95dbeb0af30382c9e80a2b6087a5c23fd3987')
prepare() {
cd ${_hkgname}-${pkgver}
patch --forward --strip=1 --input="${srcdir}/cabal.patch"
patch --forward --strip=1 --input="${srcdir}/Pandoc.hs.patch"
}
build() {
cd ${_hkgname}-${pkgver}
runghc Setup.hs configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
--prefix=/usr --docdir="/usr/share/doc/${pkgname}" \
--dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid
runghc Setup.hs build
runghc Setup.hs register --gen-script
runghc Setup.hs 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
}
package() {
cd ${_hkgname}-${pkgver}
runghc Setup.hs copy --destdir="${pkgdir}"
mkdir -p ${pkgdir}/usr/share/licenses/${pkgname}
mv "${pkgdir}/usr/share/doc/${pkgname}/LICENSE" "${pkgdir}/usr/share/licenses/${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"
}
|