upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / haskell-arch-web / trunk / PKGBUILD
blob3ed0a7b3a18c90f5469a2d434521967839da8e78
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 _hkgname=arch-web
4 pkgname=haskell-arch-web
5 pkgver=0.1.1
6 pkgrel=125
7 pkgdesc="Arch Linux official and AUR web interface binding"
8 url="https://github.com/berberman/arch-web"
9 license=("MIT")
10 arch=('x86_64')
11 depends=('ghc-libs' 'haskell-aeson' 'haskell-deriving-aeson' 'haskell-http-client'
12          'haskell-http-client-tls' 'haskell-http-types' 'haskell-lens' 'haskell-servant'
13          'haskell-servant-client' 'haskell-servant-client-core')
14 makedepends=('ghc' 'uusi' 'haskell-hunit')
15 source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz")
16 sha256sums=('0d786f2f6da1f9b64e3c82838546152faf9c01f351cbb13b2bbb7f785a0d9de2')
18 prepare() {
19   cd $_hkgname-$pkgver
20   uusi -u aeson -u lens -u servant $_hkgname.cabal
21   gen-setup
24 build() {
25   cd $_hkgname-$pkgver
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     --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \
31     --ghc-option='-pie'
33   runhaskell Setup build $MAKEFLAGS
34   runhaskell Setup register --gen-script
35   runhaskell Setup unregister --gen-script
36   sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
37   sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
40 check() {
41   cd $_hkgname-$pkgver
42   runhaskell Setup test --show-details=direct
45 package() {
46   cd $_hkgname-$pkgver
48   install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
49   install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
50   runhaskell Setup copy --destdir="$pkgdir"
51   install -D -m644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
52   rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE