08eaf829dd
git-svn-id: svn://svn.openwrt.org/openwrt/packages@23582 3c298f89-4303-0410-b956-a3cf2f4a3e73
72 lines
1.9 KiB
Makefile
72 lines
1.9 KiB
Makefile
#
|
|
# Copyright (C) 2006-2010 OpenWrt.org
|
|
#
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
# See /LICENSE for more information.
|
|
#
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
PKG_NAME:=smartmontools
|
|
PKG_VERSION:=5.40
|
|
PKG_RELEASE:=1
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|
PKG_SOURCE_URL:=@SF/smartmontools
|
|
PKG_MD5SUM:=0f0be0239914ad87830a4fff594bda5b
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
define Package/smartmontools
|
|
SECTION:=utils
|
|
CATEGORY:=Utilities
|
|
DEPENDS:=+uclibcxx
|
|
TITLE:=S.M.A.R.T Monitoring Tool
|
|
URL:=http://smartmontools.sourceforge.net/
|
|
endef
|
|
|
|
define Package/smartmontools/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.
|
|
endef
|
|
|
|
# uses GNU configure
|
|
|
|
define Build/Configure
|
|
(cd $(PKG_BUILD_DIR); \
|
|
./autogen.sh \
|
|
./configure \
|
|
CC="$(TARGET_CC)" \
|
|
CXX="$(TARGET_CXX)" \
|
|
CPP="$(TARGET_CPP)" \
|
|
CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++" \
|
|
CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/uClibc++ -I$(LINUX_DIR)/include" \
|
|
LDFLAGS="$$$$LDFLAGS" \
|
|
LIBS="-nodefaultlibs -luClibc++ -lm $(LIBGCC_S) -lc" \
|
|
--prefix=/usr \
|
|
--build=$(GNU_BUILD_NAME) \
|
|
--host=$(GNU_HOST_NAME) \
|
|
--target=$(GNU_TARGET_NAME) \
|
|
);
|
|
$(call Build/Configure/Default,, \
|
|
)
|
|
endef
|
|
|
|
define Build/Compile
|
|
$(MAKE) -C $(PKG_BUILD_DIR)
|
|
endef
|
|
|
|
define Package/smartmontools/install
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/smartctl $(1)/usr/sbin/
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/smartd $(1)/usr/sbin/
|
|
$(INSTALL_DIR) $(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))
|