void-packages/srcpkgs/pinentry-dmenu/template

35 lines
1.2 KiB
Bash

# Template file for 'pinentry-dmenu'
pkgname=pinentry-dmenu
version=0.2.3
revision=1
build_style=gnu-makefile
makedepends="libXft-devel freetype-devel libconfig-devel
libXinerama-devel libgpg-error-devel libassuan-devel
gpgme-devel"
short_desc="Pinentry program based on dmenu"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="https://github.com/ftrvxmtrx/pinentry-dmenu"
distfiles="https://github.com/ftrvxmtrx/pinentry-dmenu/archive/${version}.tar.gz"
checksum=8ee15e114a880fd5f5c5f5aebd9b2eb469b26104449987454ee789fbe2bf9ee3
alternatives="pinentry:pinentry:/usr/bin/pinentry-dmenu"
CFLAGS="-DXINERAMA -I${XBPS_CROSS_BASE}/usr/include"
CFLAGS+=" -I${XBPS_CROSS_BASE}/usr/include/X11"
CFLAGS+=" -I${XBPS_CROSS_BASE}/usr/include/freetype2"
LDFLAGS="-lfontconfig -lXft -lXinerama -lX11"
pre_build() {
[ -e ${FILESDIR}/config.h ] && cp ${FILESDIR}/config.h config.h
vsed -e "s|PACKAGE_VERSION|\"${version}\"|g" \
-e "s|VERSION|\"${version}\"|g" \
-e "s|PACKAGE_BUGREPORT|\"https:\/\/github.com\/ritze\/pinentry-dmenu\"|g" \
-i pinentry/pinentry.c
if [ "$CROSS_BUILD" ]; then
vsed -e "s|CC =.*|CC = ${CC}|g" -i config.mk
fi
}