summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2006-09-28 10:19:43 +0000
committerPeter Korsgaard <jacmet@sunsite.dk>2006-09-28 10:19:43 +0000
commit577278c538696e5e79c401a9865560f9f9686488 (patch)
tree38f955b1e59600b22ca83ab876bb7d06331984eb
parenta46a87d49355e2ae5c7490e061a4d2d601854908 (diff)
downloadbuildroot-novena-577278c538696e5e79c401a9865560f9f9686488.tar.gz
buildroot-novena-577278c538696e5e79c401a9865560f9f9686488.zip
Network block device package (client only)
-rw-r--r--package/Config.in1
-rw-r--r--package/nbd/Config.in9
-rw-r--r--package/nbd/nbd.mk57
3 files changed, 67 insertions, 0 deletions
diff --git a/package/Config.in b/package/Config.in
index 8d2cae6d2..64b2e588a 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -97,6 +97,7 @@ source "package/mpg123/Config.in"
source "package/mrouted/Config.in"
source "package/mtd/Config.in"
source "package/nano/Config.in"
+source "package/nbd/Config.in"
source "package/ncurses/Config.in"
source "package/netkitbase/Config.in"
source "package/netkittelnet/Config.in"
diff --git a/package/nbd/Config.in b/package/nbd/Config.in
new file mode 100644
index 000000000..a8be78b45
--- /dev/null
+++ b/package/nbd/Config.in
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_NBD
+ bool "nbd"
+ default n
+ help
+ NBD is a set of utilities to configure network block devices,
+ allowing access to remote block devices over TCP/IP network.
+ Notice: This package only provides the NBD client.
+
+ http://nbd.sf.net/
diff --git a/package/nbd/nbd.mk b/package/nbd/nbd.mk
new file mode 100644
index 000000000..100e2a0a2
--- /dev/null
+++ b/package/nbd/nbd.mk
@@ -0,0 +1,57 @@
+#############################################################
+#
+# nbd (client only)
+#
+#############################################################
+
+NBD_VERSION=2.8.6
+NBD_SOURCE=nbd-$(NBD_VERSION).tar.bz2
+NBD_SITE=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/nbd/
+NBD_DIR=$(BUILD_DIR)/nbd-$(NBD_VERSION)
+NBD_CAT:=bzcat
+
+$(DL_DIR)/$(NBD_SOURCE):
+ $(WGET) -P $(DL_DIR) $(NBD_SITE)/$(NBD_SOURCE)
+
+$(NBD_DIR)/.unpacked: $(DL_DIR)/$(NBD_SOURCE)
+ $(NBD_CAT) $(DL_DIR)/$(NBD_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+ touch $(NBD_DIR)/.unpacked
+
+$(NBD_DIR)/.configured: $(NBD_DIR)/.unpacked
+ (cd $(NBD_DIR); rm -rf config.cache; \
+ $(TARGET_CONFIGURE_OPTS) \
+ CC=$(TARGET_CC) \
+ ./configure \
+ --target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
+ --prefix=/usr \
+ );
+ touch $(NBD_DIR)/.configured
+
+$(NBD_DIR)/nbd-client: $(NBD_DIR)/.configured
+ $(MAKE) -C $(NBD_DIR) nbd-client
+
+$(TARGET_DIR)/sbin/nbd-client: $(NBD_DIR)/nbd-client
+ cp $< $@
+ $(STRIP) $@
+
+nbd: uclibc $(TARGET_DIR)/sbin/nbd-client
+
+nbd-source: $(DL_DIR)/$(NBD_SOURCE)
+
+nbd-clean:
+ @if [ -d $(NBD_DIR)/Makefile ] ; then \
+ $(MAKE) -C $(NBD_DIR) clean ; \
+ fi;
+
+nbd-dirclean:
+ rm -rf $(NBD_DIR)
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_PACKAGE_NBD)),y)
+TARGETS+=nbd
+endif