summaryrefslogtreecommitdiffstats
path: root/package/util-linux/util-linux.mk
diff options
context:
space:
mode:
Diffstat (limited to 'package/util-linux/util-linux.mk')
-rw-r--r--package/util-linux/util-linux.mk134
1 files changed, 47 insertions, 87 deletions
diff --git a/package/util-linux/util-linux.mk b/package/util-linux/util-linux.mk
index 445b4d1c7..a63055aa8 100644
--- a/package/util-linux/util-linux.mk
+++ b/package/util-linux/util-linux.mk
@@ -3,100 +3,60 @@
# util-linux
#
#############################################################
-UTIL-LINUX_VERSION:=2.13-pre7
-UTIL-LINUX_SOURCE:=util-linux-$(UTIL-LINUX_VERSION).tar.bz2
-UTIL-LINUX_SITE:=$(BR2_KERNEL_MIRROR)/linux/utils/util-linux/testing
-UTIL-LINUX_DIR:=$(BUILD_DIR)/util-linux-$(UTIL-LINUX_VERSION)
-UTIL-LINUX_CAT:=$(BZCAT)
-UTIL-LINUX_BINARY:=$(UTIL-LINUX_DIR)/misc-utils/chkdupexe
-UTIL-LINUX_TARGET_BINARY:=$(TARGET_DIR)/usr/bin/chkdupexe
+UTIL_LINUX_VERSION = $(UTIL_LINUX_VERSION_MAJOR).1
+UTIL_LINUX_VERSION_MAJOR = 2.19
+UTIL_LINUX_SOURCE = util-linux-$(UTIL_LINUX_VERSION).tar.bz2
+UTIL_LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/util-linux/v$(UTIL_LINUX_VERSION_MAJOR)
-# schedutils isn't support for all archs
-ifneq ($(BR2_i386)$(BR2_powerpc)$(BR2_x86_64)$(BR2_ia64)$(BR2_alpha),)
-UTIL-LINUX_SCHED_UTILS:=--enable-schedutils
-else
-UTIL-LINUX_SCHED_UTILS:=--disable-schedutils
-endif
+UTIL_LINUX_CONF_OPT += --disable-rpath --disable-makeinstall-chown
-ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
-UTIL-LINUX_DEPENDENCIES += gettext libintl
-UTIL-LINUX_MAKE_OPT = LIBS=-lintl
+# 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_DEPENDENCIES += busybox
endif
ifeq ($(BR2_PACKAGE_NCURSES),y)
-UTIL-LINUX_DEPENDENCIES += ncurses
-endif
-
-$(DL_DIR)/$(UTIL-LINUX_SOURCE):
- $(call DOWNLOAD,$(UTIL-LINUX_SITE),$(UTIL-LINUX_SOURCE))
-
-$(UTIL-LINUX_DIR)/.unpacked: $(DL_DIR)/$(UTIL-LINUX_SOURCE)
- $(UTIL-LINUX_CAT) $(DL_DIR)/$(UTIL-LINUX_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
- toolchain/patch-kernel.sh $(UTIL-LINUX_DIR) package/util-linux/ util-linux\*.patch
- touch $(UTIL-LINUX_DIR)/.unpacked
-
-$(UTIL-LINUX_DIR)/.configured: $(UTIL-LINUX_DIR)/.unpacked
- (cd $(UTIL-LINUX_DIR); rm -rf config.cache; \
- $(TARGET_CONFIGURE_OPTS) \
- $(TARGET_CONFIGURE_ARGS) \
- ac_cv_lib_blkid_blkid_known_fstype=no \
- ./configure $(QUIET) \
- --target=$(GNU_TARGET_NAME) \
- --host=$(GNU_TARGET_NAME) \
- --build=$(GNU_HOST_NAME) \
- --disable-use-tty-group \
- --prefix=/ \
- --exec-prefix=/ \
- --sysconfdir=/etc \
- --datadir=/usr/share \
- --localstatedir=/var \
- --mandir=/usr/man \
- --infodir=/usr/info \
- $(UTIL-LINUX_SCHED_UTILS) \
- $(DISABLE_NLS) \
- $(DISABLE_LARGEFILE) \
- ARCH=$(ARCH) \
- )
- touch $(UTIL-LINUX_DIR)/.configured
-
-$(UTIL-LINUX_BINARY): $(UTIL-LINUX_DIR)/.configured
- $(MAKE) \
- -C $(UTIL-LINUX_DIR) \
- ARCH=$(ARCH) \
- CC="$(TARGET_CC)" \
- OPT="$(TARGET_CFLAGS)" \
- $(UTIL-LINUX_MAKE_OPT) \
- HAVE_SLANG="NO"
-
-$(UTIL-LINUX_TARGET_BINARY): $(UTIL-LINUX_BINARY)
- $(MAKE) ARCH=$(ARCH) DESTDIR=$(TARGET_DIR) USE_TTY_GROUP=no -C $(UTIL-LINUX_DIR) install
- rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/share/info \
- $(TARGET_DIR)/usr/share/man $(TARGET_DIR)/usr/share/doc
-
-#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_DEPENDENCIES := busybox $(UTIL-LINUX_DEPENDENCIES)
+UTIL_LINUX_DEPENDENCIES += ncurses
+else
+UTIL_LINUX_CONF_OPT += --without-ncurses
endif
-util-linux: $(UTIL-LINUX_DEPENDENCIES) $(UTIL-LINUX_TARGET_BINARY)
-
-util-linux-source: $(DL_DIR)/$(UTIL-LINUX_SOURCE)
-
-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)
-
-#############################################################
+#############################################
#
-# Toplevel Makefile options
+# disable default utilities
#
-#############################################################
-ifeq ($(BR2_PACKAGE_UTIL-LINUX),y)
-TARGETS+=util-linux
-endif
+UTIL_LINUX_CONF_OPT += \
+ $(if $(BR2_PACKAGE_UTIL_LINUX_MOUNT),,--disable-mount) \
+ $(if $(BR2_PACKAGE_UTIL_LINUX_FSCK),,--disable-fsck) \
+ $(if $(BR2_PACKAGE_UTIL_LINUX_LIBUUID),,--disable-libuuid) \
+ $(if $(BR2_PACKAGE_UTIL_LINUX_UUID),,--disable-uuid) \
+ $(if $(BR2_PACKAGE_UTIL_LINUX_LIBBLKID),,--disable-libblkid) \
+ $(if $(BR2_PACKAGE_UTIL_LINUX_AGETTY),,--disable-agetty) \
+ $(if $(BR2_PACKAGE_UTIL_LINUX_CRAMFS),,--disable-cramfs) \
+ $(if $(BR2_PACKAGE_UTIL_LINUX_SWITCH_ROOT),,--disable-switch_root) \
+ $(if $(BR2_PACKAGE_UTIL_LINUX_PIVOT_ROOT),,--disable-pivot_root) \
+ $(if $(BR2_PACKAGE_UTIL_LINUX_FALLOCATE),,--disable-fallocate) \
+ $(if $(BR2_PACKAGE_UTIL_LINUX_UNSHARE),,--disable-unshare) \
+ $(if $(BR2_PACKAGE_UTIL_LINUX_RENAME),,--disable-rename) \
+ $(if $(BR2_PACKAGE_UTIL_LINUX_SCHEDUTILS),,--disable-schedutils) \
+ $(if $(BR2_PACKAGE_UTIL_LINUX_WALL),,--disable-wall)
+
+#############################################
+#
+# enable extra utilities
+#
+UTIL_LINUX_CONF_OPT += \
+ $(if $(BR2_PACKAGE_UTIL_LINUX_ARCH),--enable-arch) \
+ $(if $(BR2_PACKAGE_UTIL_LINUX_INIT),--enable-init) \
+ $(if $(BR2_PACKAGE_UTIL_LINUX_KILL),--enable-kill) \
+ $(if $(BR2_PACKAGE_UTIL_LINUX_LAST),--enable-last) \
+ $(if $(BR2_PACKAGE_UTIL_LINUX_MESG),--enable-mesg) \
+ $(if $(BR2_PACKAGE_UTIL_LINUX_PARTX),--enable-partx) \
+ $(if $(BR2_PACKAGE_UTIL_LINUX_RAW),--enable-raw) \
+ $(if $(BR2_PACKAGE_UTIL_LINUX_RESET),--enable-reset) \
+ $(if $(BR2_PACKAGE_UTIL_LINUX_LOGIN_UTILS),--enable-login-utils) \
+ $(if $(BR2_PACKAGE_UTIL_LINUX_WRITE),--enable-write)
+
+$(eval $(call AUTOTARGETS,package,util-linux))