The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / nut / nut.mk
1 ################################################################################
2 #
3 # nut
4 #
5 ################################################################################
6
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
13
14 # Our patch changes m4 macros, so we need to autoreconf
15 NUT_AUTORECONF = YES
16
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.
19 NUT_CONF_OPTS = \
20         --with-altpidpath=/var/run/upsd \
21         --without-hal
22
23 NUT_CONF_ENV = \
24         GDLIB_CONFIG=$(STAGING_DIR)/usr/bin/gdlib-config \
25         NET_SNMP_CONFIG=$(STAGING_DIR)/usr/bin/net-snmp-config
26
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"
30 endif
31
32 ifeq ($(call qstrip,$(BR2_PACKAGE_NUT_DRIVERS)),)
33 NUT_CONF_OPTS += --with-drivers=all
34 else
35 NUT_CONF_OPTS += --with-drivers=$(BR2_PACKAGE_NUT_DRIVERS)
36 endif
37
38 ifeq ($(BR2_PACKAGE_AVAHI)$(BR2_PACKAGE_DBUS),yy)
39 NUT_DEPENDENCIES += avahi dbus
40 NUT_CONF_OPTS += --with-avahi
41 else
42 NUT_CONF_OPTS += --without-avahi
43 endif
44
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
49 else
50 NUT_CONF_OPTS += --without-cgi
51 endif
52
53 # libltdl (libtool) is needed for nut-scanner
54 ifeq ($(BR2_PACKAGE_LIBTOOL),y)
55 NUT_DEPENDENCIES += libtool
56 NUT_CONF_OPTS += --with-libltdl
57 else
58 NUT_CONF_OPTS += --without-libltdl
59 endif
60
61 ifeq ($(BR2_PACKAGE_LIBUSB_COMPAT),y)
62 NUT_DEPENDENCIES += libusb-compat
63 NUT_CONF_OPTS += --with-usb
64 else
65 NUT_CONF_OPTS += --without-usb
66 endif
67
68 ifeq ($(BR2_PACKAGE_NEON_EXPAT)$(BR2_PACKAGE_NEON_LIBXML2),y)
69 NUT_DEPENDENCIES += neon
70 NUT_CONF_OPTS += --with-neon
71 else
72 NUT_CONF_OPTS += --without-neon
73 endif
74
75 ifeq ($(BR2_PACKAGE_NETSNMP),y)
76 NUT_DEPENDENCIES += netsnmp
77 NUT_CONF_OPTS += --with-snmp
78 else
79 NUT_CONF_OPTS += --without-snmp
80 endif
81
82 ifeq ($(BR2_PACKAGE_OPENSSL),y)
83 NUT_DEPENDENCIES += openssl
84 NUT_CONF_OPTS += --with-ssl
85 else
86 NUT_CONF_OPTS += --without-ssl
87 endif
88
89 $(eval $(autotools-package))