From 52054704d434dc0f491939ca4e55db989dfb91bf Mon Sep 17 00:00:00 2001 From: Pav Lucistnik Date: Sat, 7 Oct 2006 15:25:26 +0000 Subject: This is an implementation of iSCSI target, the server-side of ISCSI protocol, used to service remote iSCSI requests. WWW: http://www.netbsd.org/ PR: ports/104087 Submitted by: mark foster --- net/iscsi-target/Makefile | 54 ++++++++++++++++++++++++++++++++++ net/iscsi-target/distinfo | 3 ++ net/iscsi-target/files/iscsi_target.in | 22 ++++++++++++++ net/iscsi-target/pkg-descr | 4 +++ net/iscsi-target/pkg-plist | 17 +++++++++++ 5 files changed, 100 insertions(+) create mode 100644 net/iscsi-target/Makefile create mode 100644 net/iscsi-target/distinfo create mode 100644 net/iscsi-target/files/iscsi_target.in create mode 100644 net/iscsi-target/pkg-descr create mode 100644 net/iscsi-target/pkg-plist (limited to 'net/iscsi-target') diff --git a/net/iscsi-target/Makefile b/net/iscsi-target/Makefile new file mode 100644 index 000000000000..77bffaf5cfbc --- /dev/null +++ b/net/iscsi-target/Makefile @@ -0,0 +1,54 @@ +# New ports collection makefile for: iscsi-target +# Date created: 2006-04-18 +# Whom: Frederic Senault +# +# $FreeBSD$ +# + +PORTNAME= iscsi-target +PORTVERSION= 20060527 +CATEGORIES= net +MASTER_SITES= http://www.alistaircrooks.co.uk/src/ +DISTNAME= netbsd-iscsi-${PORTVERSION} + +MAINTAINER= mark@foster.cc +COMMENT= Implementation of userland ISCSI target (derived from NetBSD) + +WRKSRC= ${WRKDIR}/${DISTNAME}/src + +GNU_CONFIGURE= yes +CONFIGURE_TARGET=--build=${MACHINE_ARCH}-portbld-freebsd${OSREL} + +MAN5= targets.5 +MAN8= iscsi-target.8 + +USE_RC_SUBR= iscsi_target + +post-patch: + @${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|' ${WRKSRC}/Makefile.in + @${REINPLACE_CMD} -e 's|_LDFLAGS= -pthread|_LDFLAGS= ${PTHREAD_CFLAGS}|' ${WRKSRC}/Makefile.in + @${REINPLACE_CMD} -e 's|_FLAGS= -pthread|_FLAGS= ${PTHREAD_CFLAGS}|' ${WRKSRC}/Makefile.in + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/../bin/iscsi-target ${PREFIX}/bin + ${MKDIR} ${PREFIX}/etc/iscsi +.for i in targets passwd auths + ${INSTALL_DATA} ${WRKSRC}/etc/$i ${PREFIX}/etc/iscsi/$i.sample +.endfor + ${INSTALL_MAN} ${WRKSRC}/targets.5 ${PREFIX}/man/man5 + ${INSTALL_MAN} ${WRKSRC}/iscsi-target.8 ${PREFIX}/man/man8 + +post-install: +.if !defined(NOPORTDOCS) + ${MKDIR} ${DOCSDIR} +.for i in FAQ README README_OSD PERFORMANCE license + ${INSTALL_MAN} ${WRKSRC}/../doc/$i ${DOCSDIR} +.endfor +.endif +.for i in targets passwd auths + if [ ! -f ${PREFIX}/etc/iscsi/$i ]; then \ + ${CP} -p ${PREFIX}/etc/iscsi/$i.sample ${PREFIX}/etc/iscsi/$i ; \ + fi +.endfor + +.include diff --git a/net/iscsi-target/distinfo b/net/iscsi-target/distinfo new file mode 100644 index 000000000000..98c710e441b3 --- /dev/null +++ b/net/iscsi-target/distinfo @@ -0,0 +1,3 @@ +MD5 (netbsd-iscsi-20060527.tar.gz) = 6e425fe237ac956a7b742eb531121eac +SHA256 (netbsd-iscsi-20060527.tar.gz) = 44c06e860c3e408aaa992938f384707192b66eaa6468b6d3f5434c8c19d088b9 +SIZE (netbsd-iscsi-20060527.tar.gz) = 237784 diff --git a/net/iscsi-target/files/iscsi_target.in b/net/iscsi-target/files/iscsi_target.in new file mode 100644 index 000000000000..c9a25b3b7fb4 --- /dev/null +++ b/net/iscsi-target/files/iscsi_target.in @@ -0,0 +1,22 @@ +#!/bin/sh + +# PROVIDE: iscsi_target +# REQUIRE: NETWORKING mountall quota + +. %%RC_SUBR%% + +name="iscsi_target" +rcvar=`set_rcvar` + +command="%%PREFIX%%/bin/iscsi-target" +required_files="%%PREFIX%%/etc/iscsi/targets" +pidfile="/var/run/iscsi-target.pid" + +load_rc_config $name + +: ${iscsi_target_enable="NO"} +: ${iscsi_target_config="%%PREFIX%%/etc/iscsi/targets"} + +command_args="-f $iscsi_target_config" + +run_rc_command "$1" diff --git a/net/iscsi-target/pkg-descr b/net/iscsi-target/pkg-descr new file mode 100644 index 000000000000..ad620b425102 --- /dev/null +++ b/net/iscsi-target/pkg-descr @@ -0,0 +1,4 @@ +This is an implementation of iSCSI target, the server-side of ISCSI protocol, +used to service remote iSCSI requests. + +WWW: http://www.netbsd.org/ diff --git a/net/iscsi-target/pkg-plist b/net/iscsi-target/pkg-plist new file mode 100644 index 000000000000..ba51483ddc32 --- /dev/null +++ b/net/iscsi-target/pkg-plist @@ -0,0 +1,17 @@ +bin/iscsi-target +%%PORTDOCS%%%%DOCSDIR%%/FAQ +%%PORTDOCS%%%%DOCSDIR%%/PERFORMANCE +%%PORTDOCS%%%%DOCSDIR%%/README +%%PORTDOCS%%%%DOCSDIR%%/README_OSD +%%PORTDOCS%%%%DOCSDIR%%/license +%%PORTDOCS%%@dirrm %%DOCSDIR%% +@unexec if cmp -s %D/etc/iscsi/targets.sample %D/etc/iscsi/targets; then rm -f %D/etc/iscsi/targets; fi +etc/iscsi/targets.sample +@exec if [ ! -f %D/etc/iscsi/targets ] ; then cp -p %D/%F %B/targets; fi +@unexec if cmp -s %D/etc/iscsi/auths.sample %D/etc/iscsi/auths; then rm -f %D/etc/iscsi/auths; fi +etc/iscsi/auths.sample +@exec if [ ! -f %D/etc/iscsi/auths ] ; then cp -p %D/%F %B/auths; fi +@unexec if cmp -s %D/etc/iscsi/passwd.sample %D/etc/iscsi/passwd; then rm -f %D/etc/iscsi/passwd; fi +etc/iscsi/passwd.sample +@exec if [ ! -f %D/etc/iscsi/passwd ] ; then cp -p %D/%F %B/passwd; fi +@dirrm etc/iscsi -- cgit v1.2.3