smartmontools: Update to 7.0
authorRosen Penev <rosenp@gmail.com>
Sat, 12 Jan 2019 20:06:45 +0000 (12:06 -0800)
committerRosen Penev <rosenp@gmail.com>
Tue, 15 Jan 2019 19:00:48 +0000 (11:00 -0800)
Removed weird uclibc++ compatibility stuff as it seems to not be needed
anymore.

Switched to standard variables.

Added PKG_BUILD_PARALLEL for faster compilation.

Removed PKG_FIXUP as it seems the package has been fixed already.

A few changes to the CFLAGS and linker options resulted in ipk size going
from 244694 to 244283, possibly due to previous overlinking.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
utils/smartmontools/Makefile
utils/smartmontools/patches/001-musl-compat-realpath.patch [deleted file]

index fc0c1008c1061b8cbd31fbe8cc336f261f679160..dab12099a6e6d2c3db94920dd48f1080d5e9195f 100644 (file)
@@ -9,17 +9,19 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/uclibc++.mk
 
 PKG_NAME:=smartmontools
-PKG_VERSION:=6.6
+PKG_VERSION:=7.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/smartmontools
-PKG_HASH:=51f43d0fb064fccaf823bbe68cf0d317d0895ff895aa353b3339a3b316a53054
+PKG_HASH:=e5e1ac2786bc87fdbd6f92d0ee751b799fbb3e1a09c0a6a379f9eb64b3e8f61c
+
 PKG_MAINTAINER:=Maxim Storchak <m.storchak@gmail.com>
 PKG_LICENSE:=GPL-2.0+
 PKG_LICENSE_FILES:=COPYING
 
-PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -56,31 +58,38 @@ define Package/smartd/description
 endef
 
 ifeq ($(CONFIG_USE_UCLIBCXX),y)
-  UCXXCFLAGS:=-fno-builtin -fno-rtti -nostdinc++
-  UCXXCPPFLAGS:=-I$(STAGING_DIR)/usr/include/uClibc++
-  UCXXLIBS:=-nodefaultlibs -lc -luClibc++
+TARGET_LDFLAGS +=-nodefaultlibs
+else
+CONFIGURE_VARS += with_cxx11_regex=yes
 endif
+TARGET_LDFLAGS += -flto
+
+TARGET_CXXFLAGS +=-fno-rtti -flto
+MAKE_FLAGS +=BUILD_INFO='"(localbuild)"'
 
+CONFIGURE_ARGS += \
+       --disable-fast-lebe \
+       --without-gnupg \
+       --without-libcap-ng \
+       --without-libsystemd
+
+#lower file size vs. CONFIGURE_ARGS
 CONFIGURE_VARS += \
-       CXXFLAGS="$$$$CXXFLAGS $(UCXXCFLAGS)" \
-       CPPFLAGS="$$$$CPPFLAGS $(UCXXCPPFLAGS) -I$(LINUX_DIR)/include" \
-       LDFLAGS="$$$$LDFLAGS" \
-       LIBS="$(UCXXLIBS) -lm $(LIBGCC_S) -lc" \
-
-define Build/Compile
-       $(MAKE) -C $(PKG_BUILD_DIR) \
-               BUILD_INFO='"(localbuild)"' \
-               LD="$(TARGET_CXX)"
-endef
+       with_smartdplugindir=no \
+       with_systemdenvfile=no \
+       with_systemdsystemunitdir=no \
+       with_update_smart_drivedb=no
 
 define Package/smartmontools/install
        $(INSTALL_DIR) $(1)/usr/sbin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/smartctl $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/smartctl $(1)/usr/sbin/
+       $(INSTALL_DIR) $(1)/usr/share
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/smartmontools/drivedb.h $(1)/usr/share/smartmontools
 endef
 
 define Package/smartd/install
        $(INSTALL_DIR) $(1)/usr/sbin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/smartd $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/smartd $(1)/usr/sbin/
        $(INSTALL_DIR) $(1)/etc
        $(INSTALL_DATA) ./files/smartd.conf $(1)/etc/
        $(INSTALL_DIR) $(1)/etc/init.d
diff --git a/utils/smartmontools/patches/001-musl-compat-realpath.patch b/utils/smartmontools/patches/001-musl-compat-realpath.patch
deleted file mode 100644 (file)
index cc11023..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-commit 2473c5e01ea14fae96c157d8bce3a3ec1da124f3
-Author: Maxim Storchak <m.storchak@gmail.com>
-Date:   Sat Dec 9 15:21:51 2017 +0200
-
-    Replace canonicalize_file_name with realpath equivalent
-
-diff --git a/os_linux.cpp b/os_linux.cpp
-index 134d5bc..0575a13 100644
---- a/os_linux.cpp
-+++ b/os_linux.cpp
-@@ -3176,7 +3176,7 @@ static bool is_hpsa(const char * name)
- {
-   char path[128];
-   snprintf(path, sizeof(path), "/sys/block/%s/device", name);
--  char * syshostpath = canonicalize_file_name(path);
-+  char * syshostpath = realpath(path, NULL);
-   if (!syshostpath)
-     return false;