From 98c52dfb5c6cf4acdcf26b8715f619c014cc2c38 Mon Sep 17 00:00:00 2001 From: "Thales A. Tsailas" Date: Tue, 11 May 2010 22:54:50 +0200 Subject: network/iscsitarget: Added to 12.1 repository --- network/iscsitarget/README | 4 ++ network/iscsitarget/doinst.sh | 30 ++++++++++ network/iscsitarget/iscsitarget.SlackBuild | 88 ++++++++++++++++++++++++++++++ network/iscsitarget/iscsitarget.info | 8 +++ network/iscsitarget/slack-desc | 19 +++++++ 5 files changed, 149 insertions(+) create mode 100644 network/iscsitarget/README create mode 100644 network/iscsitarget/doinst.sh create mode 100644 network/iscsitarget/iscsitarget.SlackBuild create mode 100644 network/iscsitarget/iscsitarget.info create mode 100644 network/iscsitarget/slack-desc (limited to 'network/iscsitarget') diff --git a/network/iscsitarget/README b/network/iscsitarget/README new file mode 100644 index 0000000000..6be0cad246 --- /dev/null +++ b/network/iscsitarget/README @@ -0,0 +1,4 @@ +iSCSI Enterprise Target is for building an iSCSI storage system on +Linux. + +This package makes all bindings that are supported on the system. diff --git a/network/iscsitarget/doinst.sh b/network/iscsitarget/doinst.sh new file mode 100644 index 0000000000..89debfb1e3 --- /dev/null +++ b/network/iscsitarget/doinst.sh @@ -0,0 +1,30 @@ +#!/bin/sh +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then + # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +# Keep same perms on rc.iscsi-target.new: +if [ -e etc/rc.d/rc.iscsi-target ]; then + cp -a etc/rc.d/rc.iscsi-target etc/rc.d/rc.iscsi-target.new.incoming + cat etc/rc.d/rc.iscsi-target.new > etc/rc.d/rc.iscsi-target.new.incoming + mv etc/rc.d/rc.iscsi-target.new.incoming etc/rc.d/rc.iscsi-target.new +else + # Install executable otherwise - irrelevant unless user starts in rc.local + chmod 0755 etc/rc.d/rc.iscsi-target.new +fi + +config etc/rc.d/rc.iscsi-target.new + +if [ -x /sbin/depmod ]; then +echo -e "Updating modules..." +depmod -a +fi diff --git a/network/iscsitarget/iscsitarget.SlackBuild b/network/iscsitarget/iscsitarget.SlackBuild new file mode 100644 index 0000000000..5d78da2be0 --- /dev/null +++ b/network/iscsitarget/iscsitarget.SlackBuild @@ -0,0 +1,88 @@ +#!/bin/sh + +# Slackware build script for iscsitarget 0.4.16 + +# Written by Thales A. Tsailas + +# Exit on most errors +set -e +set -x +# Definitions +PRGNAM=iscsitarget +VERSION=0.4.16 +ARCH=${ARCH:-i486} +BUILD=${BUILD:-1} +TAG=${TAG:_SBo} +kernel=$(uname -r) + +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 + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvzf $CWD/$PRGNAM-$VERSION.tar.gz +cd $TMP/$PRGNAM-$VERSION +chown -R root:root . +chmod -R a-s,u+w,go+r-w . + +make KERNELSRC=/lib/modules/$kernel/build + +install -d $PKG/etc/rc.d/ +install -d $PKG/usr/man/man8/ +install -d $PKG/usr/man/man5/ +make install KERNELSRC=/lib/modules/$kernel/build DISTDIR=$PKG/ +install -m 644 -D etc/ietd.conf $PKG/etc/ietd.conf +install -m 644 -D etc/initiators.allow $PKG/etc/initiators.allow +install -m 644 -D etc/initiators.deny $PKG/etc/initiators.deny +install -m 644 -D doc/manpages/ietd.8 $PKG/usr/man/man8/ietd.8 +install -m 644 -D doc/manpages/ietd.conf.5 $PKG/usr/man/man5/ietd.conf.5 + +# Rename the init script to something Slackware compatible: +mv $PKG/etc/rc.d/iscsi-target $PKG/etc/rc.d/rc.iscsi-target.new + +## Revert to Slack Default folders and naming +mv $PKG/usr/share/doc $PKG/usr/doc +mv $PKG/usr/doc/$PRGNAM $PKG/usr/doc/$PRGNAM-$VERSION +rm -rf $PKG/usr/share + + + +( cd $PKG + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null +) + +( 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 +) + + +# Set correct permissions +( cd $PKG + find . -perm 444 -exec chmod 0644 {} \; + find . -perm 555 -exec chmod 0755 {} \; +) + +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz +set +x diff --git a/network/iscsitarget/iscsitarget.info b/network/iscsitarget/iscsitarget.info new file mode 100644 index 0000000000..233a91008f --- /dev/null +++ b/network/iscsitarget/iscsitarget.info @@ -0,0 +1,8 @@ +PRGNAM="iscsitarget" +VERSION="0.4.16" +HOMEPAGE="http://iscsitarget.sourceforge.net/" +DOWNLOAD="http://downloads.sourceforge.net/iscsitarget/iscsitarget-0.4.16.tar.gz" +MD5SUM="c7ea3192f1717b40e4c483c9d630082d" +MAINTAINER="Thales A. Tsailas" +EMAIL="ttsailas@enforcingit.com" +APPROVED="David Somero" \ No newline at end of file diff --git a/network/iscsitarget/slack-desc b/network/iscsitarget/slack-desc new file mode 100644 index 0000000000..9c6548ee6d --- /dev/null +++ b/network/iscsitarget/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------------------------------------------------------| +iscsitarget: iscsitarget (iSCSI Enterprise Target) +iscsitarget: +iscsitarget: iSCSI Enterprise Target is for building an iSCSI storage system +iscsitarget: on Linux. It is aimed at developing an iSCSI target satisfying +iscsitarget: enterprise requirements. +iscsitarget: +iscsitarget: http://iscsitarget.sourceforge.net/ +iscsitarget: +iscsitarget: +iscsitarget: +iscsitarget: -- cgit v1.2.3