aboutsummaryrefslogtreecommitdiffstats
path: root/package/dmraid
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2006-07-10 22:09:37 +0000
committerEric Andersen <andersen@codepoet.org>2006-07-10 22:09:37 +0000
commita8c92e8083df0297f2faafa8562b2cd45b7914c1 (patch)
tree0e6d9e721f6c4b5d91bb09c6798be95e0fe39c44 /package/dmraid
parentb6de822b37107cd819f11750075c2518da106e4f (diff)
downloadbuildroot-novena-a8c92e8083df0297f2faafa8562b2cd45b7914c1.tar.gz
buildroot-novena-a8c92e8083df0297f2faafa8562b2cd45b7914c1.zip
add support for dmraid soft raid handling
Diffstat (limited to 'package/dmraid')
-rw-r--r--package/dmraid/Config.in5
-rw-r--r--package/dmraid/dmraid.mk65
2 files changed, 70 insertions, 0 deletions
diff --git a/package/dmraid/Config.in b/package/dmraid/Config.in
new file mode 100644
index 000000000..7ec46ead6
--- /dev/null
+++ b/package/dmraid/Config.in
@@ -0,0 +1,5 @@
+config BR2_PACKAGE_DMRAID
+ bool "dmraid"
+ default n
+ help
+ Device-Mapper Software RAID support tool/
diff --git a/package/dmraid/dmraid.mk b/package/dmraid/dmraid.mk
new file mode 100644
index 000000000..4135ba4f4
--- /dev/null
+++ b/package/dmraid/dmraid.mk
@@ -0,0 +1,65 @@
+#############################################################
+#
+# dmraid
+#
+#############################################################
+
+DMRAID_VERSION=1.0.0.rc10
+DMRAID_SOURCE:=dmraid-$(DMRAID_VERSION).tar.bz2
+DMRAID_SITE:=http://people.redhat.com/~heinzm/sw/dmraid/src
+DMRAID_DIR:=$(BUILD_DIR)/dmraid/$(DMRAID_VERSION)
+DMRAID_CAT:=bzcat
+DMRAID_BINARY:=dmraid
+DMRAID_STAGING_BINARY:=$(DMRAID_DIR)/STAGING_DIR)/tools/$(DMRAID_BINARY)
+DMRAID_TARGET_BINARY:=$(TARGET_DIR)/sbin/$(DMRAID_BINARY)
+
+$(DL_DIR)/$(DMRAID_SOURCE):
+ $(WGET) -P $(DL_DIR) $(DMRAID_SITE)/$(DMRAID_SOURCE)
+
+$(DMRAID_DIR)/.unpacked: $(DL_DIR)/$(DMRAID_SOURCE)
+ $(DMRAID_CAT) $(DL_DIR)/$(DMRAID_SOURCE) | tar -C $(BUILD_DIR) -xvf -
+ $(SOURCE_DIR)/patch-kernel.sh $(DMRAID_DIR) $(SOURCE_DIR) dmraid\*.patch
+ touch $(DMRAID_DIR)/.unpacked
+
+$(DMRAID_DIR)/.configured: $(DMRAID_DIR)/.unpacked
+ (cd $(DMRAID_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 \
+ $(DISABLE_NLS) \
+ $(DISABLE_LARGEFILE) \
+ --with-user=$(shell id -un) --with-group=$(shell id -gn) \
+ );
+ touch $(DMRAID_DIR)/.configured
+
+$(DMRAID_DIR)/tools/$(DMRAID_BINARY): $(DMRAID_DIR)/.configured
+ $(MAKE1) -C $(DMRAID_DIR)
+ -$(STRIP) $(DMRAID_DIR)/tools/$(DMRAID_BINARY)
+ -$(UPX) --best $(DMRAID_DIR)/tools/$(DMRAID_BINARY)
+ touch -c $(DMRAID_DIR)/tools/$(DMRAID_BINARY)
+
+$(DMRAID_TARGET_BINARY): $(DMRAID_DIR)/tools/$(DMRAID_BINARY)
+ $(INSTALL) -m 0755 $? $@
+ $(INSTALL) -m 0755 $(SOURCE_DIR)/dmraid.init $(TARGET_DIR)/etc/init.d/dmraid
+
+dmraid: uclibc dm $(DMRAID_TARGET_BINARY)
+
+dmraid-clean:
+ rm $(DMRAID_TARGET_BINARY)
+ $(MAKE) -C $(DMRAID_DIR) clean
+
+dmraid-dirclean:
+ rm -rf $(DMRAID_DIR)
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_PACKAGE_DMRAID)),y)
+TARGETS+=dmraid
+endif