source: packages/utils/smartmontools/Makefile @ 23584

Last change on this file since 23584 was 23584, checked in by acoul, 6 years ago

utils/smartmontools: fix a cross compile issue (thank you mbm)

  • Property copyright set to Copyright (C) 2006 OpenWrt.org
  • Property svn:eol-style set to native
File size: 1.7 KB
Line 
1#
2# Copyright (C) 2006-2010 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=smartmontools
11PKG_VERSION:=5.40
12PKG_RELEASE:=1
13
14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15PKG_SOURCE_URL:=@SF/smartmontools
16PKG_MD5SUM:=0f0be0239914ad87830a4fff594bda5b
17
18include $(INCLUDE_DIR)/package.mk
19
20define Package/smartmontools
21  SECTION:=utils
22  CATEGORY:=Utilities
23  DEPENDS:=+uclibcxx
24  TITLE:=S.M.A.R.T Monitoring Tool
25  URL:=http://smartmontools.sourceforge.net/
26endef
27
28define Package/smartmontools/description
29        smartmontools contains utility programs (smartctl, smartd) to
30        control/monitor storage systems using the Self-Monitoring, Analysis
31        and Reporting Technology System (S.M.A.R.T.) built into most modern
32        ATA and SCSI disks. It is derived from smartsuite.
33endef
34
35# uses GNU configure
36
37CONFIGURE_VARS += \
38        CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++" \
39        CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/uClibc++ -I$(LINUX_DIR)/include" \
40        LDFLAGS="$$$$LDFLAGS" \
41        LIBS="-nodefaultlibs -luClibc++ -lm $(LIBGCC_S) -lc" \
42
43define Build/Configure
44        (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
45                ./autogen.sh \
46        );
47        $(call Build/Configure/Default)
48endef
49
50define Build/Compile
51        $(MAKE) -C $(PKG_BUILD_DIR) \
52                LD="$(TARGET_CXX)" 
53endef
54
55define Package/smartmontools/install
56        $(INSTALL_DIR) $(1)/usr/sbin
57        $(INSTALL_BIN) $(PKG_BUILD_DIR)/smartctl $(1)/usr/sbin/
58        $(INSTALL_BIN) $(PKG_BUILD_DIR)/smartd $(1)/usr/sbin/
59        $(INSTALL_DIR) $(1)/etc
60        $(INSTALL_DATA) ./files/smartd.conf $(1)/etc
61        $(INSTALL_DIR) $(1)/etc/init.d
62        $(INSTALL_BIN) ./files/smartd.init $(1)/etc/init.d/smartd
63endef
64
65$(eval $(call BuildPackage,smartmontools))
Note: See TracBrowser for help on using the repository browser.