# Template file for 'fdupes'
pkgname=fdupes
version=1.51
revision=6
distfiles="https://github.com/adrianlopezroche/fdupes/archive/$pkgname-$version.tar.gz"
checksum=761e16d4ecfef7302c62fe7ef1e181cd34f5c6ce5377dcad96e3ed44fb364986
maintainer="Steven R <dev@styez.com>"
homepage="https://github.com/adrianlopezroche/fdupes"
license="MIT"
short_desc="Identifying or deleting duplicate files residing within specified directories"
wrksrc="$pkgname-$pkgname-$version"

post_extract() {
	# can't assign to stdin on musl
	sed -i 's/stdin = freopen/FILE *tty = freopen/' -i fdupes.c
	sed -i 's/deletefiles(files, 1, stdin);/deletefiles(files, 1, tty);/' -i fdupes.c
}

do_build() {
    make CC="$CC"
}

do_install() {
    vinstall fdupes 755 usr/bin
    vinstall fdupes.1 644 usr/share/man/man1
}
