void-packages/srcpkgs/dmenu-custom/template

36 lines
1.0 KiB
Bash

# Template file for 'dmenu-custom'
pkgname=dmenu-custom
version=2024.8.2
revision=1
makedepends="libXinerama-devel libXft-devel freetype-devel pango-devel pkg-config"
short_desc="Customized dmenu"
maintainer="Luca Bilke <luca@bil.ke>"
license="MIT"
homepage="https://git.snaile.de/snailed/dmenu-custom"
distfiles="${homepage}/archive/${version}.tar.gz"
checksum=9eff7934eba82b6eae48da2c550551861746cb02b45b0dfd62f4cc52c80f85a7
replaces="dmenu>=0"
provides="dmenu-5.2_1"
post_patch() {
sed -i -e '/CFLAGS/{s/-Os//;s/=/+=/}' \
-e '/LDFLAGS/{s/-s//;s/=/+=/}' config.mk
}
do_build() {
[ -e ${FILESDIR}/config.h ] && cp ${FILESDIR}/config.h config.h
sed -i -e "s|^FREETYPEINC|#FREETYPEINC|g" \
-e "s|^X11INC|#X11INC|g" \
-e "s|^X11LIB|#X11LIB|g" config.mk
x11inc=$XBPS_CROSS_BASE/usr/include/X11
x11lib=$XBPS_CROSS_BASE/usr/lib
freetypeinc=$XBPS_CROSS_BASE/usr/include/freetype2
make CC="$CC" ${makejobs} X11INC=$x11inc X11LIB=$x11lib FREETYPEINC=$freetypeinc
}
do_install() {
make PREFIX=/usr DESTDIR=${DESTDIR} install
vlicense LICENSE
}