import mdadm written by ktraum in bug 443
authorMike Frysinger <vapier@gentoo.org>
Sat, 24 Sep 2005 00:57:27 +0000 (00:57 -0000)
committerMike Frysinger <vapier@gentoo.org>
Sat, 24 Sep 2005 00:57:27 +0000 (00:57 -0000)
package/Config.in
package/mdadm/Config.in [new file with mode: 0644]
package/mdadm/mdadm.mk [new file with mode: 0644]

index ab0e15b85db07ffbe14d97f110e24ce62e212aea..8e64a3dd54cff2c9bf07513566debc14ee8e9df8 100644 (file)
@@ -65,6 +65,7 @@ source "package/ltrace/Config.in"
 source "package/lvm2/Config.in"
 source "package/lzo/Config.in"
 source "package/m4/Config.in"
+source "package/mdadm/Config.in"
 source "package/microcom/Config.in"
 source "package/microperl/Config.in"
 source "package/microwin/Config.in"
diff --git a/package/mdadm/Config.in b/package/mdadm/Config.in
new file mode 100644 (file)
index 0000000..b419f48
--- /dev/null
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_MDADM
+       bool "mdadm"
+       default n
+       help
+         Utility for managing RAID hardware.
+
+         http://cgi.cse.unsw.edu.au/~neilb/mdadm
diff --git a/package/mdadm/mdadm.mk b/package/mdadm/mdadm.mk
new file mode 100644 (file)
index 0000000..bdd3f45
--- /dev/null
@@ -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