jobextra/xmonad/PKGBUILD

87 lines
3.0 KiB
Bash

#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcomm/$pkgname"
# Website : https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------
#
# This pkg was dropped, this is nothing but Lightweight and comes with a
# tremendous overhead of dependencies.
# We will keep this in our git for anyone who wants to continue using it/building it.
#
pkgname=xmonad
pkgver=0.17.2
pkgrel=01
pkgdesc='Lightweight X11 tiled window manager written in Haskell'
url='https://xmonad.org/'
depends=('ghc' 'haskell-x11' 'haskell-data-default-class' 'haskell-setlocale')
makedepends=('gendesk' 'pandoc' 'haskell-quickcheck' 'haskell-quickcheck-instances' 'haskell-quickcheck-classes')
optdepends=('xorg-xmessage: for displaying visual error messages')
source=(${pkgname}-${pkgver}.tar.gz::https://github.com/xmonad/xmonad/archive/v${pkgver}.tar.gz
dynamic-compilation.patch
xmonad.svg)
prepare() {
gendesk --pkgname "${pkgname}" --pkgdesc "${pkgdesc}"
cd ${pkgname}-${pkgver}
patch -p1 -i "${srcdir}/dynamic-compilation.patch"
}
build() {
cd ${pkgname}-${pkgver}
runhaskell Setup configure -O \
--enable-shared \
--enable-executable-dynamic \
--disable-library-vanilla \
--prefix=/usr \
--dynlibdir=/usr/lib \
--docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname \
--enable-tests \
--libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm \
--ghc-option=-optl-Wl\,-z\,relro\,-z\,now \
--ghc-option='-pie'
runhaskell Setup build $MAKEFLAGS
runhaskell Setup register --gen-script
runhaskell Setup unregister --gen-script
sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
make -C man xmonad.1 --always-make
}
check() {
cd ${pkgname}-${pkgver}
runhaskell Setup test --show-details=direct
}
package() {
cd ${pkgname}-${pkgver}
install -Dm 744 register.sh "${pkgdir}/usr/share/haskell/register/${pkgname}.sh"
install -Dm 744 unregister.sh "${pkgdir}/usr/share/haskell/unregister/${pkgname}.sh"
runhaskell Setup.lhs copy --destdir="${pkgdir}"
install -Dm 644 man/xmonad.1 -t "${pkgdir}/usr/share/man/man1"
install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/xmonad"
install -Dm 644 "$srcdir/xmonad.svg" -t "${pkgdir}/usr/share/pixmaps"
install -Dm 644 "$srcdir/xmonad.desktop" -t "${pkgdir}/usr/share/xsessions"
}
#---- arch license gpg-key & sha256sums ----
arch=(x86_64)
license=('BSD')
sha256sums=(137caa6b2e711728ed2363dc1dd37712aaec044137f7a2e687665f848e52067b # xmonad-0.17.2.tar.gz
521bf939309cb8b7d8da6adf9da4e396390249e500a62621d86559dfa4dd6dd8 # dynamic-compilation.patch
2c0603f8779346dcbe2db5b04eaeddb908e15602d3ff5c86905898b9df51cb91) # xmonad.svg
## 1db741fc32bb0f0f4f0da5840f5c57a7af668aa06568e693821a467d88cff081 xmonad-0.17.2-01-x86_64.pkg.tar.lz