void-packages/srcpkgs/dmenu/template

81 lines
2.8 KiB
Bash
Raw Normal View History

# Template file for 'dmenu'
pkgname=dmenu
2012-08-09 10:32:55 +02:00
version=4.5
2015-05-20 19:54:10 +02:00
revision=10
2014-09-06 21:55:19 +02:00
makedepends="libXinerama-devel $(vopt_if xft 'libXft-devel freetype-devel')"
short_desc="A generic menu for X"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
license="MIT"
2012-08-09 10:32:55 +02:00
homepage="http://tools.suckless.org/dmenu/"
2015-05-20 19:54:10 +02:00
distfiles="http://dl.suckless.org/tools/${pkgname}-${version}.tar.gz"
checksum="082cd698d82125ca0b3989006fb84ac4675c2a5585bf5bb8af0ea09cfb95a850"
2014-09-06 21:55:19 +02:00
2015-05-20 19:54:10 +02:00
build_options="xft fuzzymatch monarg mouse"
2014-09-06 21:55:19 +02:00
desc_option_xft="Enable Xft font support"
2015-05-20 19:54:10 +02:00
desc_option_fuzzymatch="Enable Fuzzymatch support"
desc_option_monarg="Enable monitor argument support"
desc_option_mouse="Enable mouse support"
if [ "$build_option_xft" ]; then
distfiles+=" http://tools.suckless.org/dmenu/patches/dmenu-${version}-xft.diff"
skip_extraction+=" ${pkgname}-${version}-xft.diff"
checksum+=" efb4095d65e5e86f9dde97294732174409c24f319bdd4824cc22fa1404972b4f"
fi
if [ "$build_option_fuzzymatch" ]; then
distfiles+=" http://tools.suckless.org/dmenu/patches/${pkgname}-${version}-fuzzymatch.diff"
skip_extraction+=" ${pkgname}-${version}-fuzzymatch.diff"
checksum+=" f037978583a16b2dab554058b147c2dbdfc758472d2bc9e1f031b2b9c686c0ff"
fi
if [ "$build_option_monarg" ]; then
distfiles+=" http://tools.suckless.org/dmenu/patches/${pkgname}-${version}-monarg.diff"
skip_extraction+=" ${pkgname}-${version}-monarg.diff"
checksum+=" c30a4acd9202712c019de72f9c2832686e6e25ca0b939757e31c20b9c110008b"
fi
if [ "$build_option_mouse" ]; then
distfiles+=" http://tools.suckless.org/dmenu/patches/${pkgname}-${version}-mouse-support.diff"
skip_extraction+=" ${pkgname}-${version}-mouse-support.diff"
checksum+=" 8ac73e77abb7c5e60080abe892e2b4232c9370bff39e5548cf9a403cffe692c4"
fi
## RIght now mouse && xft are incompatible
2014-09-06 21:55:19 +02:00
pre_build() {
2015-05-20 19:54:10 +02:00
local srcdir="${XBPS_SRCDISTDIR}/${pkgname}-${version}/"
if [ "$build_option_fuzzymatch" ]; then
msg_normal "Applying fuzzymatch patches"
patch -p2 < "$srcdir/${pkgname}-${version}-fuzzymatch.diff"
echo '#include "fuzzymatch.c"' >> dmenu.c
fi
2014-09-06 21:55:19 +02:00
if [ "$build_option_xft" ]; then
2015-05-20 19:54:10 +02:00
msg_normal "Applying xft patches"
patch -p1 < "$srcdir/${pkgname}-${version}-xft.diff"
fi
if [ "$build_option_mouse" ]; then
msg_normal "Applying mouse patches"
patch -p1 < "$srcdir/${pkgname}-${version}-mouse-support.diff"
fi
if [ "$build_option_monarg" ]; then
msg_normal "Applying monarg patches"
patch -p1 < "$srcdir/${pkgname}-${version}-monarg.diff"
2014-09-06 21:55:19 +02:00
fi
}
do_build() {
2012-12-16 05:44:27 +01:00
sed -i -e "s|^CFLAGS =|CFLAGS += |g" \
-e "s|^LDFLAGS = \-s|LDFLAGS += |g" config.mk
x11inc=$XBPS_CROSS_BASE/usr/include/X11
x11lib=$XBPS_CROSS_BASE/usr/lib
2014-09-06 21:55:19 +02:00
xftinc=-I$XBPS_CROSS_BASE/usr/include/freetype2
make CC="$CC" ${makejobs} X11INC=$x11inc X11LIB=$x11lib \
$(vopt_if xft XFTINC=$xftinc)
}
do_install() {
2012-12-16 05:44:27 +01:00
make PREFIX=/usr DESTDIR=${DESTDIR} install
2015-05-20 19:54:10 +02:00
vlicense LICENSE
}