jobextra/xmonad/PKGBUILD
2024-01-10 02:21:11 +02:00

80 lines
2.9 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 |---------------------------------------
pkgname=xmonad
pkgver=0.17.1
pkgrel=0121
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')
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=(055412bd2179f7f49a9556245dc45031b2a4e20db60f8eb59594661a9b56c730 # xmonad-0.17.1.tar.gz
521bf939309cb8b7d8da6adf9da4e396390249e500a62621d86559dfa4dd6dd8 # dynamic-compilation.patch
2c0603f8779346dcbe2db5b04eaeddb908e15602d3ff5c86905898b9df51cb91) # xmonad.svg
## 9094df3bab58adccf0893e8f2f6dad0f4039fe26c7b3a9ea5a8b8f40e3e3b6e6 xmonad-0.17.1-0121-x86_64.pkg.tar.lz
9094df3bab58adccf0893e8f2f6dad0f4039fe26c7b3a9ea5a8b8f40e3e3b6e6 xmonad-0.17.1-0121-x86_64.pkg.tar.lz
055412bd2179f7f49a9556245dc45031b2a4e20db60f8eb59594661a9b56c730 xmonad-0.17.1.tar.gz