2003-03-11 01:58:07 +08:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# util-linux
|
|
|
|
#
|
|
|
|
#############################################################
|
2005-12-29 19:27:31 +08:00
|
|
|
UTIL-LINUX_VER:=2.12r
|
2005-09-24 08:54:06 +08:00
|
|
|
UTIL-LINUX_SOURCE:=util-linux-$(UTIL-LINUX_VER).tar.bz2
|
|
|
|
UTIL-LINUX_SITE:=http://www.kernel.org/pub/linux/utils/util-linux
|
|
|
|
UTIL-LINUX_DIR:=$(BUILD_DIR)/util-linux-$(UTIL-LINUX_VER)
|
2006-11-17 23:43:51 +08:00
|
|
|
UTIL-LINUX_CAT:=$(BZCAT)
|
2007-01-14 11:52:21 +08:00
|
|
|
UTIL-LINUX_BINARY:=$(UTIL-LINUX_DIR)/misc-utils/chkdupexe
|
|
|
|
UTIL-LINUX_TARGET_BINARY:=$(TARGET_DIR)/usr/bin/chkdupexe
|
2003-03-11 01:58:07 +08:00
|
|
|
|
|
|
|
$(DL_DIR)/$(UTIL-LINUX_SOURCE):
|
2004-03-10 16:11:05 +08:00
|
|
|
$(WGET) -P $(DL_DIR) $(UTIL-LINUX_SITE)/$(UTIL-LINUX_SOURCE)
|
2003-03-11 01:58:07 +08:00
|
|
|
|
2005-12-29 19:27:31 +08:00
|
|
|
$(UTIL-LINUX_DIR)/.unpacked: $(DL_DIR)/$(UTIL-LINUX_SOURCE)
|
2004-10-10 05:19:47 +08:00
|
|
|
$(UTIL-LINUX_CAT) $(DL_DIR)/$(UTIL-LINUX_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
2005-06-24 16:36:13 +08:00
|
|
|
toolchain/patch-kernel.sh $(UTIL-LINUX_DIR) package/util-linux/ util-linux\*.patch
|
2005-07-13 03:53:12 +08:00
|
|
|
ifneq ($(BR2_LARGEFILE),y)
|
|
|
|
$(SED) "/D_FILE_OFFSET_BITS/ d" $(UTIL-LINUX_DIR)/MCONFIG
|
|
|
|
endif
|
2003-03-11 01:58:07 +08:00
|
|
|
touch $(UTIL-LINUX_DIR)/.unpacked
|
|
|
|
|
|
|
|
$(UTIL-LINUX_DIR)/.configured: $(UTIL-LINUX_DIR)/.unpacked
|
|
|
|
(cd $(UTIL-LINUX_DIR); rm -rf config.cache; \
|
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
2004-10-09 05:07:31 +08:00
|
|
|
CFLAGS="$(TARGET_CFLAGS)" \
|
2007-03-14 11:12:22 +08:00
|
|
|
LDFLAGS="$(TARGET_LDFLAGS)" \
|
2003-03-11 01:58:07 +08:00
|
|
|
./configure \
|
|
|
|
--target=$(GNU_TARGET_NAME) \
|
|
|
|
--prefix=/usr \
|
|
|
|
--exec-prefix=/usr \
|
|
|
|
--bindir=/usr/bin \
|
|
|
|
--sbindir=/usr/sbin \
|
2007-01-14 11:52:21 +08:00
|
|
|
--libdir=/lib \
|
2003-03-11 01:58:07 +08:00
|
|
|
--libexecdir=/usr/lib \
|
|
|
|
--sysconfdir=/etc \
|
|
|
|
--datadir=/usr/share \
|
|
|
|
--localstatedir=/var \
|
|
|
|
--mandir=/usr/man \
|
|
|
|
--infodir=/usr/info \
|
2003-09-03 15:18:18 +08:00
|
|
|
$(DISABLE_NLS) \
|
2005-07-13 03:53:12 +08:00
|
|
|
$(DISABLE_LARGEFILE) \
|
2004-03-10 16:11:05 +08:00
|
|
|
ARCH=$(ARCH) \
|
2003-03-11 01:58:07 +08:00
|
|
|
);
|
2003-11-20 01:17:56 +08:00
|
|
|
$(SED) "s,^INSTALLSUID=.*,INSTALLSUID=\\$$\(INSTALL\) -m \\$$\(BINMODE\)," \
|
2003-03-11 01:58:07 +08:00
|
|
|
$(UTIL-LINUX_DIR)/MCONFIG
|
2003-11-20 01:17:56 +08:00
|
|
|
$(SED) "s,^USE_TTY_GROUP=.*,USE_TTY_GROUP=no," $(UTIL-LINUX_DIR)/MCONFIG
|
2003-03-11 01:58:07 +08:00
|
|
|
touch $(UTIL-LINUX_DIR)/.configured
|
|
|
|
|
|
|
|
$(UTIL-LINUX_BINARY): $(UTIL-LINUX_DIR)/.configured
|
2004-10-09 05:07:31 +08:00
|
|
|
$(MAKE) \
|
|
|
|
-C $(UTIL-LINUX_DIR) \
|
|
|
|
ARCH=$(ARCH) \
|
|
|
|
CC=$(TARGET_CC) \
|
|
|
|
OPT="$(TARGET_CFLAGS)" \
|
|
|
|
HAVE_SLANG="NO"
|
2003-03-11 01:58:07 +08:00
|
|
|
|
|
|
|
$(UTIL-LINUX_TARGET_BINARY): $(UTIL-LINUX_BINARY)
|
2004-10-09 05:07:31 +08:00
|
|
|
$(MAKE) ARCH=$(ARCH) DESTDIR=$(TARGET_DIR) USE_TTY_GROUP=no -C $(UTIL-LINUX_DIR) install
|
2004-10-09 05:51:44 +08:00
|
|
|
rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/share/info \
|
|
|
|
$(TARGET_DIR)/usr/share/man $(TARGET_DIR)/usr/share/doc
|
2003-03-11 01:58:07 +08:00
|
|
|
|
2004-12-28 05:49:53 +08:00
|
|
|
#If both util-linux and busybox are selected, make certain util-linux
|
|
|
|
#wins the fight over who gets to have their utils actually installed
|
|
|
|
ifeq ($(BR2_PACKAGE_BUSYBOX),y)
|
|
|
|
util-linux: uclibc busybox $(UTIL-LINUX_TARGET_BINARY)
|
|
|
|
else
|
2003-03-11 01:58:07 +08:00
|
|
|
util-linux: uclibc $(UTIL-LINUX_TARGET_BINARY)
|
2004-12-28 05:49:53 +08:00
|
|
|
endif
|
|
|
|
|
2003-03-11 01:58:07 +08:00
|
|
|
|
2003-11-12 17:31:12 +08:00
|
|
|
util-linux-source: $(DL_DIR)/$(UTIL-LINUX_SOURCE)
|
|
|
|
|
2003-03-11 01:58:07 +08:00
|
|
|
util-linux-clean:
|
|
|
|
#There is no working 'uninstall' target. Just skip it...
|
|
|
|
#$(MAKE) DESTDIR=$(TARGET_DIR) -C $(UTIL-LINUX_DIR) uninstall
|
|
|
|
-$(MAKE) -C $(UTIL-LINUX_DIR) clean
|
|
|
|
|
|
|
|
util-linux-dirclean:
|
|
|
|
rm -rf $(UTIL-LINUX_DIR)
|
|
|
|
|
|
|
|
|
2005-02-10 11:06:39 +08:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
ifeq ($(strip $(BR2_PACKAGE_UTIL-LINUX)),y)
|
|
|
|
TARGETS+=util-linux
|
|
|
|
endif
|