summaryrefslogtreecommitdiffstats
path: root/make/file.mk
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2003-02-12 10:40:28 +0000
committerEric Andersen <andersen@codepoet.org>2003-02-12 10:40:28 +0000
commit089db85919e922846426e9942fae37ccc146739f (patch)
tree661c6e0eba866b08950ab557052ebb5b9c64b745 /make/file.mk
parentd4ef2a6a25ec7cd1a968f7367706925825868452 (diff)
downloadbuildroot-novena-089db85919e922846426e9942fae37ccc146739f.tar.gz
buildroot-novena-089db85919e922846426e9942fae37ccc146739f.zip
Add support for several new utilities
Diffstat (limited to 'make/file.mk')
-rw-r--r--make/file.mk58
1 files changed, 58 insertions, 0 deletions
diff --git a/make/file.mk b/make/file.mk
new file mode 100644
index 000000000..2d4c1d263
--- /dev/null
+++ b/make/file.mk
@@ -0,0 +1,58 @@
+#############################################################
+#
+# file
+#
+#############################################################
+FILE_SOURCE:=file-3.39.tar.gz
+FILE_SITE:=ftp://ftp.astron.com/pub/file
+FILE_DIR:=$(BUILD_DIR)/file-3.39
+FILE_CAT:=zcat
+FILE_BINARY:=file
+FILE_TARGET_BINARY:=usr/bin/file
+
+$(DL_DIR)/$(FILE_SOURCE):
+ $(WGET) -P $(DL_DIR) $(FILE_SITE)/$(FILE_SOURCE)
+
+file-source: $(DL_DIR)/$(FILE_SOURCE)
+
+$(FILE_DIR)/.unpacked: $(DL_DIR)/$(FILE_SOURCE)
+ $(FILE_CAT) $(DL_DIR)/$(FILE_SOURCE) | tar -C $(BUILD_DIR) -xvf -
+ touch $(FILE_DIR)/.unpacked
+
+$(FILE_DIR)/.configured: $(FILE_DIR)/.unpacked
+ (cd $(FILE_DIR); rm -rf config.cache; \
+ PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ ./configure \
+ --target=$(GNU_TARGET_NAME) \
+ --prefix=/usr \
+ --exec-prefix=/usr \
+ --bindir=/usr/bin \
+ --sbindir=/usr/sbin \
+ --libexecdir=/usr/lib \
+ --sysconfdir=/etc \
+ --datadir=/usr/share/misc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ --disable-nls \
+ --enable-fsect-man5 \
+ );
+ touch $(FILE_DIR)/.configured
+
+$(FILE_DIR)/$(FILE_BINARY): $(FILE_DIR)/.configured
+ $(MAKE) CC=$(TARGET_CC) -C $(FILE_DIR)
+
+$(TARGET_DIR)/$(FILE_TARGET_BINARY): $(FILE_DIR)/$(FILE_BINARY)
+ $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(FILE_DIR) install
+ rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
+ $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
+
+file: uclibc $(TARGET_DIR)/$(FILE_TARGET_BINARY)
+
+file-clean:
+ $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(FILE_DIR) uninstall
+ -$(MAKE) -C $(FILE_DIR) clean
+
+file-dirclean:
+ rm -rf $(FILE_DIR)
+