# vim: ft=make ts=4 sw=4 noet
.DEFAULT_GOAL := all
NAME    = file
VERSION = 5.46
GARTYPE = v2

MASTER_SITES = http://ftp.astron.com/pub/file/
DISTFILES   += $(DISTNAME).tar.gz

LICENSE = COPYING

BUILD_DEP_PKGS           += OZSWzlib
RUNTIME_DEP_PKGS_OZSWfile += OZSWzlib

PACKAGES             += OZSWfile
SPKG_DESC_OZSWfile   = Determine file type using magic numbers
CATALOGNAME_OZSWfile = file

# Fix libtool ECHO="print -r --" (ksh93 builtin, fails under bash)
post-configure:
	@if [ -f $(WORKSRC)/libtool ]; then \
	    find $(WORKSRC) -name "libtool" -type f -exec \
	        gsed -i 's/ECHO="print -r --"/ECHO="printf %s\\n"/g' {} \; ; \
	fi
	@$(MAKECOOKIE)

include gar/category.mk
