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.3
  11. PKG_RELEASE:=1
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  13. PKG_SOURCE_URL:=@SF/smartmontools
  14. PKG_MD5SUM:=2ea0c62206e110192a97b59291b17f54
  15. PKG_MAINTAINER:=Maxim Storchak <m.storchak@gmail.com>
  16. PKG_LICENSE:=GPL-2.0+
  17. include $(INCLUDE_DIR)/package.mk
  18. define Package/smartmontools/Default
  19. SECTION:=utils
  20. CATEGORY:=Utilities
  21. DEPENDS:=$(CXX_DEPENDS)
  22. TITLE:=S.M.A.R.T Monitoring
  23. URL:=http://smartmontools.sourceforge.net/
  24. endef
  25. define Package/smartmontools
  26. $(call Package/smartmontools/Default)
  27. TITLE+= Tool
  28. endef
  29. define Package/smartmontools/description
  30. smartmontools contains utility programs (smartctl) to
  31. control/monitor storage systems using the Self-Monitoring, Analysis
  32. and Reporting Technology System (S.M.A.R.T.) built into most modern
  33. ATA and SCSI disks. It is derived from smartsuite.
  34. endef
  35. define Package/smartd
  36. $(call Package/smartmontools/Default)
  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))