7ddab45af3dd88e9e9ef16130279abf41cb53fd9
[openwrt/svn-archive/archive.git] / utils / smartmontools / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=smartmontools
12 PKG_VERSION:=5.37
13 PKG_RELEASE:=2
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@SF/smartmontools
17 PKG_MD5SUM:=4ab3668b7d1362ce923f64a211e0e568
18 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/smartmontools
25 SECTION:=utils
26 CATEGORY:=Utilities
27 DEPENDS:=+libstdcpp
28 TITLE:=S.M.A.R.T Monitoring Tool
29 URL:=http://smartmontools.sourceforge.net/
30 endef
31
32 define Package/smartmontools/description
33 smartmontools contains utility programs (smartctl, smartd) to
34 control/monitor storage systems using the Self-Monitoring, Analysis
35 and Reporting Technology System (S.M.A.R.T.) built into most modern
36 ATA and SCSI disks. It is derived from smartsuite.
37 endef
38
39 # uses GNU configure
40
41 define Build/Configure
42 (cd $(PKG_BUILD_DIR); ./autogen.sh );
43 $(call Build/Configure/Default,, \
44 ac_libc_have_working_snprintf=yes \
45 )
46 endef
47
48 define Build/Compile
49 $(MAKE) -C $(PKG_BUILD_DIR) \
50 CC="$(TARGET_CC)"
51 endef
52
53 define Package/smartmontools/install
54 $(INSTALL_DIR) $(1)/usr/sbin
55 $(INSTALL_BIN) $(PKG_BUILD_DIR)/smartctl $(1)/usr/sbin/
56 $(INSTALL_BIN) $(PKG_BUILD_DIR)/smartd $(1)/usr/sbin/
57 $(INSTALL_DIR) $(1)/etc
58 $(INSTALL_DATA) ./files/smartd.conf $(1)/etc
59 $(INSTALL_DIR) $(1)/etc/init.d
60 $(INSTALL_BIN) ./files/smartd.init $(1)/etc/init.d/smartd
61 endef
62
63 $(eval $(call BuildPackage,smartmontools))
64
65 $(eval $(call RequireCommand,automake-1.9, \
66 $(PKG_NAME) requires automake 1.9 or compatible. \
67 ))