2005-12-16 14:33:32 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# smartmontools
|
|
|
|
#
|
|
|
|
#############################################################
|
2007-07-11 16:06:06 +02:00
|
|
|
SMARTMONTOOLS_VERSION:=5.33
|
|
|
|
SMARTMONTOOLS_SOURCE:=smartmontools-$(SMARTMONTOOLS_VERSION).tar.gz
|
2005-12-16 14:33:32 +01:00
|
|
|
SMARTMONTOOLS_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/smartmontools
|
2007-07-11 16:06:06 +02:00
|
|
|
SMARTMONTOOLS_DIR:=$(BUILD_DIR)/smartmontools-$(SMARTMONTOOLS_VERSION)
|
2006-10-01 17:17:52 +02:00
|
|
|
SMARTMONTOOLS_CAT:=$(ZCAT)
|
2005-12-16 14:33:32 +01:00
|
|
|
SMARTMONTOOLS_BINARY:=smartctl
|
|
|
|
SMARTMONTOOLS_BINARY2:=smartd
|
|
|
|
SMARTMONTOOLS_TARGET_BINARY:=usr/sbin/smartctl
|
2005-12-16 14:59:17 +01:00
|
|
|
SMARTMONTOOLS_TARGET_BINARY2:=usr/sbin/smartd
|
2005-12-16 14:33:32 +01:00
|
|
|
|
|
|
|
$(DL_DIR)/$(SMARTMONTOOLS_SOURCE):
|
2009-01-16 12:42:52 +01:00
|
|
|
$(call DOWNLOAD,$(SMARTMONTOOLS_SITE),$(SMARTMONTOOLS_SOURCE))
|
2005-12-16 14:33:32 +01:00
|
|
|
|
|
|
|
smartmontools-source: $(DL_DIR)/$(SMARTMONTOOLS_SOURCE)
|
|
|
|
|
|
|
|
$(SMARTMONTOOLS_DIR)/.unpacked: $(DL_DIR)/$(SMARTMONTOOLS_SOURCE)
|
|
|
|
$(SMARTMONTOOLS_CAT) $(DL_DIR)/$(SMARTMONTOOLS_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
|
|
|
toolchain/patch-kernel.sh $(SMARTMONTOOLS_DIR) package/smartmontools/ \*.patch
|
|
|
|
touch $(SMARTMONTOOLS_DIR)/.unpacked
|
|
|
|
|
|
|
|
$(SMARTMONTOOLS_DIR)/.configured: $(SMARTMONTOOLS_DIR)/.unpacked
|
|
|
|
(cd $(SMARTMONTOOLS_DIR); rm -rf config.cache; \
|
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
2007-06-27 14:01:27 +02:00
|
|
|
$(TARGET_CONFIGURE_ARGS) \
|
2009-10-01 21:24:42 +02:00
|
|
|
./configure $(QUIET) \
|
2005-12-16 14:33:32 +01:00
|
|
|
--target=$(GNU_TARGET_NAME) \
|
|
|
|
--host=$(GNU_TARGET_NAME) \
|
|
|
|
--build=$(GNU_HOST_NAME) \
|
|
|
|
--prefix=/usr \
|
|
|
|
--exec-prefix=/usr \
|
|
|
|
--bindir=/usr/bin \
|
|
|
|
--sbindir=/usr/sbin \
|
2007-01-14 04:52:21 +01:00
|
|
|
--libdir=/lib \
|
2005-12-16 14:33:32 +01:00
|
|
|
--libexecdir=/usr/lib \
|
|
|
|
--sysconfdir=/etc \
|
|
|
|
--datadir=/usr/share \
|
|
|
|
--localstatedir=/var \
|
|
|
|
--mandir=/usr/man \
|
|
|
|
--infodir=/usr/info \
|
|
|
|
$(DISABLE_NLS) \
|
|
|
|
$(DISABLE_LARGEFILE) \
|
2007-08-21 21:20:18 +02:00
|
|
|
)
|
2005-12-16 14:33:32 +01:00
|
|
|
touch $(SMARTMONTOOLS_DIR)/.configured
|
|
|
|
|
|
|
|
$(SMARTMONTOOLS_DIR)/$(SMARTMONTOOLS_BINARY): $(SMARTMONTOOLS_DIR)/.configured
|
|
|
|
$(MAKE) -C $(SMARTMONTOOLS_DIR)
|
2007-10-01 18:15:31 +02:00
|
|
|
$(STRIPCMD) $(SMARTMONTOOLS_DIR)/$(SMARTMONTOOLS_BINARY)
|
|
|
|
$(STRIPCMD) $(SMARTMONTOOLS_DIR)/$(SMARTMONTOOLS_BINARY2)
|
2005-12-16 14:33:32 +01:00
|
|
|
touch -c $(SMARTMONTOOLS_DIR)/$(SMARTMONTOOLS_BINARY)
|
|
|
|
|
|
|
|
$(TARGET_DIR)/$(SMARTMONTOOLS_TARGET_BINARY): $(SMARTMONTOOLS_DIR)/$(SMARTMONTOOLS_BINARY)
|
|
|
|
cp $(SMARTMONTOOLS_DIR)/$(SMARTMONTOOLS_BINARY) $(TARGET_DIR)/usr/sbin/
|
|
|
|
|
|
|
|
$(TARGET_DIR)/$(SMARTMONTOOLS_TARGET_BINARY2): $(SMARTMONTOOLS_DIR)/$(SMARTMONTOOLS_BINARY)
|
|
|
|
cp $(SMARTMONTOOLS_DIR)/$(SMARTMONTOOLS_BINARY2) $(TARGET_DIR)/usr/sbin/
|
|
|
|
|
2009-09-02 17:02:02 +02:00
|
|
|
smartmontools: $(TARGET_DIR)/$(SMARTMONTOOLS_TARGET_BINARY)
|
2005-12-16 14:33:32 +01:00
|
|
|
|
|
|
|
smartmontools-clean:
|
|
|
|
$(MAKE) DESTDIR=$(TARGET_DIR) -C $(SMARTMONTOOLS_DIR) uninstall
|
|
|
|
-$(MAKE) -C $(SMARTMONTOOLS_DIR) clean
|
|
|
|
|
|
|
|
smartmontools-dirclean:
|
|
|
|
rm -rf $(SMARTMONTOOLS_DIR)
|
|
|
|
|
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
2008-12-08 09:15:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_SMARTMONTOOLS),y)
|
2005-12-16 14:33:32 +01:00
|
|
|
TARGETS+=smartmontools
|
|
|
|
endif
|