# Contributor: Gaber Ayoubi <gaber.ayoubi@gmail.com>
# Maintainer: Sören Tempel <soeren+alpine@soeren-tempel.net>
pkgname=dwm
pkgver=6.5
pkgrel=0
pkgdesc="dwm - dynamic window manager"
url="https://dwm.suckless.org"
arch="all"
license="MIT"
depends="dmenu-virtual st-virtual"
makedepends="libxft-dev libx11-dev libxinerama-dev"
subpackages="$pkgname-doc"
options="!check" # no test suite
source="https://dl.suckless.org/dwm/dwm-$pkgver.tar.gz
	dwm.desktop
	"

provides="dwm-virtual"
provider_priority=100

prepare() {
	default_prepare
	sed -i -e '/CFLAGS/{s/-Os//;s/=/+=/}' \
		-e '/LDFLAGS/{s/=/+=/}' \
		"$builddir"/config.mk
}

build() {
	make X11INC=/usr/include/X11 \
		X11LIB=/usr/lib/X11 \
		FREETYPEINC=/usr/include/freetype2
}

package() {
	make PREFIX=/usr DESTDIR="$pkgdir" install
	install -Dm644 "$srcdir"/dwm.desktop \
		-t "$pkgdir"/usr/share/xsessions/
}

sha512sums="
6cc3efd8d8a5e96517474fdcb1c1a6192fdf669c1bb02de6aea0a9f1a951360bf73c9576a5a0f06b00e2f839bacc304d60548d5ead0996bf46d82be4121ed248  dwm-6.5.tar.gz
e8d200e40242531b33fc521501318f0c01fec2cd6029abbcf28cdd775909079bdc51e589d599e66729f36357d4b355db0e03160708d0756cf9e7f3f8b60b1d80  dwm.desktop
"
