summaryrefslogtreecommitdiffstats
path: root/package/mdadm/mdadm.mk
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-09-24 00:57:27 +0000
committerMike Frysinger <vapier@gentoo.org>2005-09-24 00:57:27 +0000
commiteb02a6756a001f7d6887a78b1e37cefd87003ee8 (patch)
tree31960bd476936425275b0d603d5da42173783844 /package/mdadm/mdadm.mk
parentc6ab1fea3766e6ea3704641aa81df44499059881 (diff)
downloadbuildroot-novena-eb02a6756a001f7d6887a78b1e37cefd87003ee8.tar.gz
buildroot-novena-eb02a6756a001f7d6887a78b1e37cefd87003ee8.zip
import mdadm written by ktraum in bug 443
Diffstat (limited to 'package/mdadm/mdadm.mk')
-rw-r--r--package/mdadm/mdadm.mk45
1 files changed, 45 insertions, 0 deletions
diff --git a/package/mdadm/mdadm.mk b/package/mdadm/mdadm.mk
new file mode 100644
index 000000000..bdd3f45c3
--- /dev/null
+++ b/package/mdadm/mdadm.mk
@@ -0,0 +1,45 @@
+#############################################################
+#
+# mdadm
+#
+#############################################################
+MDADM_VERSION:=2.1
+MDADM_SOURCE:=mdadm-$(MDADM_VERSION).tar.bz2
+MDADM_SITE:=http://www.kernel.org/pub/linux/utils/raid/mdadm
+MDADM_DIR:=$(BUILD_DIR)/mdadm-$(MDADM_VERSION)
+MDADM_BINARY:=mdadm
+MDADM_TARGET_BINARY:=sbin/mdadm
+
+$(DL_DIR)/$(MDADM_SOURCE):
+ $(WGET) -P $(DL_DIR) $(MDADM_SITE)/$(MDADM_SOURCE)
+
+$(MDADM_DIR)/.source: $(DL_DIR)/$(MDADM_SOURCE)
+ bzcat $(DL_DIR)/$(MDADM_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+ touch $(MDADM_DIR)/.source
+
+$(MDADM_DIR)/$(MDADM_BINARY): $(MDADM_DIR)/.source
+ $(MAKE) CFLAGS="$(TARGET_CFLAGS)" CC=$(TARGET_CC) -C $(MDADM_DIR)
+
+$(TARGET_DIR)/$(MDADM_TARGET_BINARY): $(MDADM_DIR)/$(MDADM_BINARY)
+ $(MAKE) DESTDIR=$(TARGET_DIR) -C $(MDADM_DIR) install
+ rm -Rf $(TARGET_DIR)/usr/share/man
+
+mdadm: uclibc $(TARGET_DIR)/$(MDADM_TARGET_BINARY)
+
+mdadm-source: $(DL_DIR)/$(MDADM_SOURCE)
+
+mdadm-clean:
+ $(MAKE) prefix=$(TARGET_DIR)/usr -C $(MDADM_DIR) uninstall
+ -$(MAKE) -C $(MDADM_DIR) clean
+
+mdadm-dirclean:
+ rm -rf $(MDADM_DIR)
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_PACKAGE_MDADM)),y)
+TARGETS+=mdadm
+endif