|
@@ -4,44 +4,38 @@
|
|
|
#
|
|
|
################################################################################
|
|
|
|
|
|
-NUT_VERSION = 03c3bbe8df9a2caf3c09c120ae7045d35af99b76
|
|
|
-NUT_SITE = $(call github,networkupstools,nut,$(NUT_VERSION))
|
|
|
+NUT_VERSION = 2.8.0
|
|
|
+NUT_SITE = https://github.com/networkupstools/nut/releases/download/v$(NUT_VERSION)
|
|
|
NUT_LICENSE = GPL-2.0+, GPL-3.0+ (python scripts), GPL/Artistic (perl client)
|
|
|
NUT_LICENSE_FILES = COPYING LICENSE-GPL2 LICENSE-GPL3
|
|
|
NUT_SELINUX_MODULES = apache nut
|
|
|
NUT_INSTALL_STAGING = YES
|
|
|
-NUT_DEPENDENCIES = host-pkgconf host-perl
|
|
|
+NUT_DEPENDENCIES = host-pkgconf
|
|
|
|
|
|
-# From git:
|
|
|
-NUT_AUTORECONF = YES
|
|
|
-
|
|
|
-# Generate files otherwise generated by autogen.sh
|
|
|
-# buildroot does not support augeas, creating an empty file prevents
|
|
|
-# us from adding a dependency to host-python
|
|
|
-define NUT_PREGEN
|
|
|
- touch $(@D)/scripts/augeas/nutupsconf.aug.in
|
|
|
- cd $(@D)/tools && PATH=$(BR_PATH) ./nut-usbinfo.pl
|
|
|
+# prevent usage of unsafe paths
|
|
|
+define NUT_FIX_CONFIGURE
|
|
|
+ $(SED) 's%CFLAGS="-isystem /usr/local/include%_UNUSED_CFLAGS="-isystem /usr/local/include%' $(@D)/configure
|
|
|
+ $(SED) 's%CXXFLAGS="-isystem /usr/local/include%_UNUSED_CXXFLAGS="-isystem /usr/local/include%' $(@D)/configure
|
|
|
endef
|
|
|
-NUT_PRE_CONFIGURE_HOOKS += NUT_PREGEN
|
|
|
-
|
|
|
-# Race condition in tools generation
|
|
|
-NUT_MAKE = $(MAKE1)
|
|
|
+NUT_POST_PATCH_HOOKS += NUT_FIX_CONFIGURE
|
|
|
|
|
|
# Put the PID files in a read-write place (/var/run is a tmpfs)
|
|
|
# since the default location (/var/state/ups) maybe readonly.
|
|
|
NUT_CONF_OPTS = \
|
|
|
--with-altpidpath=/var/run/upsd \
|
|
|
- --with-dev
|
|
|
+ --with-dev \
|
|
|
+ --without-doc
|
|
|
|
|
|
-NUT_CONF_ENV = ax_cv__printf_string_null=yes
|
|
|
-
|
|
|
-# For uClibc-based toolchains, nut forgets to link with -lm
|
|
|
-ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
|
|
|
-NUT_CONF_ENV += LDFLAGS="$(TARGET_LDFLAGS) -lm"
|
|
|
-endif
|
|
|
+NUT_CONF_ENV = \
|
|
|
+ ax_cv_check_cflags__Werror__Wno_unknown_warning_option=no \
|
|
|
+ ax_cv_check_cxxflags__Werror__Wno_unknown_warning_option=no \
|
|
|
+ ac_cv_func_strcasecmp=yes \
|
|
|
+ ac_cv_func_strdup=yes \
|
|
|
+ ac_cv_func_strncasecmp=yes \
|
|
|
+ ax_cv__printf_string_null=yes
|
|
|
|
|
|
ifeq ($(call qstrip,$(BR2_PACKAGE_NUT_DRIVERS)),)
|
|
|
-NUT_CONF_OPTS += --with-drivers=all
|
|
|
+NUT_CONF_OPTS += --with-drivers=auto
|
|
|
else
|
|
|
NUT_CONF_OPTS += --with-drivers=$(BR2_PACKAGE_NUT_DRIVERS)
|
|
|
endif
|
|
@@ -53,6 +47,13 @@ else
|
|
|
NUT_CONF_OPTS += --without-avahi
|
|
|
endif
|
|
|
|
|
|
+ifeq ($(BR2_PACKAGE_FREEIPMI),y)
|
|
|
+NUT_CONF_OPTS += --with-freeipmi
|
|
|
+NUT_DEPENDENCIES += freeipmi
|
|
|
+else
|
|
|
+NUT_CONF_OPTS += --without-freeipmi
|
|
|
+endif
|
|
|
+
|
|
|
# gd with support for png is required for the CGI
|
|
|
ifeq ($(BR2_PACKAGE_GD)$(BR2_PACKAGE_LIBPNG),yy)
|
|
|
NUT_DEPENDENCIES += gd libpng
|
|
@@ -72,7 +73,10 @@ else
|
|
|
NUT_CONF_OPTS += --without-libltdl
|
|
|
endif
|
|
|
|
|
|
-ifeq ($(BR2_PACKAGE_LIBUSB_COMPAT),y)
|
|
|
+ifeq ($(BR2_PACKAGE_LIBUSB),y)
|
|
|
+NUT_DEPENDENCIES += libusb
|
|
|
+NUT_CONF_OPTS += --with-usb
|
|
|
+else ifeq ($(BR2_PACKAGE_LIBUSB_COMPAT),y)
|
|
|
NUT_DEPENDENCIES += libusb-compat
|
|
|
NUT_CONF_OPTS += --with-usb
|
|
|
else
|