You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

119 lines
3.1 KiB

  1. #
  2. # Copyright (C) 2006-2016 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. include $(INCLUDE_DIR)/uclibc++.mk
  9. PKG_NAME:=smartmontools
  10. PKG_VERSION:=7.0
  11. PKG_RELEASE:=3
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  13. PKG_SOURCE_URL:=@SF/smartmontools
  14. PKG_HASH:=e5e1ac2786bc87fdbd6f92d0ee751b799fbb3e1a09c0a6a379f9eb64b3e8f61c
  15. PKG_MAINTAINER:=Maxim Storchak <m.storchak@gmail.com>
  16. PKG_LICENSE:=GPL-2.0-or-later
  17. PKG_LICENSE_FILES:=COPYING
  18. PKG_BUILD_PARALLEL:=1
  19. PKG_INSTALL:=1
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/smartmontools/Default
  22. SECTION:=utils
  23. CATEGORY:=Utilities
  24. TITLE:=S.M.A.R.T Monitoring
  25. URL:=https://www.smartmontools.org/
  26. endef
  27. define Package/smartmontools
  28. $(call Package/smartmontools/Default)
  29. DEPENDS:=$(CXX_DEPENDS)
  30. TITLE+= Tool
  31. endef
  32. define Package/smartmontools/description
  33. smartmontools contains utility programs (smartctl) to
  34. control/monitor storage systems using the Self-Monitoring, Analysis
  35. and Reporting Technology System (S.M.A.R.T.) built into most modern
  36. ATA and SCSI disks. It is derived from smartsuite.
  37. endef
  38. define Package/smartd
  39. $(call Package/smartmontools/Default)
  40. DEPENDS:=$(CXX_DEPENDS)
  41. TITLE+= Daemon
  42. endef
  43. define Package/smartd/description
  44. smartmontools contains utility programs (smartd) to
  45. control/monitor storage systems using the Self-Monitoring, Analysis
  46. and Reporting Technology System (S.M.A.R.T.) built into most modern
  47. ATA and SCSI disks. It is derived from smartsuite.
  48. endef
  49. define Package/smartmontools-drivedb
  50. $(call Package/smartmontools/Default)
  51. TITLE+= Drive database
  52. PKGARCH=all
  53. endef
  54. define Package/smartmontools-drivedb/description
  55. Database of known drives and USB bridges for smartctl and smartd.
  56. endef
  57. ifeq ($(CONFIG_USE_UCLIBCXX),y)
  58. TARGET_LDFLAGS +=-nodefaultlibs
  59. else
  60. CONFIGURE_VARS += with_cxx11_regex=yes
  61. endif
  62. TARGET_LDFLAGS += -flto
  63. TARGET_CXXFLAGS +=-fno-rtti -flto
  64. MAKE_FLAGS +=BUILD_INFO='"(localbuild)"'
  65. CONFIGURE_ARGS += \
  66. --disable-fast-lebe \
  67. --without-gnupg \
  68. --without-libcap-ng \
  69. --without-libsystemd
  70. #lower file size vs. CONFIGURE_ARGS
  71. CONFIGURE_VARS += \
  72. with_smartdplugindir=no \
  73. with_systemdenvfile=no \
  74. with_systemdsystemunitdir=no \
  75. with_update_smart_drivedb=no
  76. define Package/smartmontools/install
  77. $(INSTALL_DIR) $(1)/usr/sbin
  78. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/smartctl $(1)/usr/sbin/
  79. endef
  80. define Package/smartd/install
  81. $(INSTALL_DIR) $(1)/usr/sbin
  82. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/smartd $(1)/usr/sbin/
  83. $(INSTALL_DIR) $(1)/etc
  84. $(INSTALL_DATA) ./files/smartd.conf $(1)/etc/
  85. $(INSTALL_DIR) $(1)/etc/init.d
  86. $(INSTALL_BIN) ./files/smartd.init $(1)/etc/init.d/smartd
  87. endef
  88. define Package/smartmontools-drivedb/install
  89. $(INSTALL_DIR) $(1)/usr/share/smartmontools/
  90. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/smartmontools/drivedb.h $(1)/usr/share/smartmontools/
  91. endef
  92. define Package/smartd/conffiles
  93. /etc/smartd.conf
  94. endef
  95. $(eval $(call BuildPackage,smartmontools))
  96. $(eval $(call BuildPackage,smartd))
  97. $(eval $(call BuildPackage,smartmontools-drivedb))