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-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. DEPENDS+= +rsync
  37. TITLE+= Daemon
  38. endef
  39. define Package/smartd/description
  40. smartmontools contains utility programs (smartd) to
  41. control/monitor storage systems using the Self-Monitoring, Analysis
  42. and Reporting Technology System (S.M.A.R.T.) built into most modern
  43. ATA and SCSI disks. It is derived from smartsuite.
  44. endef
  45. # uses GNU configure
  46. CONFIGURE_VARS += \
  47. CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++" \
  48. CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/uClibc++ -I$(LINUX_DIR)/include" \
  49. LDFLAGS="$$$$LDFLAGS" \
  50. LIBS="-nodefaultlibs -lc -luClibc++ -lm $(LIBGCC_S) -lc" \
  51. define Build/Configure
  52. (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
  53. ./autogen.sh \
  54. );
  55. $(call Build/Configure/Default)
  56. endef
  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))