2003-02-12 11:40:28 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# file
|
|
|
|
#
|
|
|
|
#############################################################
|
2005-07-13 11:11:26 +02:00
|
|
|
FILE_VER:=4.13
|
2004-10-08 20:02:37 +02:00
|
|
|
FILE_SOURCE:=file-$(FILE_VER).tar.gz
|
2003-02-12 11:40:28 +01:00
|
|
|
FILE_SITE:=ftp://ftp.astron.com/pub/file
|
2004-10-08 20:02:37 +02:00
|
|
|
FILE_DIR:=$(BUILD_DIR)/file-$(FILE_VER)
|
2003-02-12 11:40:28 +01:00
|
|
|
FILE_CAT:=zcat
|
2003-10-03 03:27:09 +02:00
|
|
|
FILE_BINARY:=src/file
|
2003-02-12 11:40:28 +01:00
|
|
|
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)
|
2004-10-09 23:19:47 +02:00
|
|
|
$(FILE_CAT) $(DL_DIR)/$(FILE_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
2004-10-09 04:49:33 +02:00
|
|
|
toolchain/patch-kernel.sh $(FILE_DIR) package/file/ file\*.patch
|
2003-10-03 03:27:09 +02:00
|
|
|
touch $(FILE_DIR)/.unpacked
|
2003-02-12 11:40:28 +01:00
|
|
|
|
|
|
|
$(FILE_DIR)/.configured: $(FILE_DIR)/.unpacked
|
|
|
|
(cd $(FILE_DIR); rm -rf config.cache; \
|
2003-03-04 20:16:19 +01:00
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
2003-11-01 06:34:41 +01:00
|
|
|
CFLAGS="$(TARGET_CFLAGS)" \
|
2003-02-12 11:40:28 +01:00
|
|
|
./configure \
|
|
|
|
--target=$(GNU_TARGET_NAME) \
|
2003-03-04 20:16:19 +01:00
|
|
|
--host=$(GNU_TARGET_NAME) \
|
|
|
|
--build=$(GNU_HOST_NAME) \
|
2003-02-12 11:40:28 +01:00
|
|
|
--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 \
|
2003-09-03 09:18:18 +02:00
|
|
|
$(DISABLE_NLS) \
|
2003-11-17 02:31:38 +01:00
|
|
|
$(DISABLE_LARGEFILE) \
|
2004-07-30 01:44:44 +02:00
|
|
|
--enable-static \
|
2003-10-03 03:27:09 +02:00
|
|
|
--disable-fsect-man5 \
|
2003-02-12 11:40:28 +01:00
|
|
|
);
|
|
|
|
touch $(FILE_DIR)/.configured
|
|
|
|
|
|
|
|
$(FILE_DIR)/$(FILE_BINARY): $(FILE_DIR)/.configured
|
2004-07-30 01:44:44 +02:00
|
|
|
$(MAKE) $(TARGET_CONFIGURE_OPTS) LDFLAGS="-static" -C $(FILE_DIR)
|
2003-02-12 11:40:28 +01:00
|
|
|
|
|
|
|
$(TARGET_DIR)/$(FILE_TARGET_BINARY): $(FILE_DIR)/$(FILE_BINARY)
|
2003-10-03 03:27:09 +02:00
|
|
|
$(MAKE) $(TARGET_CONFIGURE_OPTS) DESTDIR=$(TARGET_DIR) -C $(FILE_DIR) install
|
2003-11-01 06:34:41 +01:00
|
|
|
-($(STRIP) $(TARGET_DIR)/usr/lib/libmagic.so.*.* > /dev/null 2>&1)
|
2003-02-12 11:40:28 +01:00
|
|
|
rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
|
|
|
|
$(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
|
|
|
|
|
2003-02-19 10:59:24 +01:00
|
|
|
file: zlib uclibc $(TARGET_DIR)/$(FILE_TARGET_BINARY)
|
2003-02-12 11:40:28 +01:00
|
|
|
|
|
|
|
file-clean:
|
|
|
|
$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(FILE_DIR) uninstall
|
|
|
|
-$(MAKE) -C $(FILE_DIR) clean
|
|
|
|
|
|
|
|
file-dirclean:
|
|
|
|
rm -rf $(FILE_DIR)
|
|
|
|
|
2005-02-10 04:06:39 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
ifeq ($(strip $(BR2_PACKAGE_FILE)),y)
|
|
|
|
TARGETS+=file
|
|
|
|
endif
|