diff options
author | Pav Lucistnik <pav@FreeBSD.org> | 2006-10-07 15:25:26 +0000 |
---|---|---|
committer | Pav Lucistnik <pav@FreeBSD.org> | 2006-10-07 15:25:26 +0000 |
commit | 52054704d434dc0f491939ca4e55db989dfb91bf (patch) | |
tree | 055cbee374baa006f7b50b16f75bcd723b89cedb /net/iscsi-target | |
parent | - Fix build with gcc41 (diff) |
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 <mark@foster.cc>
Diffstat (limited to 'net/iscsi-target')
-rw-r--r-- | net/iscsi-target/Makefile | 54 | ||||
-rw-r--r-- | net/iscsi-target/distinfo | 3 | ||||
-rw-r--r-- | net/iscsi-target/files/iscsi_target.in | 22 | ||||
-rw-r--r-- | net/iscsi-target/pkg-descr | 4 | ||||
-rw-r--r-- | net/iscsi-target/pkg-plist | 17 |
5 files changed, 100 insertions, 0 deletions
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 <fred@lacave.net> +# +# $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 <bsd.port.mk> 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 |