aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2011-02-26 12:58:37 +0800
committerdelphij <delphij@FreeBSD.org>2011-02-26 12:58:37 +0800
commitb542b52df1f4df2ecd90a9726b46a4e67f8528ac (patch)
tree43ff250f77e9a8ecb98becaba80e32a9fc779b34 /net
parent45a1f645ab7666123270ff77eb241079b027049f (diff)
downloadfreebsd-ports-gnome-b542b52df1f4df2ecd90a9726b46a4e67f8528ac.tar.gz
freebsd-ports-gnome-b542b52df1f4df2ecd90a9726b46a4e67f8528ac.tar.zst
freebsd-ports-gnome-b542b52df1f4df2ecd90a9726b46a4e67f8528ac.zip
iSCSI Enterprise Target, based on a original port by QuadStor Systems [1].
iSCSI Enterprise Target is a simple open source iSCSI target with professional features, that works well in enterprise environments under real workloads, and is scalable and versatile enough to meet the challenge of future storage needs and developments. Part of additional work was sponsored by iXsystems, Inc. [1] http://www.quadstor.com/tech-articles/116-iscsi-enterprise-target-iet-on-freebsd.html
Diffstat (limited to 'net')
-rw-r--r--net/Makefile1
-rw-r--r--net/iet/Makefile52
-rw-r--r--net/iet/distinfo4
-rw-r--r--net/iet/files/ietd.in21
-rw-r--r--net/iet/pkg-descr8
-rw-r--r--net/iet/pkg-plist21
6 files changed, 107 insertions, 0 deletions
diff --git a/net/Makefile b/net/Makefile
index eec7bb94fc9c..a94bd40554f8 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -243,6 +243,7 @@
SUBDIR += iaxmodem
SUBDIR += icmpinfo
SUBDIR += icpld
+ SUBDIR += iet
SUBDIR += ifdepd
SUBDIR += iffinder
SUBDIR += ifstat
diff --git a/net/iet/Makefile b/net/iet/Makefile
new file mode 100644
index 000000000000..2ab6df23b1e1
--- /dev/null
+++ b/net/iet/Makefile
@@ -0,0 +1,52 @@
+# New ports collection makefile for: iet
+# Date created: 2011-02-25
+# Whom: Xin LI <delphij@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= iet
+PORTVERSION= 1.4.20.2
+CATEGORIES= net
+MASTER_SITES= SF/iscsitarget/iscsitarget/${PORTVERSION}/
+DISTNAME= iscsitarget-${PORTVERSION}
+
+PATCH_SITES= ${MASTER_SITE_LOCAL}
+PATCH_SITE_SUBDIR= delphij
+PATCHFILES= ${PORTNAME}-${PORTVERSION}.diff.bz2
+PATCH_DIST_STRIP= -p1
+
+MAINTAINER= delphij@FreeBSD.org
+COMMENT= The iSCSI Enterprise Target
+
+LICENSE= GPLv2
+
+BUILD_WRKSRC= ${WRKSRC}/freebsd
+INSTALL_WRKSRC= ${BUILD_WRKSRC}
+
+MAN5= ietd.conf.5
+MAN8= ietadm.8 ietd.8
+MANCOMPRESSED= maybe
+
+USE_RC_SUBR= ietd
+
+KMODDIR= ${PREFIX}/modules
+PLIST_SUB+= KMODDIR=${KMODDIR}
+MAKE_ENV+= KMODDIR=${KMODDIR} DATADIR=${DATADIR} SYSDIR="${SRC_BASE}/sys"
+
+CONFDIR= ${PREFIX}/etc/iet
+CONF_FILES= ietd.conf initiators.allow initiators.deny targets.allow
+
+.if !exists(${SRC_BASE}/sys/Makefile)
+IGNORE= requires kernel sources to build
+.endif
+
+pre-install:
+ ${MKDIR} ${DATADIR} ${KMODDIR} ${CONFDIR}
+
+post-install:
+.for f in ${CONF_FILES}
+ @[ -f ${CONFDIR}/${f} ] || ${CP} ${DATADIR}/${f} ${CONFDIR}/
+.endfor
+
+.include <bsd.port.mk>
diff --git a/net/iet/distinfo b/net/iet/distinfo
new file mode 100644
index 000000000000..862943390216
--- /dev/null
+++ b/net/iet/distinfo
@@ -0,0 +1,4 @@
+SHA256 (iscsitarget-1.4.20.2.tar.gz) = 0f3c8e2c2038fbbd7059d1efdd428260013212daca75c1d56abbeec33cb8d388
+SIZE (iscsitarget-1.4.20.2.tar.gz) = 138464
+SHA256 (iet-1.4.20.2.diff.bz2) = 7d52898f986633ee9f0bee0076416dc7f515a372b625a4f579576b7ac8e9e35d
+SIZE (iet-1.4.20.2.diff.bz2) = 25970
diff --git a/net/iet/files/ietd.in b/net/iet/files/ietd.in
new file mode 100644
index 000000000000..adee42dd5277
--- /dev/null
+++ b/net/iet/files/ietd.in
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+# PROVIDE: ietd
+# REQUIRE: NETWORKING SERVERS DAEMON ldconfig resolv
+# BEFORE: LOGIN
+# KEYWORD: shutdown
+
+. /etc/rc.subr
+name="ietd"
+command=%%PREFIX%%/sbin/${name}
+stop_precmd="ietd_prestop"
+required_modules="iet"
+rcvar=`set_rcvar`
+
+ietd_prestop()
+{
+ %%PREFIX%%/sbin/ietadm --op delete
+}
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/net/iet/pkg-descr b/net/iet/pkg-descr
new file mode 100644
index 000000000000..7fd6415ced99
--- /dev/null
+++ b/net/iet/pkg-descr
@@ -0,0 +1,8 @@
+iSCSI Enterprise Target is a simple open source iSCSI target with
+professional features, that works well in enterprise environments
+under real workloads, and is scalable and versatile enough to meet
+the challenge of future storage needs and developments.
+
+The port work was originally done by QuadStor.
+
+WWW: http://iscsitarget.sourceforge.net/
diff --git a/net/iet/pkg-plist b/net/iet/pkg-plist
new file mode 100644
index 000000000000..2f01a26a273e
--- /dev/null
+++ b/net/iet/pkg-plist
@@ -0,0 +1,21 @@
+modules/iet.ko
+@exec mkdir -p %D/etc/iet
+@unexec (cmp -s %D/%%DATADIR%%/ietd.conf %D/etc/iet/ietd.conf && rm -f %D/etc/iet/ietd.conf) || true
+%%DATADIR%%/ietd.conf
+@exec [ -f %B/ietd.conf ] || cp %B/%f %D/etc/iet/ietd.conf
+@unexec (cmp -s %D/%%DATADIR%%/initiators.allow %D/etc/iet/initiators.allow && rm -f %D/etc/iet/initiators.allow) || true
+%%DATADIR%%/initiators.allow
+@exec [ -f %B/initiators.allow ] || cp %B/%f %D/etc/iet/initiators.allow
+@unexec (cmp -s %D/%%DATADIR%%/initiators.deny %D/etc/iet/initiators.deny && rm -f %D/etc/iet/initiators.deny) || true
+%%DATADIR%%/initiators.deny
+@exec [ -f %B/initiators.deny ] || cp %B/%f %D/etc/iet/initiators.deny
+@unexec (cmp -s %D/%%DATADIR%%/targets.allow %D/etc/iet/targets.allow && rm -f %D/etc/iet/targets.allow) || true
+%%DATADIR%%/targets.allow
+@exec [ -f %B/targets.allow ] || cp %B/%f %D/etc/iet/targets.allow
+@dirrmtry etc/iet
+@dirrm %%DATADIR%%
+sbin/ietd
+sbin/ietadm
+@exec /usr/sbin/kldxref %%KMODDIR%%
+@unexec /usr/sbin/kldxref %%KMODDIR%%
+@dirrmtry %%KMODDIR%%