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.

91 lines
2.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. 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. # uses GNU configure
  48. CONFIGURE_VARS += \
  49. CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++" \
  50. CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/uClibc++ -I$(LINUX_DIR)/include" \
  51. LDFLAGS="$$$$LDFLAGS" \
  52. LIBS="-nodefaultlibs -lc -luClibc++ -lm $(LIBGCC_S) -lc" \
  53. define Build/Compile
  54. $(MAKE) -C $(PKG_BUILD_DIR) \
  55. BUILD_INFO='"(localbuild)"' \
  56. LD="$(TARGET_CXX)"
  57. endef
  58. define Package/smartmontools/install
  59. $(INSTALL_DIR) $(1)/usr/sbin
  60. $(INSTALL_BIN) $(PKG_BUILD_DIR)/smartctl $(1)/usr/sbin/
  61. endef
  62. define Package/smartd/install
  63. $(INSTALL_DIR) $(1)/usr/sbin
  64. $(INSTALL_BIN) $(PKG_BUILD_DIR)/smartd $(1)/usr/sbin/
  65. $(INSTALL_DIR) $(1)/etc
  66. $(INSTALL_DATA) ./files/smartd.conf $(1)/etc/
  67. $(INSTALL_DIR) $(1)/etc/init.d
  68. $(INSTALL_BIN) ./files/smartd.init $(1)/etc/init.d/smartd
  69. endef
  70. define Package/smartd/conffiles
  71. /etc/smartd.conf
  72. endef
  73. $(eval $(call BuildPackage,smartmontools))
  74. $(eval $(call BuildPackage,smartd))