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.

94 lines
2.5 KiB

  1. #
  2. # Copyright (C) 2006-2012 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.2
  11. PKG_RELEASE:=1
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  13. PKG_SOURCE_URL:=@SF/smartmontools
  14. PKG_MD5SUM:=d44f84081a12cef79cd17f78044351fc
  15. PKG_MAINTAINER:=Maxim Storchak <m.storchak@gmail.com>
  16. include $(INCLUDE_DIR)/package.mk
  17. define Package/smartmontools/Default
  18. SECTION:=utils
  19. CATEGORY:=Utilities
  20. DEPENDS:=$(CXX_DEPENDS)
  21. TITLE:=S.M.A.R.T Monitoring
  22. URL:=http://smartmontools.sourceforge.net/
  23. endef
  24. define Package/smartmontools
  25. $(call Package/smartmontools/Default)
  26. TITLE+= Tool
  27. endef
  28. define Package/smartmontools/description
  29. smartmontools contains utility programs (smartctl) to
  30. control/monitor storage systems using the Self-Monitoring, Analysis
  31. and Reporting Technology System (S.M.A.R.T.) built into most modern
  32. ATA and SCSI disks. It is derived from smartsuite.
  33. endef
  34. define Package/smartd
  35. $(call Package/smartmontools/Default)
  36. TITLE+= Daemon
  37. endef
  38. define Package/smartd/description
  39. smartmontools contains utility programs (smartd) to
  40. control/monitor storage systems using the Self-Monitoring, Analysis
  41. and Reporting Technology System (S.M.A.R.T.) built into most modern
  42. ATA and SCSI disks. It is derived from smartsuite.
  43. endef
  44. # uses GNU configure
  45. CONFIGURE_VARS += \
  46. CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++" \
  47. CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/uClibc++ -I$(LINUX_DIR)/include" \
  48. LDFLAGS="$$$$LDFLAGS" \
  49. LIBS="-nodefaultlibs -lc -luClibc++ -lm $(LIBGCC_S) -lc" \
  50. define Build/Configure
  51. (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
  52. ./autogen.sh \
  53. );
  54. $(call Build/Configure/Default)
  55. endef
  56. define Build/Compile
  57. $(MAKE) -C $(PKG_BUILD_DIR) \
  58. BUILD_INFO='"(localbuild)"' \
  59. LD="$(TARGET_CXX)"
  60. endef
  61. define Package/smartmontools/install
  62. $(INSTALL_DIR) $(1)/usr/sbin
  63. $(INSTALL_BIN) $(PKG_BUILD_DIR)/smartctl $(1)/usr/sbin/
  64. endef
  65. define Package/smartd/install
  66. $(INSTALL_DIR) $(1)/usr/sbin
  67. $(INSTALL_BIN) $(PKG_BUILD_DIR)/smartd $(1)/usr/sbin/
  68. $(INSTALL_DIR) $(1)/etc
  69. $(INSTALL_DATA) ./files/smartd.conf $(1)/etc/
  70. $(INSTALL_DIR) $(1)/etc/init.d
  71. $(INSTALL_BIN) ./files/smartd.init $(1)/etc/init.d/smartd
  72. endef
  73. define Package/smartd/conffiles
  74. /etc/smartd.conf
  75. endef
  76. $(eval $(call BuildPackage,smartmontools))
  77. $(eval $(call BuildPackage,smartd))