[packages] freecwmp: upgrade to latest git version
[openwrt/svn-archive/archive.git] / utils / smartmontools / Makefile
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
8 include $(TOPDIR)/rules.mk
9 include $(INCLUDE_DIR)/uclibc++.mk
10
11 PKG_NAME:=smartmontools
12 PKG_VERSION:=5.40
13 PKG_RELEASE:=4
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@SF/smartmontools
17 PKG_MD5SUM:=0f0be0239914ad87830a4fff594bda5b
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/smartmontools/Default
22 SECTION:=utils
23 CATEGORY:=Utilities
24 DEPENDS:=$(CXX_DEPENDS)
25 TITLE:=S.M.A.R.T Monitoring
26 URL:=http://smartmontools.sourceforge.net/
27 endef
28
29 define Package/smartmontools
30 $(call Package/smartmontools/Default)
31 TITLE+= Tool
32 endef
33
34 define Package/smartmontools/description
35 smartmontools contains utility programs (smartctl) to
36 control/monitor storage systems using the Self-Monitoring, Analysis
37 and Reporting Technology System (S.M.A.R.T.) built into most modern
38 ATA and SCSI disks. It is derived from smartsuite.
39 endef
40
41 define Package/smartd
42 $(call Package/smartmontools/Default)
43 DEPENDS+= +rsync
44 TITLE+= Daemon
45 endef
46
47 define Package/smartd/description
48 smartmontools contains utility programs (smartd) to
49 control/monitor storage systems using the Self-Monitoring, Analysis
50 and Reporting Technology System (S.M.A.R.T.) built into most modern
51 ATA and SCSI disks. It is derived from smartsuite.
52 endef
53
54 # uses GNU configure
55
56 CONFIGURE_VARS += \
57 CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++" \
58 CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/uClibc++ -I$(LINUX_DIR)/include" \
59 LDFLAGS="$$$$LDFLAGS" \
60 LIBS="-nodefaultlibs -lc -luClibc++ -lm $(LIBGCC_S) -lc" \
61
62 define Build/Configure
63 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
64 ./autogen.sh \
65 );
66 $(call Build/Configure/Default)
67 endef
68
69 define Build/Compile
70 $(MAKE) -C $(PKG_BUILD_DIR) \
71 BUILD_INFO='"(localbuild)"' \
72 LD="$(TARGET_CXX)"
73 endef
74
75 define Package/smartmontools/install
76 $(INSTALL_DIR) $(1)/usr/sbin
77 $(INSTALL_BIN) $(PKG_BUILD_DIR)/smartctl $(1)/usr/sbin/
78 endef
79
80 define Package/smartd/install
81 $(INSTALL_DIR) $(1)/usr/sbin
82 $(INSTALL_BIN) $(PKG_BUILD_DIR)/smartd $(1)/usr/sbin/
83 $(INSTALL_DIR) $(1)/etc
84 $(INSTALL_DATA) ./files/smartd.conf $(1)/etc/
85 $(INSTALL_DIR) $(1)/etc/init.d
86 $(INSTALL_BIN) ./files/smartd.init $(1)/etc/init.d/smartd
87 endef
88
89 define Package/smartd/conffiles
90 /etc/smartd.conf
91 endef
92
93 $(eval $(call BuildPackage,smartmontools))
94 $(eval $(call BuildPackage,smartd))