summaryrefslogtreecommitdiffstats
path: root/package/hdparm
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2006-06-23 06:52:33 +0000
committerEric Andersen <andersen@codepoet.org>2006-06-23 06:52:33 +0000
commit84e58ab9a6ce69302ced48ac8de8da6d87e70ded (patch)
tree008bd6696822f676ba0658c10a6c533d49b567fe /package/hdparm
parentf7116410a59b94f1f294545610ea253eb40b51ca (diff)
downloadbuildroot-novena-84e58ab9a6ce69302ced48ac8de8da6d87e70ded.tar.gz
buildroot-novena-84e58ab9a6ce69302ced48ac8de8da6d87e70ded.zip
patch from John Gatewood Ham, add hdparm
Diffstat (limited to 'package/hdparm')
-rw-r--r--package/hdparm/Config.in7
-rw-r--r--package/hdparm/hdparm.mk48
2 files changed, 55 insertions, 0 deletions
diff --git a/package/hdparm/Config.in b/package/hdparm/Config.in
new file mode 100644
index 000000000..0b65fe389
--- /dev/null
+++ b/package/hdparm/Config.in
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_HDPARM
+ bool "hdparm"
+ default y
+ help
+ hdparm - get/set hard disk parameters for Linux IDE drives.
+
+ http://www.ibiblio.org/pub/Linux/system/hardware/
diff --git a/package/hdparm/hdparm.mk b/package/hdparm/hdparm.mk
new file mode 100644
index 000000000..84b613df6
--- /dev/null
+++ b/package/hdparm/hdparm.mk
@@ -0,0 +1,48 @@
+#############################################################
+#
+# hdparm
+#
+#############################################################
+HDPARM_SOURCE:=hdparm-6.5.tar.gz
+HDPARM_SITE:=http://www.ibiblio.org/pub/Linux/system/hardware/
+HDPARM_CAT:=zcat
+HDPARM_DIR:=$(BUILD_DIR)/hdparm-6.5
+HDPARM_BINARY:=hdparm
+HDPARM_TARGET_BINARY:=sbin/hdparm
+
+$(DL_DIR)/$(HDPARM_SOURCE):
+ $(WGET) -P $(DL_DIR) $(HDPARM_SITE)/$(HDPARM_SOURCE)
+
+hdparm-source: $(DL_DIR)/$(HDPARM_SOURCE)
+
+hdparm-unpacked: $(HDPARM_DIR)/.unpacked
+$(HDPARM_DIR)/.unpacked: $(DL_DIR)/$(HDPARM_SOURCE)
+ $(HDPARM_CAT) $(DL_DIR)/$(HDPARM_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+ touch $(HDPARM_DIR)/.unpacked
+
+$(HDPARM_DIR)/.configured: $(HDPARM_DIR)/.unpacked
+ touch $(HDPARM_DIR)/.configured
+
+$(HDPARM_DIR)/$(HDPARM_BINARY): $(HDPARM_DIR)/.configured
+ $(MAKE) CC=$(TARGET_CC) -C $(HDPARM_DIR)
+
+$(TARGET_DIR)/$(HDPARM_TARGET_BINARY): $(HDPARM_DIR)/$(HDPARM_BINARY)
+ cp -a $(HDPARM_DIR)/$(HDPARM_BINARY) $(TARGET_DIR)/$(HDPARM_TARGET_BINARY)
+
+hdparm: uclibc $(TARGET_DIR)/$(HDPARM_TARGET_BINARY)
+
+hdparm-clean:
+ rm -f $(TARGET_DIR)/$(HDPARM_TARGET_BINARY)
+ -$(MAKE) -C $(HDPARM_DIR) clean
+
+hdparm-dirclean:
+ rm -rf $(HDPARM_DIR)
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_PACKAGE_HDPARM)),y)
+TARGETS+=hdparm
+endif