archrelease: copy trunk to community-any
[ArchLinux/community.git] / xmonad / repos / community-x86_64 / PKGBUILD
blob36cab7d75812d2e2598478cdcca19b7cb4c0d8fc
1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
2 # Maintainer: Jelle van der Waa <jelle@archlinux.org>
3 # Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
4 # Contributor: Vesa Kaihlavirta <vegai@iki.fi>
5 # Contributor: shild <shildv@gmail.com>
7 pkgname=xmonad
8 pkgver=0.17.1
9 pkgrel=93
10 pkgdesc='Lightweight X11 tiled window manager written in Haskell'
11 url='https://xmonad.org/'
12 arch=('x86_64')
13 license=('BSD')
14 depends=('ghc' 'haskell-x11' 'haskell-data-default-class' 'haskell-setlocale')
15 makedepends=('gendesk' 'pandoc' 'haskell-quickcheck' 'haskell-quickcheck-instances')
16 optdepends=('xorg-xmessage: for displaying visual error messages')
17 source=(${pkgname}-${pkgver}.tar.gz::https://github.com/xmonad/xmonad/archive/v${pkgver}.tar.gz
18         dynamic-compilation.patch
19         xmonad.svg)
20 sha512sums=('606f0f94ded7d62790e65157333787579a74e3f948a56eab1eddf5dbffd989e5d308b2a79a41b0b81435b8f62d3962f2a9f629274a9fed6688b750f471128665'
21             'ddfc766627459c804c3d675250132d0d9b34db0d1c6191ec91717801f6ee495521303d3f0f288cc162abf9d141ee3d276167b6540fa6c806340b90f9229bb377'
22             '31f0ceb724a9931aeda75ab706c8908b5d8341af4df50ab1d749814baacb748ad3622601cd99ac03bf936b698fcd854b23d1541e1772306e3337a13a79b110b6')
24 prepare() {
25   gendesk --pkgname "${pkgname}" --pkgdesc "${pkgdesc}"
26   cd ${pkgname}-${pkgver}
27   patch -p1 -i "${srcdir}/dynamic-compilation.patch"
30 build() {
31   cd ${pkgname}-${pkgver}
33   runhaskell Setup configure -O \
34     --enable-shared \
35     --enable-executable-dynamic \
36     --disable-library-vanilla \
37     --prefix=/usr \
38     --dynlibdir=/usr/lib \
39     --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname \
40     --enable-tests \
41     --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm \
42     --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \
43     --ghc-option='-pie'
44   runhaskell Setup build $MAKEFLAGS
45   runhaskell Setup register --gen-script
46   runhaskell Setup unregister --gen-script
47   sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
48   sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
49   
50   make -C man xmonad.1 --always-make
53 check() {
54   cd ${pkgname}-${pkgver}
55   runhaskell Setup test --show-details=direct
58 package() {
59   cd ${pkgname}-${pkgver}
61   install -Dm 744 register.sh   "${pkgdir}/usr/share/haskell/register/${pkgname}.sh"
62   install -Dm 744 unregister.sh "${pkgdir}/usr/share/haskell/unregister/${pkgname}.sh"
64   runhaskell Setup.lhs copy --destdir="${pkgdir}"
66   install -Dm 644 man/xmonad.1 -t "${pkgdir}/usr/share/man/man1"
67   install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/xmonad"
68   install -Dm 644 "$srcdir/xmonad.svg" -t "${pkgdir}/usr/share/pixmaps"
69   install -Dm 644 "$srcdir/xmonad.desktop" -t "${pkgdir}/usr/share/xsessions"
72 # vim: ts=2 sw=2 et: