upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / xmobar / trunk / PKGBUILD
blob4bdfffbaf7df777c84c8dbe7f15835eb2af6a038
1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
2 # Maintainer: Jelle van der Waa <jelle@archlinux.org>
3 # Contributer: Sergej Pupykin <pupykin.s+arch@gmail.com>
4 # Contributor: Arch Haskell Team <arch-haskell@haskell.org>
6 pkgname=xmobar
7 pkgver=0.46
8 pkgrel=32
9 pkgdesc='Minimalistic Text Based Status Bar'
10 url='https://codeberg.org/xmobar/xmobar'
11 license=('BSD')
12 arch=('x86_64')
13 depends=('libxft' 'libxinerama' 'libxrandr' 'libxpm' 'ghc-libs' 'haskell-x11' 'pango'
14          'haskell-x11-xft' 'haskell-utf8-string' 'haskell-network-uri'
15          'haskell-hinotify' 'haskell-parsec-numbers'
16          'haskell-regex-compat' 'haskell-old-locale'
17          'haskell-http' 'haskell-dbus' 'haskell-libmpd' 'haskell-cereal' 'haskell-netlink'
18          'haskell-async' 'haskell-aeson'
19          'haskell-timezone-olson' 'haskell-timezone-series' 'alsa-lib'
20          'haskell-extensible-exceptions' 'haskell-http-conduit'
21          'haskell-http-types' 'haskell-http-client-tls' 'haskell-alsa-core' 'haskell-alsa-mixer'
22          'haskell-cairo' 'haskell-pango' 'haskell-colour')
23 makedepends=('ghc' 'haskell-hspec' 'haskell-temporary')
24 source=(${pkgname}-${pkgver}.tar.gz::https://codeberg.org/xmobar/xmobar/archive/${pkgver}.tar.gz
25         dynamic-compilation.patch)
26 sha512sums=('319f3a77d500c505826ab487e4011bb1a22b8cae70c17b964574a09a6488a864a1aaabb6a298468d121110dd485f179bc712a5106e49eb8ae638e02b5115190a'
27             '15db3e27d1ff957e26e706e4c67cec6e43d89f5a39cd6d81ddb5ae8426e32d938494fbba39fa322461d992a95d2e522c10b186a1ca2c5c3e996f944b6e6ef7c4')
29 prepare() {
30   cd xmobar
31   patch -p1 -i "${srcdir}/dynamic-compilation.patch"
34 build() {
35   cd xmobar
37   _flags=(with_xft with_inotify with_mpd with_alsa with_nl80211
38           with_datezone with_mpris with_dbus with_xpm with_threaded
39           with_rtsopts with_weather)
41   runhaskell setup configure -O \
42     --enable-shared \
43     --enable-executable-dynamic \
44     --disable-library-vanilla \
45     --prefix=/usr \
46     --dynlibdir=/usr/lib \
47     --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm \
48     --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \
49     --ghc-option='-pie' \
50     --flags="${_flags[*]}" \
51     --enable-tests
52   runhaskell setup build
53   runhaskell setup register --gen-script
54   runhaskell setup unregister --gen-script
55   sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
56   sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
59 check() {
60   cd xmobar
61   runhaskell setup test
64 package() {
65   cd xmobar
66   install -Dm 744 register.sh   "${pkgdir}/usr/share/haskell/register/xmobar.sh"
67   install -Dm 744 unregister.sh "${pkgdir}/usr/share/haskell/unregister/xmobar.sh"
68   runhaskell setup copy --destdir="${pkgdir}"
69   install -Dm 644 license -t "${pkgdir}/usr/share/licenses/${pkgname}"
72 # vim: ts=2 sw=2 et: