1################################################################################
2#
3# ipmitool
4#
5################################################################################
6
7IPMITOOL_VERSION = 1_8_19
8IPMITOOL_SITE = $(call github,ipmitool,ipmitool,IPMITOOL_$(IPMITOOL_VERSION))
9IPMITOOL_LICENSE = BSD-3-Clause
10IPMITOOL_LICENSE_FILES = COPYING
11IPMITOOL_CPE_ID_VALID = YES
12# From git
13IPMITOOL_AUTORECONF = YES
14IPMITOOL_DEPENDENCIES = host-pkgconf
15
16IPMITOOL_CONF_OPTS = --disable-registry-download
17
18ifeq ($(BR2_PACKAGE_FREEIPMI),y)
19IPMITOOL_DEPENDENCIES += freeipmi
20IPMITOOL_CONF_OPTS += --enable-intf-free
21else
22IPMITOOL_CONF_OPTS += --disable-intf-free
23endif
24
25ifeq ($(BR2_PACKAGE_IPMITOOL_LANPLUS),y)
26IPMITOOL_DEPENDENCIES += openssl
27IPMITOOL_CONF_OPTS += --enable-intf-lanplus
28else
29IPMITOOL_CONF_OPTS += --disable-intf-lanplus
30endif
31
32ifeq ($(BR2_PACKAGE_IPMITOOL_USB),y)
33IPMITOOL_CONF_OPTS += --enable-intf-usb
34else
35IPMITOOL_CONF_OPTS += --disable-intf-usb
36endif
37
38ifeq ($(BR2_PACKAGE_IPMITOOL_IPMISHELL),y)
39IPMITOOL_DEPENDENCIES += readline
40IPMITOOL_CONF_OPTS += --enable-ipmishell
41else
42IPMITOOL_CONF_OPTS += --disable-ipmishell
43endif
44
45ifeq ($(BR2_PACKAGE_IPMITOOL_IPMIEVD),)
46define IPMITOOL_REMOVE_IPMIEVD
47	$(RM) -f $(TARGET_DIR)/usr/sbin/ipmievd
48endef
49IPMITOOL_POST_INSTALL_TARGET_HOOKS += IPMITOOL_REMOVE_IPMIEVD
50endif
51
52IPMITOOL_PEN_REG_URI = $(call qstrip,$(BR2_PACKAGE_IPMITOOL_PEN_REG_URI))
53ifneq ($(IPMITOOL_PEN_REG_URI),)
54ifneq ($(findstring ://,$(IPMITOOL_PEN_REG_URI)),)
55IPMITOOL_EXTRA_DOWNLOADS += $(IPMITOOL_PEN_REG_URI)
56BR_NO_CHECK_HASH_FOR += $(notdir $(IPMITOOL_PEN_REG_URI))
57IPMITOOL_PEN_REG = $(IPMITOOL_DL_DIR)/$(notdir $(IPMITOOL_PEN_REG_URI))
58else
59IPMITOOL_PEN_REG = $(IPMITOOL_PEN_REG_URI)
60endif #findstring
61define IPMITOOL_INSTALL_PEN_REG
62	$(INSTALL) -D -m 0644 $(IPMITOOL_PEN_REG) \
63		$(TARGET_DIR)/usr/share/misc/enterprise-numbers
64endef
65IPMITOOL_POST_INSTALL_TARGET_HOOKS += IPMITOOL_INSTALL_PEN_REG
66endif # IPMITOOL_PEN_REG_URI !empty
67
68$(eval $(autotools-package))
69