PATCH_LIST="file-magic-5.42.patch" FILE_LIST= SRC_FETCH_METHOD=http SRC_FETCH_PATH="ftp://ftp.astron.com/pub/file/file-${PKGVER}.tar.gz" MAKEDEPENDS= function build_native { echo "Building the native file utility first" CC="$HOSTCC" LD="$HOSTCC" STRIP="$HOSTSTRIP" \ NM="$HOSTNM" RANLIB="$HOSTRANLIB" AS="$HOSTAS" AR="$HOSTAR" \ ./configure --disable-shared || return 1 $FLXPMAKE SUBDIRS=src || return 1 rm -rf native-tools mkdir -p native-tools cp src/file native-tools/file || return 1 $FLXPMAKE distclean } function do_config { # It is needed to have a native build in order to have the ability # to compile the magis. build_native || return 1 # crosscompile CC="$CC" CXX="$CXX" LD="$LD" \ RANLIB="$RANLIB" AR="$AR" AS="$AS" NM="$NM" OBJDUMP="$OBJDUMP" \ CFLAGS="$GCC_ARCH_SMALL $GCC_CPU_SMALL $GCC_OPT_SMALL" \ ./configure --prefix=/usr --disable-shared --build=$FLXHOST --host=$FLXTARG } function do_compile_only { $FLXPMAKE SUBDIRS="src magic" FILE_COMPILE=$PWD/native-tools/file } function do_prepack { mkdir -p $ROOTDIR/usr/bin $ROOTDIR/usr/man/man1 $ROOTDIR/usr/man/man4 $ROOTDIR/usr/share/misc/magic chmod -R 755 $ROOTDIR $FLXMAKE install DESTDIR=$ROOTDIR cp magic/magic_old $ROOTDIR/usr/share/misc/magic/default chown -R root:root $ROOTDIR set_default_perm $ROOTDIR }