# Template file for 'nocache'
pkgname=nocache
version=0.9
revision=2
build_style=gnu-makefile
short_desc="Minimize filesystem caching effects"
maintainer="Duncaen <duncaen@voidlinux.eu>"
license="BSD"
homepage="https://github.com/Feh/nocache"
distfiles="https://github.com/Feh/nocache/archive/v${version}.tar.gz"
checksum=a5d790b77dc9e0c8e1241f99a9f31a088d02956a6a4c40dd17ddaa887b2bc33a

pre_build() {
	sed -i -e '/^GCC/d' -e 's/$(GCC)/$(GCC) $(CFLAGS)/g' Makefile
	sed -i -e '/#include <error.h>/d' cachedel.c cachestats.c
	sed -i -e 's;/usr/local;/usr;g' nocache.global
}

do_install() {
	vinstall nocache.so 644 usr/lib
	vbin nocache.global nocache
	vbin cachedel
	vbin cachestats
	vman man/cachedel.1
	vman man/cachestats.1
	vman man/nocache.1
	vlicense COPYING
}
