void-packages/srcpkgs/tiv/template

38 lines
925 B
Bash

# Template file for 'tiv'
pkgname=tiv
version=0.1
revision=4
build_style=gnu-makefile
hostmakedepends="pkg-config vala"
makedepends="vala-devel glib-devel gdk-pixbuf-devel libjpeg-turbo-devel"
short_desc="Terminal Image Viewer"
maintainer="Juan RP <xtraeme@voidlinux.org>"
homepage="http://www.github.com/radare/tiv"
license="MIT"
distfiles="http://github.com/radare/$pkgname/archive/$version.tar.gz"
checksum=4aeae8b132ff507084ed1365652dda96ee245e003a4b409d3a304ce0871802f3
pre_build() {
local _p _cflags _ldflags
# Prepend every CFLAGS item with -X
for _p in ${CFLAGS}; do
_cflags="${_cflags} -X $_p"
done
# Prepend every LDFLAGS item with -X
for _p in ${LDFLAGS}; do
_ldflags="${_ldflags} -X $_p"
done
# Add to VALACFLAGS
sed -i Makefile \
-e "/VALAC.*/a VALACFLAGS=$_cflags $_ldflags" \
-e 's;${VALAC};$(VALAC) $(VALACFLAGS);'
}
pre_install() {
vmkdir usr/bin
}
post_install() {
vlicense LICENSE
}