package/nut: new package
'nut' are the Network UPS Tools.
[Note: original patch from Dallas, but completely revamped
by Yann, so nothing remains from the original patch, but two
variable names.]
Signed-off-by: Dallas Clement <dallas.a.clement@gmail.com>
[yann.morin.1998@free.fr: refresh patch, use latest version,
add license, fix commit message, add dependencies, fix
runtime path, fix libs-config, move to 'system utils']
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-11-06 00:28:16 +01:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# nut
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2014-06-01 23:03:29 +02:00
|
|
|
NUT_VERSION_MAJOR = 2.7
|
|
|
|
NUT_VERSION = $(NUT_VERSION_MAJOR).2
|
2014-07-31 10:46:58 +02:00
|
|
|
NUT_SITE = http://www.networkupstools.org/source/$(NUT_VERSION_MAJOR)
|
package/nut: new package
'nut' are the Network UPS Tools.
[Note: original patch from Dallas, but completely revamped
by Yann, so nothing remains from the original patch, but two
variable names.]
Signed-off-by: Dallas Clement <dallas.a.clement@gmail.com>
[yann.morin.1998@free.fr: refresh patch, use latest version,
add license, fix commit message, add dependencies, fix
runtime path, fix libs-config, move to 'system utils']
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-11-06 00:28:16 +01:00
|
|
|
NUT_LICENSE = GPLv2+, GPLv3+ (python scripts), GPL/Artistic (perl client)
|
|
|
|
NUT_LICENSE_FILES = COPYING LICENSE-GPL2 LICENSE-GPL3
|
|
|
|
NUT_DEPENDENCIES = host-pkgconf
|
|
|
|
|
|
|
|
# Our patch changes m4 macros, so we need to autoreconf
|
|
|
|
NUT_AUTORECONF = YES
|
|
|
|
|
|
|
|
# Put the PID files in a read-write place (/var/run is a tmpfs)
|
|
|
|
# since the default location (/var/state/ups) maybe readonly.
|
2014-09-27 21:32:44 +02:00
|
|
|
NUT_CONF_OPTS = \
|
2014-02-13 22:17:54 +01:00
|
|
|
--with-altpidpath=/var/run/upsd \
|
|
|
|
--without-hal
|
package/nut: new package
'nut' are the Network UPS Tools.
[Note: original patch from Dallas, but completely revamped
by Yann, so nothing remains from the original patch, but two
variable names.]
Signed-off-by: Dallas Clement <dallas.a.clement@gmail.com>
[yann.morin.1998@free.fr: refresh patch, use latest version,
add license, fix commit message, add dependencies, fix
runtime path, fix libs-config, move to 'system utils']
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-11-06 00:28:16 +01:00
|
|
|
|
|
|
|
NUT_CONF_ENV = \
|
|
|
|
GDLIB_CONFIG=$(STAGING_DIR)/usr/bin/gdlib-config \
|
|
|
|
NET_SNMP_CONFIG=$(STAGING_DIR)/usr/bin/net-snmp-config
|
|
|
|
|
|
|
|
# For uClibc-based toolchains, nut forgets to link with -lm
|
|
|
|
ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
|
|
|
|
NUT_CONF_ENV += LDFLAGS="$(TARGET_LDFLAGS) -lm"
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(call qstrip,$(BR2_PACKAGE_NUT_DRIVERS)),)
|
2014-09-27 21:32:44 +02:00
|
|
|
NUT_CONF_OPTS += --with-drivers=all
|
package/nut: new package
'nut' are the Network UPS Tools.
[Note: original patch from Dallas, but completely revamped
by Yann, so nothing remains from the original patch, but two
variable names.]
Signed-off-by: Dallas Clement <dallas.a.clement@gmail.com>
[yann.morin.1998@free.fr: refresh patch, use latest version,
add license, fix commit message, add dependencies, fix
runtime path, fix libs-config, move to 'system utils']
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-11-06 00:28:16 +01:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
NUT_CONF_OPTS += --with-drivers=$(BR2_PACKAGE_NUT_DRIVERS)
|
package/nut: new package
'nut' are the Network UPS Tools.
[Note: original patch from Dallas, but completely revamped
by Yann, so nothing remains from the original patch, but two
variable names.]
Signed-off-by: Dallas Clement <dallas.a.clement@gmail.com>
[yann.morin.1998@free.fr: refresh patch, use latest version,
add license, fix commit message, add dependencies, fix
runtime path, fix libs-config, move to 'system utils']
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-11-06 00:28:16 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_AVAHI)$(BR2_PACKAGE_DBUS),yy)
|
|
|
|
NUT_DEPENDENCIES += avahi dbus
|
2014-09-27 21:32:44 +02:00
|
|
|
NUT_CONF_OPTS += --with-avahi
|
package/nut: new package
'nut' are the Network UPS Tools.
[Note: original patch from Dallas, but completely revamped
by Yann, so nothing remains from the original patch, but two
variable names.]
Signed-off-by: Dallas Clement <dallas.a.clement@gmail.com>
[yann.morin.1998@free.fr: refresh patch, use latest version,
add license, fix commit message, add dependencies, fix
runtime path, fix libs-config, move to 'system utils']
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-11-06 00:28:16 +01:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
NUT_CONF_OPTS += --without-avahi
|
package/nut: new package
'nut' are the Network UPS Tools.
[Note: original patch from Dallas, but completely revamped
by Yann, so nothing remains from the original patch, but two
variable names.]
Signed-off-by: Dallas Clement <dallas.a.clement@gmail.com>
[yann.morin.1998@free.fr: refresh patch, use latest version,
add license, fix commit message, add dependencies, fix
runtime path, fix libs-config, move to 'system utils']
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-11-06 00:28:16 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
# gd with support for png is required for the CGI
|
|
|
|
ifeq ($(BR2_PACKAGE_GD)$(BR2_PACKAGE_LIBPNG),yy)
|
|
|
|
NUT_DEPENDENCIES += gd libpng
|
2014-09-27 21:32:44 +02:00
|
|
|
NUT_CONF_OPTS += --with-cgi
|
package/nut: new package
'nut' are the Network UPS Tools.
[Note: original patch from Dallas, but completely revamped
by Yann, so nothing remains from the original patch, but two
variable names.]
Signed-off-by: Dallas Clement <dallas.a.clement@gmail.com>
[yann.morin.1998@free.fr: refresh patch, use latest version,
add license, fix commit message, add dependencies, fix
runtime path, fix libs-config, move to 'system utils']
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-11-06 00:28:16 +01:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
NUT_CONF_OPTS += --without-cgi
|
package/nut: new package
'nut' are the Network UPS Tools.
[Note: original patch from Dallas, but completely revamped
by Yann, so nothing remains from the original patch, but two
variable names.]
Signed-off-by: Dallas Clement <dallas.a.clement@gmail.com>
[yann.morin.1998@free.fr: refresh patch, use latest version,
add license, fix commit message, add dependencies, fix
runtime path, fix libs-config, move to 'system utils']
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-11-06 00:28:16 +01:00
|
|
|
endif
|
|
|
|
|
2013-11-23 19:46:25 +01:00
|
|
|
# libltdl (libtool) is needed for nut-scanner
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBTOOL),y)
|
|
|
|
NUT_DEPENDENCIES += libtool
|
2014-09-27 21:32:44 +02:00
|
|
|
NUT_CONF_OPTS += --with-libltdl
|
2013-11-23 19:46:25 +01:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
NUT_CONF_OPTS += --without-libltdl
|
2013-11-23 19:46:25 +01:00
|
|
|
endif
|
|
|
|
|
package/nut: new package
'nut' are the Network UPS Tools.
[Note: original patch from Dallas, but completely revamped
by Yann, so nothing remains from the original patch, but two
variable names.]
Signed-off-by: Dallas Clement <dallas.a.clement@gmail.com>
[yann.morin.1998@free.fr: refresh patch, use latest version,
add license, fix commit message, add dependencies, fix
runtime path, fix libs-config, move to 'system utils']
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-11-06 00:28:16 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBUSB_COMPAT),y)
|
|
|
|
NUT_DEPENDENCIES += libusb-compat
|
2014-09-27 21:32:44 +02:00
|
|
|
NUT_CONF_OPTS += --with-usb
|
package/nut: new package
'nut' are the Network UPS Tools.
[Note: original patch from Dallas, but completely revamped
by Yann, so nothing remains from the original patch, but two
variable names.]
Signed-off-by: Dallas Clement <dallas.a.clement@gmail.com>
[yann.morin.1998@free.fr: refresh patch, use latest version,
add license, fix commit message, add dependencies, fix
runtime path, fix libs-config, move to 'system utils']
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-11-06 00:28:16 +01:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
NUT_CONF_OPTS += --without-usb
|
package/nut: new package
'nut' are the Network UPS Tools.
[Note: original patch from Dallas, but completely revamped
by Yann, so nothing remains from the original patch, but two
variable names.]
Signed-off-by: Dallas Clement <dallas.a.clement@gmail.com>
[yann.morin.1998@free.fr: refresh patch, use latest version,
add license, fix commit message, add dependencies, fix
runtime path, fix libs-config, move to 'system utils']
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-11-06 00:28:16 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_NEON_EXPAT)$(BR2_PACKAGE_NEON_LIBXML2),y)
|
|
|
|
NUT_DEPENDENCIES += neon
|
2014-09-27 21:32:44 +02:00
|
|
|
NUT_CONF_OPTS += --with-neon
|
package/nut: new package
'nut' are the Network UPS Tools.
[Note: original patch from Dallas, but completely revamped
by Yann, so nothing remains from the original patch, but two
variable names.]
Signed-off-by: Dallas Clement <dallas.a.clement@gmail.com>
[yann.morin.1998@free.fr: refresh patch, use latest version,
add license, fix commit message, add dependencies, fix
runtime path, fix libs-config, move to 'system utils']
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-11-06 00:28:16 +01:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
NUT_CONF_OPTS += --without-neon
|
package/nut: new package
'nut' are the Network UPS Tools.
[Note: original patch from Dallas, but completely revamped
by Yann, so nothing remains from the original patch, but two
variable names.]
Signed-off-by: Dallas Clement <dallas.a.clement@gmail.com>
[yann.morin.1998@free.fr: refresh patch, use latest version,
add license, fix commit message, add dependencies, fix
runtime path, fix libs-config, move to 'system utils']
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-11-06 00:28:16 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_NETSNMP),y)
|
|
|
|
NUT_DEPENDENCIES += netsnmp
|
2014-09-27 21:32:44 +02:00
|
|
|
NUT_CONF_OPTS += --with-snmp
|
package/nut: new package
'nut' are the Network UPS Tools.
[Note: original patch from Dallas, but completely revamped
by Yann, so nothing remains from the original patch, but two
variable names.]
Signed-off-by: Dallas Clement <dallas.a.clement@gmail.com>
[yann.morin.1998@free.fr: refresh patch, use latest version,
add license, fix commit message, add dependencies, fix
runtime path, fix libs-config, move to 'system utils']
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-11-06 00:28:16 +01:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
NUT_CONF_OPTS += --without-snmp
|
package/nut: new package
'nut' are the Network UPS Tools.
[Note: original patch from Dallas, but completely revamped
by Yann, so nothing remains from the original patch, but two
variable names.]
Signed-off-by: Dallas Clement <dallas.a.clement@gmail.com>
[yann.morin.1998@free.fr: refresh patch, use latest version,
add license, fix commit message, add dependencies, fix
runtime path, fix libs-config, move to 'system utils']
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-11-06 00:28:16 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_OPENSSL),y)
|
|
|
|
NUT_DEPENDENCIES += openssl
|
2014-09-27 21:32:44 +02:00
|
|
|
NUT_CONF_OPTS += --with-ssl
|
package/nut: new package
'nut' are the Network UPS Tools.
[Note: original patch from Dallas, but completely revamped
by Yann, so nothing remains from the original patch, but two
variable names.]
Signed-off-by: Dallas Clement <dallas.a.clement@gmail.com>
[yann.morin.1998@free.fr: refresh patch, use latest version,
add license, fix commit message, add dependencies, fix
runtime path, fix libs-config, move to 'system utils']
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-11-06 00:28:16 +01:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
NUT_CONF_OPTS += --without-ssl
|
package/nut: new package
'nut' are the Network UPS Tools.
[Note: original patch from Dallas, but completely revamped
by Yann, so nothing remains from the original patch, but two
variable names.]
Signed-off-by: Dallas Clement <dallas.a.clement@gmail.com>
[yann.morin.1998@free.fr: refresh patch, use latest version,
add license, fix commit message, add dependencies, fix
runtime path, fix libs-config, move to 'system utils']
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-11-06 00:28:16 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
$(eval $(autotools-package))
|