# Template file for 'chroot-file' pkgname=chroot-file version=5.18 revision=1 wrksrc="file-${version}" build_style=gnu-configure hostmakedepends="zlib-devel" makedepends="zlib-devel" short_desc="File type identification utility -- for xbps-src use" maintainer="Juan RP " homepage="http://www.darwinsys.com/file/" license="BSD" distfiles="ftp://ftp.astron.com/pub/file/file-$version.tar.gz" checksum=6519fb706d583231c2419592ebecdbb21d33c62eaf7a1a0b24ddfcb80c08bf07 bootstrap=yes noverifyrdeps=yes for f in file file-devel libmagic; do conflicts+="${f}>=0 " provides+="${f}-${version}_${revision} " done pre_configure() { if [ "$CROSS_BUILD" ]; then # Build host file first. [ ! -d host-build ] && mkdir host-build cd host-build CC= CFLAGS= LDFLAGS= AR= RANLIB= ../configure make ${makejobs} install -m755 src/file ${wrksrc}/host-build/ fi } pre_build() { if [ "$CROSS_BUILD" ]; then sed "s,file --version | sed -e s/file-// -e q,${wrksrc}/host-build/file --version | sed -e s/file-// -e s/lt-// -e q,g" -i magic/Makefile fi } post_install() { rm -rf ${DESTDIR}/usr/share/man }