# Template file for 'rhash'
pkgname=rhash
version=1.3.4
revision=2
wrksrc="RHash-${version}"
build_style=gnu-makefile
conf_files="/etc/rhashrc"
short_desc="Utility for computing hash sums and creating magnet links"
maintainer="Christian Neukirchen <chneukirchen@gmail.com>"
license="RHash"
homepage="https://github.com/rhash/RHash"
distfiles="https://github.com/rhash/RHash/archive/v${version}.tar.gz"
checksum=1f6daa0c066c94d2575f0aace76f34e5800c51f59f4b30029ddcfa9799564f98
make_build_target="all lib-shared"
make_install_target="install install-lib-shared"

post_extract() {
	sed -i 's/__GLIBC__/__linux__/' librhash/byte_order.h
}

post_install() {
	vlicense COPYING
	make -C librhash install-headers DESTDIR=$DESTDIR PREFIX=/usr
	ln -s librhash.so.0 $DESTDIR/usr/lib/librhash.so
}

rhash-devel_package() {
	depends="${sourcepkg}>=${version}_${revision}"
	short_desc+=" - development files"
	pkg_install() {
		vmove usr/include
		vmove "usr/lib/*.so"
	}
}
