1 ################################################################################
5 ################################################################################
7 NUT_VERSION_MAJOR
= 2.7
8 NUT_VERSION
= $(NUT_VERSION_MAJOR
).2
9 NUT_SITE
= http
://www.networkupstools.org
/source
/$(NUT_VERSION_MAJOR
)
10 NUT_LICENSE
= GPLv2
+, GPLv3
+ (python scripts
), GPL
/Artistic
(perl client
)
11 NUT_LICENSE_FILES
= COPYING LICENSE-GPL2 LICENSE-GPL3
12 NUT_DEPENDENCIES
= host-pkgconf
14 # Our patch changes m4 macros, so we need to autoreconf
17 # Put the PID files in a read-write place (/var/run is a tmpfs)
18 # since the default location (/var/state/ups) maybe readonly.
20 --with-altpidpath
=/var
/run
/upsd \
24 GDLIB_CONFIG
=$(STAGING_DIR
)/usr
/bin
/gdlib-config \
25 NET_SNMP_CONFIG
=$(STAGING_DIR
)/usr
/bin
/net-snmp-config
27 # For uClibc-based toolchains, nut forgets to link with -lm
28 ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC
),y
)
29 NUT_CONF_ENV
+= LDFLAGS
="$(TARGET_LDFLAGS) -lm"
32 ifeq ($(call qstrip
,$(BR2_PACKAGE_NUT_DRIVERS
)),)
33 NUT_CONF_OPTS
+= --with-drivers
=all
35 NUT_CONF_OPTS
+= --with-drivers
=$(BR2_PACKAGE_NUT_DRIVERS
)
38 ifeq ($(BR2_PACKAGE_AVAHI
)$(BR2_PACKAGE_DBUS
),yy
)
39 NUT_DEPENDENCIES
+= avahi dbus
40 NUT_CONF_OPTS
+= --with-avahi
42 NUT_CONF_OPTS
+= --without-avahi
45 # gd with support for png is required for the CGI
46 ifeq ($(BR2_PACKAGE_GD
)$(BR2_PACKAGE_LIBPNG
),yy
)
47 NUT_DEPENDENCIES
+= gd libpng
48 NUT_CONF_OPTS
+= --with-cgi
50 NUT_CONF_OPTS
+= --without-cgi
53 # nut-scanner needs libltdl, which is a wrapper arounf dlopen/dlsym,
54 # so is not available for static-only builds.
55 # There is no flag to directly enable/disable nut-scanner, it's done
56 # via the --enable/disable-libltdl flag.
57 ifeq ($(BR2_STATIC_LIBS
):$(BR2_PACKAGE_LIBTOOL
),:y
)
58 NUT_DEPENDENCIES
+= libtool
59 NUT_CONF_OPTS
+= --with-libltdl
61 NUT_CONF_OPTS
+= --without-libltdl
64 ifeq ($(BR2_PACKAGE_LIBUSB_COMPAT
),y
)
65 NUT_DEPENDENCIES
+= libusb-compat
66 NUT_CONF_OPTS
+= --with-usb
68 NUT_CONF_OPTS
+= --without-usb
71 ifeq ($(BR2_PACKAGE_NEON_EXPAT
)$(BR2_PACKAGE_NEON_LIBXML2
),y
)
72 NUT_DEPENDENCIES
+= neon
73 NUT_CONF_OPTS
+= --with-neon
75 NUT_CONF_OPTS
+= --without-neon
78 ifeq ($(BR2_PACKAGE_NETSNMP
),y
)
79 NUT_DEPENDENCIES
+= netsnmp
80 NUT_CONF_OPTS
+= --with-snmp
82 NUT_CONF_OPTS
+= --without-snmp
85 ifeq ($(BR2_PACKAGE_OPENSSL
),y
)
86 NUT_DEPENDENCIES
+= openssl
87 NUT_CONF_OPTS
+= --with-ssl
89 NUT_CONF_OPTS
+= --without-ssl
92 $(eval
$(autotools-package
))