Smartmontools compiles with ulibcxx, so use it instead of libstdcpp
[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.38
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@SF/smartmontools
17 PKG_MD5SUM:=a282846532ecbd6b4a28072373b3a70b
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/smartmontools
22 SECTION:=utils
23 CATEGORY:=Utilities
24 DEPENDS:=+uclibcxx
25 TITLE:=S.M.A.R.T Monitoring Tool
26 URL:=http://smartmontools.sourceforge.net/
27 endef
28
29 define Package/smartmontools/description
30 smartmontools contains utility programs (smartctl, smartd) to
31 control/monitor storage systems using the Self-Monitoring, Analysis
32 and Reporting Technology System (S.M.A.R.T.) built into most modern
33 ATA and SCSI disks. It is derived from smartsuite.
34 endef
35
36 # uses GNU configure
37
38 define Build/Configure
39 (cd $(PKG_BUILD_DIR); ./autogen.sh );
40 $(call Build/Configure/Default,, \
41 ac_libc_have_working_snprintf=yes \
42 CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++" \
43 CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/uClibc++ -I$(LINUX_DIR)/include" \
44 LDFLAGS="$$$$LDFLAGS" \
45 LIBS="-nodefaultlibs -luClibc++ -lm -lgcc" \
46 )
47 endef
48
49 define Build/Compile
50 $(MAKE) -C $(PKG_BUILD_DIR) \
51 CC="$(TARGET_CC)"
52 endef
53
54 define Package/smartmontools/install
55 $(INSTALL_DIR) $(1)/usr/sbin
56 $(INSTALL_BIN) $(PKG_BUILD_DIR)/smartctl $(1)/usr/sbin/
57 $(INSTALL_BIN) $(PKG_BUILD_DIR)/smartd $(1)/usr/sbin/
58 $(INSTALL_DIR) $(1)/etc
59 $(INSTALL_DATA) ./files/smartd.conf $(1)/etc
60 $(INSTALL_DIR) $(1)/etc/init.d
61 $(INSTALL_BIN) ./files/smartd.init $(1)/etc/init.d/smartd
62 endef
63
64 $(eval $(call BuildPackage,smartmontools))