archrelease: copy trunk to community-any
[arch-community.git] / haskell-system-filepath / trunk / PKGBUILD
blob320c80acadc0d929339a3be8799084e39ae915a6
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Arch Haskell Team <arch-haskell@haskell.org>
4 _hkgname=system-filepath
5 pkgname=haskell-system-filepath
6 pkgver=0.4.14
7 pkgrel=226
8 pkgdesc="High-level, byte-based file and directory path manipulations"
9 url="https://hackage.haskell.org/package/${_hkgname}"
10 license=("BSD")
11 arch=('x86_64')
12 depends=('ghc-libs')
13 makedepends=('ghc' 'haskell-chell' 'haskell-chell-quickcheck')
14 source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
15 sha512sums=('d858b077516ecb76e27d032fd123aadbbbb154afea87fab93f148aa8a0007587c1fb04d87217cf0b51a80e9a81ab20357dcc5e345899e1c2b6513900da1e6768')
17 export LC_ALL=en_US.UTF-8
19 prepare() {
20     cd $_hkgname-$pkgver
21     sed -i 's/< *0.5/<1/' $_hkgname.cabal
24 build() {
25     cd $_hkgname-$pkgver
26     
27     runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
28         --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname --enable-tests \
29         --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm
30     runhaskell Setup build $MAKEFLAGS
31     runhaskell Setup register --gen-script
32     runhaskell Setup unregister --gen-script
33     sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
34     sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
37 check() {
38     cd $_hkgname-$pkgver
39     runhaskell Setup test || echo "Tests failed"
42 package() {
43     cd $_hkgname-$pkgver
44     
45     install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
46     install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
47     runhaskell Setup copy --destdir="$pkgdir"
48     install -D -m644 "license.txt" "${pkgdir}/usr/share/licenses/${pkgname}/license.txt"
49     rm -f "${pkgdir}/usr/share/doc/${pkgname}/license.txt"