From: <abe...@us...> - 2013-12-25 20:15:24
|
Revision: 6323 http://sourceforge.net/p/astlinux/code/6323 Author: abelbeck Date: 2013-12-25 20:15:21 +0000 (Wed, 25 Dec 2013) Log Message: ----------- nut, new package from upstream Buildroot, disabled. Still needs 'upsd' init.d script and a lot of configurationspread across several files. Adds 1.1 MB to the compressed image when enabled. Modified Paths: -------------- branches/1.0/astlinux-ast11.config branches/1.0/astlinux.config branches/1.0/astlinux18.config branches/1.0/initrd.config branches/1.0/package/Config.in branches/1.0/runnix-uclibc.config branches/1.0/runnix.config Added Paths: ----------- branches/1.0/package/nut/ branches/1.0/package/nut/Config.in branches/1.0/package/nut/nut-0001-foo-config.patch branches/1.0/package/nut/nut.mk Modified: branches/1.0/astlinux-ast11.config =================================================================== --- branches/1.0/astlinux-ast11.config 2013-12-24 02:51:05 UTC (rev 6322) +++ branches/1.0/astlinux-ast11.config 2013-12-25 20:15:21 UTC (rev 6323) @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Buildroot 2011.08-svn6308-dirty Configuration -# Thu Dec 12 16:11:16 2013 +# Buildroot 2011.08-svn6322-dirty Configuration +# Wed Dec 25 14:09:50 2013 # BR2_HAVE_DOT_CONFIG=y # BR2_arm is not set @@ -736,6 +736,7 @@ BR2_PACKAGE_NTP_NTPQ=y # BR2_PACKAGE_NTP_NTPTRACE is not set # BR2_PACKAGE_NTP_TICKADJ is not set +# BR2_PACKAGE_NUT is not set # BR2_PACKAGE_NUTTCP is not set # BR2_PACKAGE_OLSR is not set BR2_PACKAGE_OPENLDAP=y Modified: branches/1.0/astlinux.config =================================================================== --- branches/1.0/astlinux.config 2013-12-24 02:51:05 UTC (rev 6322) +++ branches/1.0/astlinux.config 2013-12-25 20:15:21 UTC (rev 6323) @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Buildroot 2011.08-svn6308-dirty Configuration -# Thu Dec 12 16:11:07 2013 +# Buildroot 2011.08-svn6322-dirty Configuration +# Wed Dec 25 14:09:47 2013 # BR2_HAVE_DOT_CONFIG=y # BR2_arm is not set @@ -738,6 +738,7 @@ BR2_PACKAGE_NTP_NTPQ=y # BR2_PACKAGE_NTP_NTPTRACE is not set # BR2_PACKAGE_NTP_TICKADJ is not set +# BR2_PACKAGE_NUT is not set # BR2_PACKAGE_NUTTCP is not set # BR2_PACKAGE_OLSR is not set BR2_PACKAGE_OPENLDAP=y Modified: branches/1.0/astlinux18.config =================================================================== --- branches/1.0/astlinux18.config 2013-12-24 02:51:05 UTC (rev 6322) +++ branches/1.0/astlinux18.config 2013-12-25 20:15:21 UTC (rev 6323) @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Buildroot 2011.08-svn6308-dirty Configuration -# Thu Dec 12 16:11:09 2013 +# Buildroot 2011.08-svn6322-dirty Configuration +# Wed Dec 25 14:09:48 2013 # BR2_HAVE_DOT_CONFIG=y # BR2_arm is not set @@ -736,6 +736,7 @@ BR2_PACKAGE_NTP_NTPQ=y # BR2_PACKAGE_NTP_NTPTRACE is not set # BR2_PACKAGE_NTP_TICKADJ is not set +# BR2_PACKAGE_NUT is not set # BR2_PACKAGE_NUTTCP is not set # BR2_PACKAGE_OLSR is not set BR2_PACKAGE_OPENLDAP=y Modified: branches/1.0/initrd.config =================================================================== --- branches/1.0/initrd.config 2013-12-24 02:51:05 UTC (rev 6322) +++ branches/1.0/initrd.config 2013-12-25 20:15:21 UTC (rev 6323) @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Buildroot 2011.08-svn6281-dirty Configuration -# Sat Nov 16 14:15:32 2013 +# Buildroot 2011.08-svn6322-dirty Configuration +# Wed Dec 25 14:09:57 2013 # BR2_HAVE_DOT_CONFIG=y # BR2_arm is not set @@ -586,6 +586,7 @@ # BR2_PACKAGE_NGREP is not set # BR2_PACKAGE_NMAP is not set # BR2_PACKAGE_NTP is not set +# BR2_PACKAGE_NUT is not set # BR2_PACKAGE_NUTTCP is not set # BR2_PACKAGE_OLSR is not set # BR2_PACKAGE_OPENLDAP is not set Modified: branches/1.0/package/Config.in =================================================================== --- branches/1.0/package/Config.in 2013-12-24 02:51:05 UTC (rev 6322) +++ branches/1.0/package/Config.in 2013-12-25 20:15:21 UTC (rev 6323) @@ -491,6 +491,7 @@ source "package/ngrep/Config.in" source "package/nmap/Config.in" source "package/ntp/Config.in" +source "package/nut/Config.in" source "package/nuttcp/Config.in" source "package/olsr/Config.in" source "package/openldap/Config.in" Added: branches/1.0/package/nut/Config.in =================================================================== --- branches/1.0/package/nut/Config.in (rev 0) +++ branches/1.0/package/nut/Config.in 2013-12-25 20:15:21 UTC (rev 6323) @@ -0,0 +1,11 @@ +config BR2_PACKAGE_NUT + bool "nut" + help + Network UPS tools + + The primary goal of the Network UPS Tools (NUT) project is to provide + support for Power Devices, such as Uninterruptible Power Supplies, + Power Distribution Units and Solar Controllers. + + http://www.networkupstools.org/ + Added: branches/1.0/package/nut/nut-0001-foo-config.patch =================================================================== --- branches/1.0/package/nut/nut-0001-foo-config.patch (rev 0) +++ branches/1.0/package/nut/nut-0001-foo-config.patch 2013-12-25 20:15:21 UTC (rev 6323) @@ -0,0 +1,72 @@ +configure: fix calls to {gdlib,net-snmp}-config + +nut directly calls to {gdlib,net-snmp}-config. In Buildroot, +those are not in the PATH, and nut would catch those of the +system (if they are installed), or miss them entirely. + +Fix that by using environment variables that will tell where +to look for them. + +Note: libusb also uses libusb-config, but only as a fallback +if pkg-config fails. Since we ensure that pkg-config exists, +and libusb is properly installed before we build nut, there +is no need to fix the libusb-config calls, since they won't +be called at all. + +Signed-off-by: "Yann E. MORIN" <yan...@fr...> + +diff -durN nut-2.6.5.orig/m4/nut_check_libgd.m4 nut-2.6.5/m4/nut_check_libgd.m4 +--- nut-2.6.5.orig/m4/nut_check_libgd.m4 2012-07-31 19:38:56.000000000 +0200 ++++ nut-2.6.5/m4/nut_check_libgd.m4 2013-11-01 16:24:02.626549810 +0100 +@@ -20,7 +20,7 @@ + LIBS="-lgd -lpng -lz -ljpeg -lfreetype -lm -lXpm -lX11" + + AC_MSG_CHECKING(for gd version via gdlib-config) +- GD_VERSION=`gdlib-config --version 2>/dev/null` ++ GD_VERSION=`${GDLIB_CONFIG} --version 2>/dev/null` + if test "$?" != "0" -o -z "${GD_VERSION}"; then + GD_VERSION="none" + fi +@@ -34,9 +34,9 @@ + AC_MSG_WARN([[If gd detection fails, upgrade gd or use --with-gd-includes and --with-gd-libs]]) + ;; + *) +- CFLAGS="`gdlib-config --includes 2>/dev/null`" +- LDFLAGS="`gdlib-config --ldflags 2>/dev/null`" +- LIBS="`gdlib-config --libs 2>/dev/null`" ++ CFLAGS="`${GDLIB_CONFIG} --includes 2>/dev/null`" ++ LDFLAGS="`${GDLIB_CONFIG} --ldflags 2>/dev/null`" ++ LIBS="`${GDLIB_CONFIG} --libs 2>/dev/null`" + ;; + esac + +diff -durN nut-2.7.1/m4/nut_check_libnetsnmp.m4.orig nut-2.7.1/m4/nut_check_libnetsnmp.m4 +--- nut-2.7.1/m4/nut_check_libnetsnmp.m4.orig 2013-12-25 12:09:14.000000000 -0600 ++++ nut-2.7.1/m4/nut_check_libnetsnmp.m4 2013-12-25 12:10:33.000000000 -0600 +@@ -15,7 +15,7 @@ + + dnl See which version of the Net-SNMP library (if any) is installed + AC_MSG_CHECKING(for Net-SNMP version via net-snmp-config) +- SNMP_VERSION=`net-snmp-config --version 2>/dev/null` ++ SNMP_VERSION=`${NET_SNMP_CONFIG} --version 2>/dev/null` + if test "$?" != "0" -o -z "${SNMP_VERSION}"; then + SNMP_VERSION="none" + fi +@@ -33,7 +33,7 @@ + CFLAGS="${withval}" + ;; + esac +- ], [CFLAGS="`net-snmp-config --base-cflags 2>/dev/null`"]) ++ ], [CFLAGS="`${NET_SNMP_CONFIG} --base-cflags 2>/dev/null`"]) + AC_MSG_RESULT([${CFLAGS}]) + + AC_MSG_CHECKING(for Net-SNMP libs) +@@ -48,7 +48,7 @@ + LIBS="${withval}" + ;; + esac +- ], [LIBS="`net-snmp-config --libs 2>/dev/null`"]) ++ ], [LIBS="`${NET_SNMP_CONFIG} --libs 2>/dev/null`"]) + AC_MSG_RESULT([${LIBS}]) + + dnl Check if the Net-SNMP library is usable Added: branches/1.0/package/nut/nut.mk =================================================================== --- branches/1.0/package/nut/nut.mk (rev 0) +++ branches/1.0/package/nut/nut.mk 2013-12-25 20:15:21 UTC (rev 6323) @@ -0,0 +1,95 @@ +################################################################################ +# +# nut +# +################################################################################ + +NUT_VERSION_MAJOR = 2.7 +NUT_VERSION = $(NUT_VERSION_MAJOR).1 +NUT_SITE = http://www.networkupstools.org/source/$(NUT_VERSION_MAJOR)/ +NUT_DEPENDENCIES = host-pkg-config + +# 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. +NUT_CONF_OPT = \ + --with-altpidpath=/var/run/upsd + +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 + +# All drivers without serial +NUT_CONF_OPT += --without-serial +NUT_CONF_OPT += --with-drivers=all + +ifeq ($(BR2_PACKAGE_AVAHI)$(BR2_PACKAGE_DBUS),yy) +NUT_DEPENDENCIES += avahi dbus +NUT_CONF_OPT += --with-avahi +else +NUT_CONF_OPT += --without-avahi +endif + +# gd with support for png is required for the CGI +ifeq ($(BR2_PACKAGE_GD)$(BR2_PACKAGE_LIBPNG),yy) +NUT_DEPENDENCIES += gd libpng +NUT_CONF_OPT += --with-cgi +else +NUT_CONF_OPT += --without-cgi +endif + +# libltdl (libtool) is needed for nut-scanner +ifeq ($(BR2_PACKAGE_LIBTOOL),y) +NUT_DEPENDENCIES += libtool +NUT_CONF_OPT += --with-libltdl +else +NUT_CONF_OPT += --without-libltdl +endif + +ifeq ($(BR2_PACKAGE_LIBUSB_COMPAT),y) +NUT_DEPENDENCIES += libusb-compat +NUT_CONF_OPT += --with-usb +else +NUT_CONF_OPT += --without-usb +endif + +ifeq ($(BR2_PACKAGE_NEON_EXPAT)$(BR2_PACKAGE_NEON_LIBXML2),y) +NUT_DEPENDENCIES += neon +NUT_CONF_OPT += --with-neon +else +NUT_CONF_OPT += --without-neon +endif + +ifeq ($(BR2_PACKAGE_NETSNMP),y) +NUT_DEPENDENCIES += netsnmp +NUT_CONF_OPT += --with-snmp +else +NUT_CONF_OPT += --without-snmp +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +NUT_DEPENDENCIES += openssl +NUT_CONF_OPT += --with-ssl +else +NUT_CONF_OPT += --without-ssl +endif + +define NUT_INSTALL_SCRIPT + #$(INSTALL) -D -m 755 package/nut/upsd.init $(TARGET_DIR)/etc/init.d/upsd + mkdir -p $(TARGET_DIR)/stat/etc/upsd + for i in upsd.conf upsd.users ups.conf upsmon.conf upssched.conf; do \ + mv $(TARGET_DIR)/etc/$$i.sample $(TARGET_DIR)/stat/etc/upsd/$$i ; \ + ln -sf /tmp/etc/$$i $(TARGET_DIR)/etc/$$i ; \ + done +endef + +NUT_POST_INSTALL_TARGET_HOOKS += NUT_INSTALL_SCRIPT + +$(eval $(call AUTOTARGETS,package,nut)) Modified: branches/1.0/runnix-uclibc.config =================================================================== --- branches/1.0/runnix-uclibc.config 2013-12-24 02:51:05 UTC (rev 6322) +++ branches/1.0/runnix-uclibc.config 2013-12-25 20:15:21 UTC (rev 6323) @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Buildroot 2011.08-svn6268-dirty Configuration -# Wed Nov 13 09:15:22 2013 +# Buildroot 2011.08-svn6322-dirty Configuration +# Wed Dec 25 14:09:54 2013 # BR2_HAVE_DOT_CONFIG=y # BR2_arm is not set @@ -913,6 +913,7 @@ # BR2_PACKAGE_NGREP is not set # BR2_PACKAGE_NMAP is not set # BR2_PACKAGE_NTP is not set +# BR2_PACKAGE_NUT is not set # BR2_PACKAGE_NUTTCP is not set # Modified: branches/1.0/runnix.config =================================================================== --- branches/1.0/runnix.config 2013-12-24 02:51:05 UTC (rev 6322) +++ branches/1.0/runnix.config 2013-12-25 20:15:21 UTC (rev 6323) @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Buildroot 2011.08-svn6268-dirty Configuration -# Wed Nov 13 09:15:17 2013 +# Buildroot 2011.08-svn6322-dirty Configuration +# Wed Dec 25 14:09:51 2013 # BR2_HAVE_DOT_CONFIG=y # BR2_arm is not set @@ -622,6 +622,7 @@ # BR2_PACKAGE_NGREP is not set # BR2_PACKAGE_NMAP is not set # BR2_PACKAGE_NTP is not set +# BR2_PACKAGE_NUT is not set # BR2_PACKAGE_NUTTCP is not set # BR2_PACKAGE_OLSR is not set # BR2_PACKAGE_OPENLDAP is not set This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |