remove redundant prerequisite
[buildroot.git] / package / smartmontools / smartmontools.mk
blob1537b8ee1de4e47777f6e01e7f0ce8d1d7d0fe00
1 #############################################################
3 # smartmontools
5 #############################################################
6 SMARTMONTOOLS_VERSION:=5.33
7 SMARTMONTOOLS_SOURCE:=smartmontools-$(SMARTMONTOOLS_VERSION).tar.gz
8 SMARTMONTOOLS_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/smartmontools
9 SMARTMONTOOLS_DIR:=$(BUILD_DIR)/smartmontools-$(SMARTMONTOOLS_VERSION)
10 SMARTMONTOOLS_CAT:=$(ZCAT)
11 SMARTMONTOOLS_BINARY:=smartctl
12 SMARTMONTOOLS_BINARY2:=smartd
13 SMARTMONTOOLS_TARGET_BINARY:=usr/sbin/smartctl
14 SMARTMONTOOLS_TARGET_BINARY2:=usr/sbin/smartd
16 $(DL_DIR)/$(SMARTMONTOOLS_SOURCE):
17 $(WGET) -P $(DL_DIR) $(SMARTMONTOOLS_SITE)/$(SMARTMONTOOLS_SOURCE)
19 smartmontools-source: $(DL_DIR)/$(SMARTMONTOOLS_SOURCE)
21 $(SMARTMONTOOLS_DIR)/.unpacked: $(DL_DIR)/$(SMARTMONTOOLS_SOURCE)
22 $(SMARTMONTOOLS_CAT) $(DL_DIR)/$(SMARTMONTOOLS_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
23 toolchain/patch-kernel.sh $(SMARTMONTOOLS_DIR) package/smartmontools/ \*.patch
24 touch $(SMARTMONTOOLS_DIR)/.unpacked
26 $(SMARTMONTOOLS_DIR)/.configured: $(SMARTMONTOOLS_DIR)/.unpacked
27 (cd $(SMARTMONTOOLS_DIR); rm -rf config.cache; \
28 $(TARGET_CONFIGURE_OPTS) \
29 $(TARGET_CONFIGURE_ARGS) \
30 ./configure \
31 --target=$(GNU_TARGET_NAME) \
32 --host=$(GNU_TARGET_NAME) \
33 --build=$(GNU_HOST_NAME) \
34 --prefix=/usr \
35 --exec-prefix=/usr \
36 --bindir=/usr/bin \
37 --sbindir=/usr/sbin \
38 --libdir=/lib \
39 --libexecdir=/usr/lib \
40 --sysconfdir=/etc \
41 --datadir=/usr/share \
42 --localstatedir=/var \
43 --mandir=/usr/man \
44 --infodir=/usr/info \
45 $(DISABLE_NLS) \
46 $(DISABLE_LARGEFILE) \
48 touch $(SMARTMONTOOLS_DIR)/.configured
50 $(SMARTMONTOOLS_DIR)/$(SMARTMONTOOLS_BINARY): $(SMARTMONTOOLS_DIR)/.configured
51 $(MAKE) -C $(SMARTMONTOOLS_DIR)
52 $(STRIPCMD) $(SMARTMONTOOLS_DIR)/$(SMARTMONTOOLS_BINARY)
53 $(STRIPCMD) $(SMARTMONTOOLS_DIR)/$(SMARTMONTOOLS_BINARY2)
54 touch -c $(SMARTMONTOOLS_DIR)/$(SMARTMONTOOLS_BINARY)
56 $(TARGET_DIR)/$(SMARTMONTOOLS_TARGET_BINARY): $(SMARTMONTOOLS_DIR)/$(SMARTMONTOOLS_BINARY)
57 cp $(SMARTMONTOOLS_DIR)/$(SMARTMONTOOLS_BINARY) $(TARGET_DIR)/usr/sbin/
59 $(TARGET_DIR)/$(SMARTMONTOOLS_TARGET_BINARY2): $(SMARTMONTOOLS_DIR)/$(SMARTMONTOOLS_BINARY)
60 cp $(SMARTMONTOOLS_DIR)/$(SMARTMONTOOLS_BINARY2) $(TARGET_DIR)/usr/sbin/
62 smartmontools: $(TARGET_DIR)/$(SMARTMONTOOLS_TARGET_BINARY)
64 smartmontools-clean:
65 $(MAKE) DESTDIR=$(TARGET_DIR) -C $(SMARTMONTOOLS_DIR) uninstall
66 -$(MAKE) -C $(SMARTMONTOOLS_DIR) clean
68 smartmontools-dirclean:
69 rm -rf $(SMARTMONTOOLS_DIR)
71 #############################################################
73 # Toplevel Makefile options
75 #############################################################
76 ifeq ($(BR2_PACKAGE_SMARTMONTOOLS),y)
77 TARGETS+=smartmontools
78 endif