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.

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