diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2018-03-28 23:07:14 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2018-03-28 23:07:14 +0000 |
commit | d0b60fec157a2cd695269313378a7502386c7ea1 (patch) | |
tree | 6f71699c9c9658ad5d0e4d5cd93a3183d16532c6 /sub/util-linux | |
parent | b12dde7b084f08e05285448c652ff288ec690618 (diff) | |
download | lh-bootstrap-d0b60fec157a2cd695269313378a7502386c7ea1.tar.xz |
Tentative fix for util-linux build
Diffstat (limited to 'sub/util-linux')
-rw-r--r-- | sub/util-linux/Makefile | 55 |
1 files changed, 37 insertions, 18 deletions
diff --git a/sub/util-linux/Makefile b/sub/util-linux/Makefile index eba2823..38458bf 100644 --- a/sub/util-linux/Makefile +++ b/sub/util-linux/Makefile @@ -1,9 +1,3 @@ -# compiling some programs from util-linux when they are not available or outdated on the build system -# TODO: check what's available on the build system and run the recipes based on what's there or not -# (Laurent) No, this would add complexity and unpredictability for a very -# minor speed benefit. As long as we have to build one tool from the package, -# build all the tools we need has negligible cost. - UTLX_NAME := util-linux UTLX_VERSION := 2.32 @@ -12,19 +6,45 @@ UTLX_MINOR := $(word 2, $(subst ., ,$(UTLX_VERSION))) UTLX_URLDIR := https://cdn.kernel.org/pub/linux/utils/$(UTLX_NAME)/v$(UTLX_MAJOR).$(UTLX_MINOR) UTLX_TAREXT := tar.xz UTLX_TARLETTER := J -UTLX_CONFIGURE_OPTIONS := --disable-assert --disable-nls --enable-mount --enable-losetup --disable-bash-completion --disable-pylibmount --disable-pg-bell --disable-makeinstall-chown --disable-makeinstall-setuid --disable-colors-default --with-gnu-ld --without-util --without-termcap --without-libiconv-prefix --without-udev --without-user --without-python --without-ncurses --without-tinfo +UTLX_CONFIGURE_OPTIONS := \ +--prefix=$(OUTPUT)/build-build/opt/$(UTLX_NAME)-$(UTLX_VERSION) \ +--disable-assert \ +--disable-nls \ +--disable-shared \ +--disable-widechar \ +--disable-libuuid \ +--disable-libblkid \ +--disable-libsmartcols \ +--disable-all-programs \ +--enable-losetup \ +--enable-fdisk \ +--enable-mkswap \ +--enable-mount \ +--enable-umount \ +--disable-bash-completion \ +--disable-pylibmount \ +--disable-pg-bell \ +--disable-makeinstall-chown \ +--disable-makeinstall-setuid \ +--disable-colors-default \ +--with-gnu-ld \ +--without-util \ +--without-termcap \ +--without-libiconv-prefix \ +--without-selinux \ +--without-audit \ +--without-udev \ +--without-user \ +--without-python \ +--without-ncurses \ +--without-ncursesw \ +--without-slang \ +--without-tinfo + UTLX_CFLAGS := "" UTLX_CONFLDFLAGS := "" UTLX_MAKELDFLAGS := "-s" -# Listing all the tools we need allows us to not depend on any -# version of util-linux being installed on the machine. This is intentional: -# if we're going to download our own util-linux anyway, we might as well -# remove the dependency entirely. - -UTLX_PROGLIST := losetup fdisk mkswap mount umount - - $(OUTPUT)/sources/$(UTLX_NAME)-$(UTLX_VERSION).$(UTLX_TAREXT): | $(OUTPUT)/tmp/.lh_prepared $(OUTPUT)/build-build/.lh_skarnet_installed exec setuidgid $(NORMALUSER) cd $(OUTPUT)/sources wget $(UTLX_URLDIR)/$(UTLX_NAME)-$(UTLX_VERSION).$(UTLX_TAREXT) @@ -44,11 +64,10 @@ $(OUTPUT)/build-build/.lh_$(UTLX_NAME)_configured: $(OUTPUT)/build-build/.lh_$(U exec setuidgid $(NORMALUSER) s6-touch $@ $(OUTPUT)/build-build/.lh_$(UTLX_NAME)_built: $(OUTPUT)/build-build/.lh_$(UTLX_NAME)_configured | $(OUTPUT)/build-build/.lh_skarnet_installed - exec setuidgid $(NORMALUSER) cd $(OUTPUT)/build-build/opt/$(UTLX_NAME)-$(UTLX_VERSION)/src $(MAKE) $(UTLX_PROGLIST) LDFLAGS=$(UTLX_MAKELDFLAGS) + exec setuidgid $(NORMALUSER) cd $(OUTPUT)/build-build/opt/$(UTLX_NAME)-$(UTLX_VERSION)/src $(MAKE) LDFLAGS=$(UTLX_MAKELDFLAGS) exec setuidgid $(NORMALUSER) s6-touch $@ $(OUTPUT)/build-build/.lh_$(UTLX_NAME)_installed: $(OUTPUT)/build-build/.lh_$(UTLX_NAME)_built | $(OUTPUT)/tmp/.lh_prepared $(OUTPUT)/build-build/.lh_skarnet_installed - exec setuidgid $(NORMALUSER) s6-mkdir -p $(OUTPUT)/build-build/opt/$(UTLX_NAME)-$(UTLX_VERSION)/bin - for i in $(UTLX_PROGLIST) ; do setuidgid $(NORMALUSER) cp -f "$(OUTPUT)/build-build/opt/$(UTLX_NAME)-$(UTLX_VERSION)/src/$$i" $(OUTPUT)/build-build/opt/$(UTLX_NAME)-$(UTLX_VERSION)/bin/ ; done + exec setuidgid $(NORMALUSER) cd $(OUTPUT)/build-build/opt/$(UTLX_NAME)-$(UTLX_VERSION)/src $(MAKE) install exec setuidgid $(NORMALUSER) makelinks $(OUTPUT)/build-build /bin /opt/$(UTLX_NAME)/bin exec setuidgid $(NORMALUSER) s6-touch $@ |