CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
file: updated with host build. Thanks for the patch j_v
[crossrootfs.git] / file / Pkgfile
index e3e42c0002680fb78dfa01b02ac33a68442759f4..11dde42a37d131bb20fc0de438f539343432cf16 100644 (file)
@@ -5,20 +5,33 @@
 # Depends on: zlib
 
 name=file
-version=5.11
+version=5.18
 release=1
-source=(ftp://ftp.fu-berlin.de/unix/tools/file/$name-$version.tar.gz)
+source=(ftp://ftp.astron.com/pub/file/$name-$version.tar.gz)
 
 build() {
   cd $name-$version
 
+  OLD_PATH=$PATH
+  export PATH=/usr/bin:/bin
+
+  CC=gcc CXX=g++ \
+  CFLAGS="-O2 -pipe" CXXFLAGS="-O2 -pipe" \
+  LDFLAGS="" \
+  AR=ar LD=ld AS=as RANLIB=ranlib STRIP=strip \
+  ./configure --prefix=$SRC/host_file
+  make
+  make install
+
+  export PATH=$SRC/host_file/bin:$OLD_PATH
+
   ./configure --build=$CHOST \
               --host=$CTARGET \
               --prefix=/usr \
-              --mandir=/usr/man \
-              --enable-fsect-man5
+              --enable-fsect-man5 \
+              --enable-static
 
   make
   make DESTDIR=$PKG install
-  rmdir $PKG/usr/man/man4
+  rmdir $PKG/usr/share/man/man4
 }