Makefile (2451B)
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 8 include $(TOPDIR)/rules.mk 9 include $(INCLUDE_DIR)/uclibc++.mk 10 11 PKG_NAME:=smartmontools 12 PKG_VERSION:=6.5 13 PKG_RELEASE:=1 14 15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 16 PKG_SOURCE_URL:=@SF/smartmontools 17 PKG_MD5SUM:=093aeec3f8f39fa9a37593c4012d3156 18 PKG_MAINTAINER:=Maxim Storchak <m.storchak@gmail.com> 19 PKG_LICENSE:=GPL-2.0+ 20 PKG_LICENSE_FILES:=COPYING 21 22 PKG_FIXUP:=autoreconf 23 24 include $(INCLUDE_DIR)/package.mk 25 26 define Package/smartmontools/Default 27 SECTION:=utils 28 CATEGORY:=Utilities 29 DEPENDS:=$(CXX_DEPENDS) 30 TITLE:=S.M.A.R.T Monitoring 31 URL:=http://smartmontools.sourceforge.net/ 32 endef 33 34 define Package/smartmontools 35 $(call Package/smartmontools/Default) 36 TITLE+= Tool 37 endef 38 39 define Package/smartmontools/description 40 smartmontools contains utility programs (smartctl) 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 46 define Package/smartd 47 $(call Package/smartmontools/Default) 48 TITLE+= Daemon 49 endef 50 51 define Package/smartd/description 52 smartmontools contains utility programs (smartd) to 53 control/monitor storage systems using the Self-Monitoring, Analysis 54 and Reporting Technology System (S.M.A.R.T.) built into most modern 55 ATA and SCSI disks. It is derived from smartsuite. 56 endef 57 58 # uses GNU configure 59 60 CONFIGURE_VARS += \ 61 CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++" \ 62 CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/uClibc++ -I$(LINUX_DIR)/include" \ 63 LDFLAGS="$$$$LDFLAGS" \ 64 LIBS="-nodefaultlibs -lc -luClibc++ -lm $(LIBGCC_S) -lc" \ 65 66 define Build/Compile 67 $(MAKE) -C $(PKG_BUILD_DIR) \ 68 BUILD_INFO='"(localbuild)"' \ 69 LD="$(TARGET_CXX)" 70 endef 71 72 define Package/smartmontools/install 73 $(INSTALL_DIR) $(1)/usr/sbin 74 $(INSTALL_BIN) $(PKG_BUILD_DIR)/smartctl $(1)/usr/sbin/ 75 endef 76 77 define Package/smartd/install 78 $(INSTALL_DIR) $(1)/usr/sbin 79 $(INSTALL_BIN) $(PKG_BUILD_DIR)/smartd $(1)/usr/sbin/ 80 $(INSTALL_DIR) $(1)/etc 81 $(INSTALL_DATA) ./files/smartd.conf $(1)/etc/ 82 $(INSTALL_DIR) $(1)/etc/init.d 83 $(INSTALL_BIN) ./files/smartd.init $(1)/etc/init.d/smartd 84 endef 85 86 define Package/smartd/conffiles 87 /etc/smartd.conf 88 endef 89 90 $(eval $(call BuildPackage,smartmontools)) 91 $(eval $(call BuildPackage,smartd))