upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / haskell-language-haskell-extract / trunk / PKGBUILD
blobbdb53ffc909a6bbabc691b906b9ead916369003e
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 _hkgname=language-haskell-extract
4 pkgname=haskell-language-haskell-extract
5 pkgver=0.2.4
6 pkgrel=15
7 pkgdesc="Module to automatically extract functions from the local code"
8 url="https://github.com/finnsson/language-haskell-extract"
9 license=('BSD')
10 arch=('x86_64')
11 depends=('ghc-libs' 'haskell-regex-posix')
12 makedepends=('ghc')
13 source=(https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz
14         ghc-8.10.patch)
15 sha512sums=('6408459abf9d531ccbe7d65766d38fcb93f4d3f9c77db1a706231bf6d8ad6f845fcefc4fbb03833f45c74f21f324a44760f3c89ff093c69f1f9999e64344ab4d'
16             '2992e1e0ca320b4689388e8ff0588611de0ae54ea1c0dde537cda708957e95f2c03f56d818862470ca354d321f032867546cf2c1c72bfeec148fe71befcd9e32')
18 prepare() {
19     cd $_hkgname-$pkgver
20     patch -p1 -i ../ghc-8.10.patch
23 build() {
24     cd $_hkgname-$pkgver
26     runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
27         --prefix=/usr --docdir=/usr/share/doc/$pkgname --enable-tests \
28         --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm
29     runhaskell Setup build $MAKEFLAGS
30     runhaskell Setup register --gen-script
31     runhaskell Setup unregister --gen-script
32     sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
33     sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
36 check() {
37     cd $_hkgname-$pkgver
38     runhaskell Setup test --show-details=direct
41 package() {
42     cd $_hkgname-$pkgver
44     install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
45     install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
46     runhaskell Setup copy --destdir="$pkgdir"
47     install -D -m644 "BSD3.txt" "${pkgdir}/usr/share/licenses/${pkgname}/BSD3.txt"
48     rm -f "${pkgdir}/usr/share/doc/${pkgname}/BSD3.txt"