diff options
author | mbm <mbm@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2004-05-25 04:32:27 +0000 |
---|---|---|
committer | mbm <mbm@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2004-05-25 04:32:27 +0000 |
commit | 3ac1acb9ea70080aaaf49ae211835f057e60eefa (patch) | |
tree | a2e08d2be3224409a033d25af8861d9853e72de7 /obsolete-buildroot/make/file.mk | |
parent | 1eb1b593980fdc06ab92f8e354129b0aadc4f1b0 (diff) |
Initial revision
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'obsolete-buildroot/make/file.mk')
-rw-r--r-- | obsolete-buildroot/make/file.mk | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/obsolete-buildroot/make/file.mk b/obsolete-buildroot/make/file.mk new file mode 100644 index 0000000000..e3ef381f40 --- /dev/null +++ b/obsolete-buildroot/make/file.mk @@ -0,0 +1,64 @@ +############################################################# +# +# file +# +############################################################# +FILE_SOURCE:=file-4.08.tar.gz +FILE_SITE:=ftp://ftp.astron.com/pub/file +FILE_DIR:=$(BUILD_DIR)/file-4.08 +FILE_CAT:=zcat +FILE_BINARY:=src/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 - + cat $(SOURCE_DIR)/file.patch | patch -p1 -d $(FILE_DIR) + touch $(FILE_DIR)/.unpacked + +$(FILE_DIR)/.configured: $(FILE_DIR)/.unpacked + (cd $(FILE_DIR); rm -rf config.cache; \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS)" \ + ./configure \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_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) \ + $(DISABLE_LARGEFILE) \ + --disable-fsect-man5 \ + ); + touch $(FILE_DIR)/.configured + +$(FILE_DIR)/$(FILE_BINARY): $(FILE_DIR)/.configured + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(FILE_DIR) + +$(TARGET_DIR)/$(FILE_TARGET_BINARY): $(FILE_DIR)/$(FILE_BINARY) + $(MAKE) $(TARGET_CONFIGURE_OPTS) DESTDIR=$(TARGET_DIR) -C $(FILE_DIR) install + -($(STRIP) $(TARGET_DIR)/usr/lib/libmagic.so.*.* > /dev/null 2>&1) + rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \ + $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc + +file: zlib 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) + |