buildrootschalter/package/gptfdisk/gptfdisk.mk
Thomas Petazzoni 20a60679c4 gptfdisk: add support for building and install cgdisk
In addition to the command-line tool gdisk and the interactive tool
sgdisk, gptfdisk also provides a ncurses based tool, cgdisk. This
commit adds support for building and installing this tool.

[Peter: Update gdisk autoselection logic to consider cgdisk as well]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-03-10 22:31:17 +01:00

43 lines
1.1 KiB
Makefile

#############################################################
#
# gptfdisk
#
#############################################################
GPTFDISK_VERSION = 0.8.6
GPTFDISK_SITE = http://downloads.sourceforge.net/sourceforge/gptfdisk
GPTFDISK_TARGETS_$(BR2_PACKAGE_GPTFDISK_GDISK) += gdisk
GPTFDISK_TARGETS_$(BR2_PACKAGE_GPTFDISK_SGDISK) += sgdisk
GPTFDISK_TARGETS_$(BR2_PACKAGE_GPTFDISK_CGDISK) += cgdisk
GPTFDISK_DEPENDENCIES += util-linux
ifeq ($(BR2_PACKAGE_GPTFDISK_SGDISK),y)
GPTFDISK_DEPENDENCIES += popt
endif
ifeq ($(BR2_PACKAGE_GPTFDISK_CGDISK),y)
GPTFDISK_DEPENDENCIES += ncurses
endif
ifeq ($(BR2_PACKAGE_ICU),y)
GPTFDISK_DEPENDENCIES += icu
GPTFDISK_MAKE_OPTS += USE_UTF16=y
endif
define GPTFDISK_BUILD_CMDS
$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) \
$(GPTFDISK_MAKE_OPTS) $(GPTFDISK_TARGETS_y)
endef
define GPTFDISK_INSTALL_TARGET_CMDS
for i in $(GPTFDISK_TARGETS_y); do \
$(INSTALL) -D -m 0755 $(@D)/$$i $(TARGET_DIR)/usr/sbin/$$i; \
done
endef
define GPTFDISK_UNINSTALL_TARGET_CMDS
rm -f $(addprefix $(TARGET_DIR)/usr/sbin/,$(GPTFDISK_TARGETS_y))
endef
$(eval $(generic-package))