1 #############################################################
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
) \
31 --target
=$(GNU_TARGET_NAME
) \
32 --host
=$(GNU_TARGET_NAME
) \
33 --build
=$(GNU_HOST_NAME
) \
39 --libexecdir
=/usr
/lib \
41 --datadir=/usr
/share \
42 --localstatedir
=/var \
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
: uclibc
$(TARGET_DIR
)/$(SMARTMONTOOLS_TARGET_BINARY
)
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