summaryrefslogtreecommitdiffstats
path: root/package/smartmontools
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2005-12-16 13:33:32 +0000
committerEric Andersen <andersen@codepoet.org>2005-12-16 13:33:32 +0000
commitc7eb499ec234f3402753c475e9666c001d30f86b (patch)
treeff20dc7ca1a7cf4d2ffc95d28273b80c4c874fa4 /package/smartmontools
parent9c5bb0ec4ac84d552fb83c868ae90ccd9d26ecdd (diff)
downloadbuildroot-novena-c7eb499ec234f3402753c475e9666c001d30f86b.tar.gz
buildroot-novena-c7eb499ec234f3402753c475e9666c001d30f86b.zip
add support for building smartmontools
Diffstat (limited to 'package/smartmontools')
-rw-r--r--package/smartmontools/Config.in7
-rw-r--r--package/smartmontools/smartmontools.mk76
2 files changed, 83 insertions, 0 deletions
diff --git a/package/smartmontools/Config.in b/package/smartmontools/Config.in
new file mode 100644
index 000000000..f2e27fc42
--- /dev/null
+++ b/package/smartmontools/Config.in
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_SMARTMONTOOLS
+ bool "smartmontools"
+ default n
+ help
+ Control and monitor storage systems using S.M.A.R.T.
+
+ http://smartmontools.sourceforge.net/
diff --git a/package/smartmontools/smartmontools.mk b/package/smartmontools/smartmontools.mk
new file mode 100644
index 000000000..82a2a2be2
--- /dev/null
+++ b/package/smartmontools/smartmontools.mk
@@ -0,0 +1,76 @@
+#############################################################
+#
+# smartmontools
+#
+#############################################################
+SMARTMONTOOLS_VER:=5.33
+SMARTMONTOOLS_SOURCE:=smartmontools-$(SMARTMONTOOLS_VER).tar.gz
+SMARTMONTOOLS_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/smartmontools
+SMARTMONTOOLS_DIR:=$(BUILD_DIR)/smartmontools-$(SMARTMONTOOLS_VER)
+SMARTMONTOOLS_CAT:=zcat
+SMARTMONTOOLS_BINARY:=smartctl
+SMARTMONTOOLS_BINARY2:=smartd
+SMARTMONTOOLS_TARGET_BINARY:=usr/sbin/smartctl
+
+$(DL_DIR)/$(SMARTMONTOOLS_SOURCE):
+ $(WGET) -P $(DL_DIR) $(SMARTMONTOOLS_SITE)/$(SMARTMONTOOLS_SOURCE)
+
+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) \
+ CFLAGS="$(TARGET_CFLAGS)" \
+ ./configure \
+ --target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
+ --prefix=/usr \
+ --exec-prefix=/usr \
+ --bindir=/usr/bin \
+ --sbindir=/usr/sbin \
+ --libexecdir=/usr/lib \
+ --sysconfdir=/etc \
+ --datadir=/usr/share \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ $(DISABLE_NLS) \
+ $(DISABLE_LARGEFILE) \
+ );
+ touch $(SMARTMONTOOLS_DIR)/.configured
+
+$(SMARTMONTOOLS_DIR)/$(SMARTMONTOOLS_BINARY): $(SMARTMONTOOLS_DIR)/.configured
+ $(MAKE) -C $(SMARTMONTOOLS_DIR)
+ $(STRIP) $(SMARTMONTOOLS_DIR)/$(SMARTMONTOOLS_BINARY)
+ $(STRIP) $(SMARTMONTOOLS_DIR)/$(SMARTMONTOOLS_BINARY2)
+ 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/
+
+smartmontools: uclibc $(TARGET_DIR)/$(SMARTMONTOOLS_TARGET_BINARY)
+
+smartmontools-clean:
+ $(MAKE) DESTDIR=$(TARGET_DIR) -C $(SMARTMONTOOLS_DIR) uninstall
+ -$(MAKE) -C $(SMARTMONTOOLS_DIR) clean
+
+smartmontools-dirclean:
+ rm -rf $(SMARTMONTOOLS_DIR)
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_PACKAGE_TAR)),y)
+TARGETS+=smartmontools
+endif