summaryrefslogtreecommitdiff
path: root/network/nbd
diff options
context:
space:
mode:
authorAndrzej Telszewski <atelszewski@gmail.com>2010-05-11 22:54:58 +0200
committerDavid Somero <xgizzmo@slackbuilds.org>2010-05-11 22:54:58 +0200
commitecac12763b1242e543c315e4b0e3c02e7de071f7 (patch)
treeca19832e661b1e61a77d375e83cd63101253c24c /network/nbd
parentc2bfcda4247edf3d70065b1fe91077972017b81d (diff)
downloadslackbuilds-ecac12763b1242e543c315e4b0e3c02e7de071f7.tar.gz
network/nbd: Added to 12.1 repository
Diffstat (limited to 'network/nbd')
-rw-r--r--network/nbd/README8
-rw-r--r--network/nbd/nbd.SlackBuild98
-rw-r--r--network/nbd/nbd.info8
-rw-r--r--network/nbd/slack-desc19
4 files changed, 133 insertions, 0 deletions
diff --git a/network/nbd/README b/network/nbd/README
new file mode 100644
index 0000000000..18f1ebcb93
--- /dev/null
+++ b/network/nbd/README
@@ -0,0 +1,8 @@
+With NBD you can access block device on remote host just as it was in your
+local /dev. It works with companion with the kernel nbd driver and consists
+of a server and a client. Communication between client and server works over
+TCP/IP networking, but to the client program this is hidden: it looks like
+a regular local file access to a block device special file such as /dev/nd0.
+
+NBD kernel driver location: Device Drivers -> Block devices -> Network block
+device support The kernel driver needs only to be compiled on client side.
diff --git a/network/nbd/nbd.SlackBuild b/network/nbd/nbd.SlackBuild
new file mode 100644
index 0000000000..2eb52946c5
--- /dev/null
+++ b/network/nbd/nbd.SlackBuild
@@ -0,0 +1,98 @@
+#!/bin/sh
+
+# Slackware build script for NBD (Network Block Device)
+
+# Copyright (c) 2008 Andrzej Telszewski <atelszewski@gmail.com>
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of the {company} nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM=nbd
+VERSION=2.9.11
+ARCH=${ARCH:-i486}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $TMP/$PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 || exit 1
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --enable-syslog \
+ --disable-debug \
+ --build=$ARCH-slackware-linux
+
+make
+make install DESTDIR=$PKG
+
+find $PKG | xargs file | grep -e "executable" -e "shared object"| grep ELF | \
+ cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+( cd $PKG/usr/man
+ find . -type f -exec gzip -9 {} \;
+ for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+)
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a INSTALL README $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
diff --git a/network/nbd/nbd.info b/network/nbd/nbd.info
new file mode 100644
index 0000000000..1609ca1d54
--- /dev/null
+++ b/network/nbd/nbd.info
@@ -0,0 +1,8 @@
+PRGNAM="nbd"
+VERSION="2.9.11"
+HOMEPAGE="http://nbd.sourceforge.net/"
+DOWNLOAD="http://mesh.dl.sourceforge.net/sourceforge/nbd/nbd-2.9.11.tar.bz2"
+MD5SUM="f6a6e09ef1833a4fd9408a84c8a18249"
+MAINTAINER="Andrzej Telszewski"
+EMAIL="atelszewski@gmail.com"
+APPROVED="dsomero"
diff --git a/network/nbd/slack-desc b/network/nbd/slack-desc
new file mode 100644
index 0000000000..c88819f46a
--- /dev/null
+++ b/network/nbd/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler--------------------------------------------------------|
+nbd: nbd (Network Block Device TCP version)
+nbd:
+nbd: With NBD you can access block device on remote host just as it was in
+nbd: your local /dev. It works with companion with the kernel nbd driver and
+nbd: consists of a server and a client. Communication between client and
+nbd: server works over TCP/IP networking, but to the client program this is
+nbd: hidden: it looks like a regular local file access to a block device
+nbd: special file such as /dev/nd0.
+nbd:
+nbd: Homepage: http://nbd.sourceforge.net/
+nbd: