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.

136 lines
3.5 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.1
  11. PKG_RELEASE:=3
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  13. PKG_SOURCE_URL:=@SF/smartmontools
  14. PKG_HASH:=3f734d2c99deb1e4af62b25d944c6252de70ca64d766c4c7294545a2e659b846
  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. define Package/smartd-mail
  58. $(call Package/smartmontools/Default)
  59. TITLE+= Email notifications
  60. PKGARCH=all
  61. DEPENDS+= +smartd +nail +msmtp-mta
  62. endef
  63. define Package/smartd-mail/description
  64. A script for mailing about SMART issues
  65. endef
  66. ifeq ($(CONFIG_USE_UCLIBCXX),y)
  67. TARGET_LDFLAGS +=-nodefaultlibs
  68. else
  69. CONFIGURE_VARS += with_cxx11_regex=yes
  70. endif
  71. TARGET_LDFLAGS += -flto
  72. TARGET_CXXFLAGS +=-fno-rtti -flto
  73. MAKE_FLAGS +=BUILD_INFO='"(localbuild)"'
  74. CONFIGURE_ARGS += \
  75. --disable-fast-lebe \
  76. --without-gnupg \
  77. --without-libcap-ng \
  78. --without-libsystemd
  79. #lower file size vs. CONFIGURE_ARGS
  80. CONFIGURE_VARS += \
  81. with_smartdplugindir=no \
  82. with_systemdenvfile=no \
  83. with_systemdsystemunitdir=no \
  84. with_update_smart_drivedb=no
  85. define Package/smartmontools/install
  86. $(INSTALL_DIR) $(1)/usr/sbin
  87. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/smartctl $(1)/usr/sbin/
  88. endef
  89. define Package/smartd/install
  90. $(INSTALL_DIR) $(1)/usr/sbin
  91. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/smartd $(1)/usr/sbin/
  92. $(INSTALL_DIR) $(1)/etc
  93. $(INSTALL_DATA) ./files/smartd.conf $(1)/etc/
  94. $(INSTALL_DIR) $(1)/etc/init.d
  95. $(INSTALL_BIN) ./files/smartd.init $(1)/etc/init.d/smartd
  96. endef
  97. define Package/smartmontools-drivedb/install
  98. $(INSTALL_DIR) $(1)/usr/share/smartmontools/
  99. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/smartmontools/drivedb.h $(1)/usr/share/smartmontools/
  100. endef
  101. define Package/smartd-mail/install
  102. $(INSTALL_DIR) $(1)/etc
  103. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/etc/smartd_warning.sh $(1)/etc
  104. endef
  105. define Package/smartd/conffiles
  106. /etc/smartd.conf
  107. endef
  108. $(eval $(call BuildPackage,smartmontools))
  109. $(eval $(call BuildPackage,smartd))
  110. $(eval $(call BuildPackage,smartmontools-drivedb))
  111. $(eval $(call BuildPackage,smartd-mail))