# Contributor: Eivind Uggedal <eivind@uggedal.com>
# Maintainer: Sören Tempel <soeren+alpine@soeren-tempel.net>
pkgname=dmenu
pkgver=4.8
pkgrel=0
pkgdesc="Dynamic menu for X"
url="https://tools.suckless.org/dmenu/"
arch="all"
license="MIT"
depends=""
depends_dev=""
makedepends="libx11-dev libxinerama-dev libxft-dev"
install=""
options="!check"
subpackages="$pkgname-doc"
source="http://dl.suckless.org/tools/$pkgname-$pkgver.tar.gz"
builddir="$srcdir"/$pkgname-$pkgver

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

build() {
	make X11INC=/usr/include/X11 \
		X11LIB=/usr/lib/X11 \
		FREETYPEINC=/usr/include/freetype2 \
		-C "$builddir"
}

package() {
	make DESTDIR=$pkgdir PREFIX=/usr \
		-C "$builddir" install
}

sha512sums="fa2700018cfb912a21f867ef3ca771a58a25c2cb8e1fb37acef046bb15d8d8b92dcc5bfce486befae0f143495d0283910988e181a9eb143be3bb1b5be9738d77  dmenu-4.8.tar.gz"
