summaryrefslogtreecommitdiffstats
path: root/src/file.mk
diff options
context:
space:
mode:
authorVolker Grabsch <vog@notjusthosting.com>2012-01-02 10:18:06 (GMT)
committerVolker Grabsch <vog@notjusthosting.com>2012-01-02 10:18:06 (GMT)
commitad0e7e1e0fc4f6099e444b495c59b5130ecd8324 (patch)
treeb471a763a539becf624760c40d1f465e5dc2c575 /src/file.mk
parent5e735ec3e9b69bf543271b98107ff52fb10eb4a5 (diff)
parent7cfca695cf09acb26cf363eb8d138e999bd4fe89 (diff)
downloadmxe-ad0e7e1e0fc4f6099e444b495c59b5130ecd8324.zip
mxe-ad0e7e1e0fc4f6099e444b495c59b5130ecd8324.tar.gz
mxe-ad0e7e1e0fc4f6099e444b495c59b5130ecd8324.tar.bz2
merge
Diffstat (limited to 'src/file.mk')
-rw-r--r--src/file.mk38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/file.mk b/src/file.mk
new file mode 100644
index 0000000..ca2ecc4
--- /dev/null
+++ b/src/file.mk
@@ -0,0 +1,38 @@
+# This file is part of mingw-cross-env.
+# See doc/index.html for further information.
+
+# file
+PKG := file
+$(PKG)_IGNORE :=
+$(PKG)_VERSION := 5.09
+$(PKG)_CHECKSUM := 9d905f9e50033c3f5be3728473cbb709a41550fb
+$(PKG)_SUBDIR := file-$($(PKG)_VERSION)
+$(PKG)_FILE := file-$($(PKG)_VERSION).tar.gz
+$(PKG)_WEBSITE := http://www.darwinsys.com/file/
+$(PKG)_URL := ftp://ftp.astron.com/pub/file/$($(PKG)_FILE)
+$(PKG)_DEPS := gcc libgnurx
+
+define $(PKG)_UPDATE
+ wget -q -O- 'ftp://ftp.astron.com/pub/file/' | \
+ grep 'file-' | \
+ $(SED) -n 's,.*file-\([0-9][^>]*\)\.tar.*,\1,p' | \
+ tail -1
+endef
+
+define $(PKG)_BUILD
+ # "file" needs a runnable version of the "file" utility
+ # itself. This must match the source code regarding its
+ # version. Therefore we build a native one ourselves first.
+
+ cd '$(1)' && ./configure \
+ --disable-shared
+ $(MAKE) -C '$(1)/src' -j '$(JOBS)' file
+ cp '$(1)/src/file' '$(1)/src/file.local'
+
+ cd '$(1)' && ./configure \
+ --host='$(TARGET)' \
+ --disable-shared \
+ --prefix='$(PREFIX)/$(TARGET)'
+ $(MAKE) -C '$(1)' clean
+ $(MAKE) -C '$(1)' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS=
+endef