summaryrefslogtreecommitdiff
path: root/~fauno/pandoc/PKGBUILD
blob: d5ecf698ce836e94f73d661c3e242bc0ee51fdd5 (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
# Maintainer: Nicolas Reynolds <fauno@kiwwwi.com.ar>
# Based on haskell-pandoc
# custom variables
_hkgname=pandoc
_licensefile=COPYING

# PKGBUILD options/directives
pkgname=pandoc
pkgver=1.9.1.2
pkgrel=1
pkgdesc='Conversion between markup formats (no Haskell libs)'
url='http://johnmacfarlane.net/pandoc/'
license=('GPL')
arch=('i686' 'x86_64')
makedepends=('ghc' 'sh' 'cabal-install')
options=('strip')
source=(https://repo.parabolagnulinux.org/other/${pkgname}-${pkgver}-${pkgrel}-any.src.tar.xz{,.sig})
conflicts=('haskell-pandoc')
md5sums=('8b71e4a113f5b3bf456cf335d4f365f1'
         '01f99b7d67d0726fe6b80396ead780d1')

# PKGBUILD functions
build() {
    mkdir -p ${srcdir}/{build,${_hkgname}-${pkgver}}
    cd ${srcdir}/${_hkgname}-${pkgver}

    HOME=${srcdir}/${_hkgname}-${pkgver} \
    cabal install --prefix=${srcdir}/build/usr \
                  --enable-shared \
                  ${_hkgname}-${pkgver}
}

package() {
# Copy everything, but remove docs and haskell-libs
    cp -a ${srcdir}/build/usr ${pkgdir}/
    rm -r ${pkgdir}/usr/{lib,share/*}

    cp -a ${srcdir}/build/usr/share/man ${pkgdir}/usr/share/
    cp -a ${srcdir}/build/usr/share/doc ${pkgdir}/usr/share/
    find ${pkgdir}/usr/share -type f -exec chmod 644 {} \;
    find ${pkgdir}/usr/share -type d -exec chmod 755 {} \;
}