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.

131 lines
3.4 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. PKG_NAME:=smartmontools
  9. PKG_VERSION:=7.2
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=@SF/smartmontools
  13. PKG_HASH:=5cd98a27e6393168bc6aaea070d9e1cd551b0f898c52f66b2ff2e5d274118cd6
  14. PKG_MAINTAINER:=Maxim Storchak <m.storchak@gmail.com>
  15. PKG_LICENSE:=GPL-2.0-or-later
  16. PKG_LICENSE_FILES:=COPYING
  17. PKG_BUILD_PARALLEL:=1
  18. PKG_INSTALL:=1
  19. include $(INCLUDE_DIR)/package.mk
  20. define Package/smartmontools/Default
  21. SECTION:=utils
  22. CATEGORY:=Utilities
  23. TITLE:=S.M.A.R.T Monitoring
  24. URL:=https://www.smartmontools.org/
  25. endef
  26. define Package/smartmontools
  27. $(call Package/smartmontools/Default)
  28. DEPENDS:=+libstdcpp
  29. TITLE+= Tool
  30. endef
  31. define Package/smartmontools/description
  32. smartmontools contains utility programs (smartctl) to
  33. control/monitor storage systems using the Self-Monitoring, Analysis
  34. and Reporting Technology System (S.M.A.R.T.) built into most modern
  35. ATA and SCSI disks. It is derived from smartsuite.
  36. endef
  37. define Package/smartd
  38. $(call Package/smartmontools/Default)
  39. DEPENDS:=+libstdcpp
  40. TITLE+= Daemon
  41. endef
  42. define Package/smartd/description
  43. smartmontools contains utility programs (smartd) to
  44. control/monitor storage systems using the Self-Monitoring, Analysis
  45. and Reporting Technology System (S.M.A.R.T.) built into most modern
  46. ATA and SCSI disks. It is derived from smartsuite.
  47. endef
  48. define Package/smartmontools-drivedb
  49. $(call Package/smartmontools/Default)
  50. TITLE+= Drive database
  51. PKGARCH=all
  52. endef
  53. define Package/smartmontools-drivedb/description
  54. Database of known drives and USB bridges for smartctl and smartd.
  55. endef
  56. define Package/smartd-mail
  57. $(call Package/smartmontools/Default)
  58. TITLE+= Email notifications
  59. PKGARCH=all
  60. DEPENDS+= +smartd +nail +msmtp-mta
  61. endef
  62. define Package/smartd-mail/description
  63. A script for mailing about SMART issues
  64. endef
  65. TARGET_LDFLAGS += -flto
  66. TARGET_CXXFLAGS +=-fno-rtti -flto
  67. MAKE_FLAGS +=BUILD_INFO='"(localbuild)"'
  68. CONFIGURE_ARGS += \
  69. --disable-fast-lebe \
  70. --without-gnupg \
  71. --without-libcap-ng \
  72. --without-libsystemd
  73. #lower file size vs. CONFIGURE_ARGS
  74. CONFIGURE_VARS += \
  75. with_cxx11_regex=yes \
  76. with_smartdplugindir=no \
  77. with_systemdenvfile=no \
  78. with_systemdsystemunitdir=no \
  79. with_update_smart_drivedb=no
  80. define Package/smartmontools/install
  81. $(INSTALL_DIR) $(1)/usr/sbin
  82. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/smartctl $(1)/usr/sbin/
  83. endef
  84. define Package/smartd/install
  85. $(INSTALL_DIR) $(1)/usr/sbin
  86. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/smartd $(1)/usr/sbin/
  87. $(INSTALL_DIR) $(1)/etc
  88. $(INSTALL_DATA) ./files/smartd.conf $(1)/etc/
  89. $(INSTALL_DIR) $(1)/etc/init.d
  90. $(INSTALL_BIN) ./files/smartd.init $(1)/etc/init.d/smartd
  91. endef
  92. define Package/smartmontools-drivedb/install
  93. $(INSTALL_DIR) $(1)/usr/share/smartmontools/
  94. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/smartmontools/drivedb.h $(1)/usr/share/smartmontools/
  95. endef
  96. define Package/smartd-mail/install
  97. $(INSTALL_DIR) $(1)/etc
  98. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/etc/smartd_warning.sh $(1)/etc
  99. endef
  100. define Package/smartd/conffiles
  101. /etc/smartd.conf
  102. endef
  103. $(eval $(call BuildPackage,smartmontools))
  104. $(eval $(call BuildPackage,smartd))
  105. $(eval $(call BuildPackage,smartmontools-drivedb))
  106. $(eval $(call BuildPackage,smartd-mail))