X-Git-Url: http://git.archive.openwrt.org/?a=blobdiff_plain;f=utils%2Fsmartmontools%2FMakefile;h=674fbc3456bf3056fa5a1d2dd672d44dc903e076;hb=b5860d2e0c8d2ba8540562747f955cc1c9ff4a5b;hp=71fe9693cbd664a3088ed9dd0443f0d186acc100;hpb=fdf12b8e9c9813e23b77cb8164e7017c3809672e;p=packages.git diff --git a/utils/smartmontools/Makefile b/utils/smartmontools/Makefile index 71fe9693c..674fbc345 100644 --- a/utils/smartmontools/Makefile +++ b/utils/smartmontools/Makefile @@ -1,65 +1,94 @@ -# -# Copyright (C) 2006 OpenWrt.org +# +# Copyright (C) 2006-2012 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. # -# $Id$ include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/uclibc++.mk PKG_NAME:=smartmontools -PKG_VERSION:=5.37 -PKG_RELEASE:=2 +PKG_VERSION:=5.40 +PKG_RELEASE:=4 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SF/smartmontools -PKG_MD5SUM:=4ab3668b7d1362ce923f64a211e0e568 -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +PKG_MD5SUM:=0f0be0239914ad87830a4fff594bda5b include $(INCLUDE_DIR)/package.mk -define Package/smartmontools +define Package/smartmontools/Default SECTION:=utils CATEGORY:=Utilities - DEPENDS:=+libstdcpp - TITLE:=S.M.A.R.T Monitoring Tool - DESCRIPTION:=\ - smartmontools contains utility programs (smartctl, smartd) to \\\ - control/monitor storage systems using the Self-Monitoring, Analysis \\\ - and Reporting Technology System (S.M.A.R.T.) built into most modern \\\ - ATA and SCSI disks. It is derived from smartsuite. + DEPENDS:=$(CXX_DEPENDS) + TITLE:=S.M.A.R.T Monitoring URL:=http://smartmontools.sourceforge.net/ endef +define Package/smartmontools + $(call Package/smartmontools/Default) + TITLE+= Tool +endef + +define Package/smartmontools/description + smartmontools contains utility programs (smartctl) to + control/monitor storage systems using the Self-Monitoring, Analysis + and Reporting Technology System (S.M.A.R.T.) built into most modern + ATA and SCSI disks. It is derived from smartsuite. +endef + +define Package/smartd + $(call Package/smartmontools/Default) + DEPENDS+= +rsync + TITLE+= Daemon +endef + +define Package/smartd/description + smartmontools contains utility programs (smartd) to + control/monitor storage systems using the Self-Monitoring, Analysis + and Reporting Technology System (S.M.A.R.T.) built into most modern + ATA and SCSI disks. It is derived from smartsuite. +endef + # uses GNU configure -define Build/Configure - (cd $(PKG_BUILD_DIR); ./autogen.sh ); - $(call Build/Configure/Default,, \ - ac_libc_have_working_snprintf=yes \ - ) +CONFIGURE_VARS += \ + CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++" \ + CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/uClibc++ -I$(LINUX_DIR)/include" \ + LDFLAGS="$$$$LDFLAGS" \ + LIBS="-nodefaultlibs -lc -luClibc++ -lm $(LIBGCC_S) -lc" \ + +define Build/Configure + (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ + ./autogen.sh \ + ); + $(call Build/Configure/Default) endef define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) \ - CC="$(TARGET_CC)" + BUILD_INFO='"(localbuild)"' \ + LD="$(TARGET_CXX)" endef define Package/smartmontools/install $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_BUILD_DIR)/smartctl $(1)/usr/sbin/ +endef + +define Package/smartd/install + $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_BUILD_DIR)/smartd $(1)/usr/sbin/ $(INSTALL_DIR) $(1)/etc - $(INSTALL_DATA) ./files/smartd.conf $(1)/etc + $(INSTALL_DATA) ./files/smartd.conf $(1)/etc/ $(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_BIN) ./files/smartd.init $(1)/etc/init.d/smartd endef -$(eval $(call BuildPackage,smartmontools)) +define Package/smartd/conffiles +/etc/smartd.conf +endef -$(eval $(call RequireCommand,automake-1.9, \ - $(PKG_NAME) requires automake 1.9 or compatible. \ -)) +$(eval $(call BuildPackage,smartmontools)) +$(eval $(call BuildPackage,smartd))