###############################################################################
# #
# IPFire.org - A linux based firewall #
-# Copyright (C) 2009 Michael Tremer & Christian Schmidt #
+# Copyright (C) 2007-2018 IPFire Team <info@ipfire.org> #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
include Config
-VER = 2.4.3
+SUMMARY = Network UPS Tools Core (Uninterruptible Power Supply Monitoring)
+
+VER = 2.7.4
THISAPP = nut-$(VER)
DL_FILE = $(THISAPP).tar.gz
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
PROG = nut
-PAK_VER = 2
+PAK_VER = 7
+
+DEPS =
+
+SERVICES = nut
-DEPS = ""
+CXXFLAGS += -std=c++11
###############################################################################
# Top-level Rules
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
-$(DL_FILE)_MD5 = 6f893b61b07915e7a139324fa3f79121
+$(DL_FILE)_BLAKE2 = 367c687efd739150898a14c700d5fddbe22bf926522923e1842011ec49b67d6638620500c4eda50291feb474cc6eef39fff63764cb3e0fad5898abee981f8308
install : $(TARGET)
download :$(patsubst %,$(DIR_DL)/%,$(objects))
-md5 : $(subst %,%_MD5,$(objects))
+b2 : $(subst %,%_BLAKE2,$(objects))
-dist:
+dist:
@$(PAK)
###############################################################################
-# Downloading, checking, md5sum
+# Downloading, checking, b2sum
###############################################################################
$(patsubst %,$(DIR_CHK)/%,$(objects)) :
$(patsubst %,$(DIR_DL)/%,$(objects)) :
@$(LOAD)
-$(subst %,%_MD5,$(objects)) :
- @$(MD5)
+$(subst %,%_BLAKE2,$(objects)) :
+ @$(B2SUM)
###############################################################################
# Installation Details
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
+ $(UPDATE_AUTOMAKE)
cd $(DIR_APP) && ./configure --prefix=/usr --sysconfdir=/etc/nut \
--with-usb --with-user=root --with-group=nut \
--with-wrap=no --with-udev-dir=/etc/udev
- cd $(DIR_APP) && make $(MAKETUNING)
+ cd $(DIR_APP) && make #$(MAKETUNING)
cd $(DIR_APP) && make install
# sed -i -e "s|ATTR{|SYSFS{|g" /etc/udev/rules.d/52-nut-usbups.rules
- -mkdir -p /var/state/ups
+ mkdir -p /var/state/ups
+
+ #install initscripts
+ $(call INSTALL_INITSCRIPTS,$(SERVICES))
+
install -v -m 644 $(DIR_SRC)/config/backup/includes/nut \
/var/ipfire/backup/addons/includes/nut
@rm -rf $(DIR_APP)