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.

95 lines
2.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:=6.5
  11. PKG_RELEASE:=1
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  13. PKG_SOURCE_URL:=@SF/smartmontools
  14. PKG_MD5SUM:=093aeec3f8f39fa9a37593c4012d3156
  15. PKG_MAINTAINER:=Maxim Storchak <m.storchak@gmail.com>
  16. PKG_LICENSE:=GPL-2.0+
  17. PKG_LICENSE_FILES:=COPYING
  18. PKG_FIXUP:=autoreconf
  19. include $(INCLUDE_DIR)/package.mk
  20. define Package/smartmontools/Default
  21. SECTION:=utils
  22. CATEGORY:=Utilities
  23. DEPENDS:=$(CXX_DEPENDS)
  24. TITLE:=S.M.A.R.T Monitoring
  25. URL:=http://smartmontools.sourceforge.net/
  26. endef
  27. define Package/smartmontools
  28. $(call Package/smartmontools/Default)
  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. TITLE+= Daemon
  40. endef
  41. define Package/smartd/description
  42. smartmontools contains utility programs (smartd) to
  43. control/monitor storage systems using the Self-Monitoring, Analysis
  44. and Reporting Technology System (S.M.A.R.T.) built into most modern
  45. ATA and SCSI disks. It is derived from smartsuite.
  46. endef
  47. ifeq ($(CONFIG_USE_UCLIBCXX),y)
  48. UCXXCFLAGS:=-fno-builtin -fno-rtti -nostdinc++
  49. UCXXCPPFLAGS:=-I$(STAGING_DIR)/usr/include/uClibc++
  50. UCXXLIBS:=-nodefaultlibs -lc -luClibc++
  51. endif
  52. CONFIGURE_VARS += \
  53. CXXFLAGS="$$$$CXXFLAGS $(UCXXCFLAGS)" \
  54. CPPFLAGS="$$$$CPPFLAGS $(UCXXCPPFLAGS) -I$(LINUX_DIR)/include" \
  55. LDFLAGS="$$$$LDFLAGS" \
  56. LIBS="$(UCXXLIBS) -lm $(LIBGCC_S) -lc" \
  57. define Build/Compile
  58. $(MAKE) -C $(PKG_BUILD_DIR) \
  59. BUILD_INFO='"(localbuild)"' \
  60. LD="$(TARGET_CXX)"
  61. endef
  62. define Package/smartmontools/install
  63. $(INSTALL_DIR) $(1)/usr/sbin
  64. $(INSTALL_BIN) $(PKG_BUILD_DIR)/smartctl $(1)/usr/sbin/
  65. endef
  66. define Package/smartd/install
  67. $(INSTALL_DIR) $(1)/usr/sbin
  68. $(INSTALL_BIN) $(PKG_BUILD_DIR)/smartd $(1)/usr/sbin/
  69. $(INSTALL_DIR) $(1)/etc
  70. $(INSTALL_DATA) ./files/smartd.conf $(1)/etc/
  71. $(INSTALL_DIR) $(1)/etc/init.d
  72. $(INSTALL_BIN) ./files/smartd.init $(1)/etc/init.d/smartd
  73. endef
  74. define Package/smartd/conffiles
  75. /etc/smartd.conf
  76. endef
  77. $(eval $(call BuildPackage,smartmontools))
  78. $(eval $(call BuildPackage,smartd))