View | Details | Raw Unified | Return to bug 218686
Collapse All | Expand All

(-)net/open-isns/Makefile (+69 lines)
Line 0 Link Here
1
# $FreeBSD$
2
3
PORTNAME=	open-isns
4
PORTVERSION=	0.97
5
DISTVERSIONPREFIX=	v
6
CATEGORIES=	net
7
8
MAINTAINER=	pavelivolkov@gmail.com
9
COMMENT=	Internet Storage Name Service (iSNS)
10
11
LICENSE=	LGPL21
12
13
USE_GITHUB=	yes
14
GH_ACCOUNT=	open-iscsi
15
GH_TAGNAME=	94e3bc9
16
17
USES=		autoreconf gmake pathfix
18
GNU_CONFIGURE=	yes
19
USE_LDCONFIG=	yes
20
CONFIGURE_ARGS=	--enable-shared
21
INSTALL_TARGET=	install install_lib
22
USE_RC_SUBR=	isnsd
23
DATABASE_PLACE?=	/var/db/isns
24
25
OPTIONS_SUB=	yes
26
OPTIONS_DEFINE=	DEV SECURITY SLP
27
OPTIONS_DEFAULT=	SECURITY
28
29
DEV_DESC=	Install Headers & Static lib
30
DEV_CONFIGURE_ENABLE=	static
31
DEV_VARS=	INSTALL_TARGET+=install_hdrs
32
33
SECURITY_DESC=	Enable iSNS authentication
34
SECURITY_CONFIGURE_WITH=	security
35
SECURITY_USES=	ssl
36
37
SLP_DESC=	Enable SLP for server discovery
38
SLP_CONFIGURE_WITH=	slp
39
SLP_LIB_DEPENDS=	libslp.so:net/openslp
40
41
.include <bsd.port.options.mk>
42
43
post-patch:
44
	${REINPLACE_CMD} -E \
45
		-e "s|^([[:blank:]]*#define ISNS_ETCDIR[[:blank:]]+\")(.*)$$|\1${PREFIX}\2|" \
46
		-e "s|^([[:blank:]]*#define ISCSI_DEFAULT_INITIATORNAME[[:blank:]]+\")(.*)$$|\1${PREFIX}\2|" \
47
		${WRKSRC}/include/libisns/paths.h.in
48
	${REINPLACE_CMD} -E \
49
		-e "1,10s|^(vardir[[:blank:]]*=[[:blank:]]*)(.*)$$|\1${DATABASE_PLACE}|" \
50
		${WRKSRC}/Makefile.in
51
.for FILE in isnsadm.conf isnsd.conf isnsdd.conf
52
	${REINPLACE_CMD} -E \
53
		-e "s|^(.*AuthKeyFile[[:blank:]]*=[[:blank:]]*)(.*)$$|\1${PREFIX}\2|" \
54
		-e "s|^(.*ServerKeyFile[[:blank:]]*=[[:blank:]]*)(.*)$$|\1${PREFIX}\2|" \
55
		-e "s|^(.*Database[[:blank:]]*=[[:blank:]]*)(.*)$$|\1${DATABASE_PLACE}|" \
56
		${WRKSRC}/etc/${FILE}
57
.endfor
58
59
post-patch-SLP-off:
60
	${REINPLACE_CMD} -E \
61
		-e "s|^(.*SLPRegister[[:blank:]]*=[[:blank:]]*)(.*)$$|\10|" \
62
		${WRKSRC}/etc/isnsd.conf
63
64
post-install:
65
.for FILE in sbin/isnsadm sbin/isnsd sbin/isnsdd lib/libisns.so.0
66
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/${FILE}
67
.endfor
68
69
.include <bsd.port.mk>
(-)net/open-isns/distinfo (+3 lines)
Line 0 Link Here
1
TIMESTAMP = 1491477988
2
SHA256 (open-iscsi-open-isns-v0.97-94e3bc9_GH0.tar.gz) = dbbcfc27648a3f696425b6ba94a6a444c428ce1f9056471edef7bc4b7a3b231c
3
SIZE (open-iscsi-open-isns-v0.97-94e3bc9_GH0.tar.gz) = 278367
(-)net/open-isns/files/isnsd.in (+32 lines)
Line 0 Link Here
1
#!/bin/sh
2
3
# $FreeBSD$
4
#
5
# PROVIDE: isnsd
6
# REQUIRE: LOGIN
7
# KEYWORD: shutdown
8
#
9
# isnsd_enable (bool):	Set to NO by default.
10
#			Set it to YES to enable daemon.
11
# isnsd_config (path):	Set to %%PREFIX%%/etc/isns/${name}.conf
12
#			by default.
13
# isnsd_flags (str):	Set to "" by default.
14
#			Extra flags passed to start command.
15
16
. /etc/rc.subr
17
18
name="isnsd"
19
desc="Internet Storage Name Service daemon"
20
rcvar=`set_rcvar`
21
22
load_rc_config "$name"
23
24
eval "${rcvar}=\${${rcvar}:-'NO'}"
25
: ${isnsd_config="%%PREFIX%%/etc/isns/isnsd.conf"}
26
: ${isnsd_flags=""}
27
28
pidfile="/var/run/${name}.pid"
29
command="%%PREFIX%%/sbin/${name}"
30
command_args="--config \"${isnsd_config}\" ${isnsd_flags}"
31
32
run_rc_command "$1"
(-)net/open-isns/files/patch-Makefile.in (+34 lines)
Line 0 Link Here
1
--- Makefile.in.orig	2017-04-08 09:26:35 UTC
2
+++ Makefile.in
3
@@ -3,7 +3,7 @@ exec_prefix = @exec_prefix@
4
 sbindir	= @sbindir@
5
 mandir	= @mandir@
6
 libdir  = @libdir@
7
-etcdir	= /etc
8
+etcdir	= $(prefix)/etc
9
 vardir	= /var/lib/isns
10
 systemddir = $(prefix)/lib/systemd/system
11
 datarootdir = @datarootdir@
12
@@ -107,18 +107,16 @@ all: $(LIB) $(SOLIB) isnsd isnsadm isnsd
13
 
14
 install:
15
 	@echo "*** Installing Open-iSNS ***"
16
-	$(INSTALL) -m 755 -d $(CFGDIR) $(MANDIR)/man8 $(MANDIR)/man5 $(SBINDIR) $(SYSTEMDDIR)
17
+	$(INSTALL) -m 755 -d $(CFGDIR) $(MANDIR)/man8 $(MANDIR)/man5 $(SBINDIR)
18
 	$(INSTALL) -m 700 -d $(VARDIR)
19
 	$(INSTALL) -m 555 isnsd isnsadm isnsdd $(SBINDIR)
20
-	$(INSTALL) -m 644 etc/isnsd.conf $(CFGDIR)
21
-	$(INSTALL) -m 644 etc/isnsdd.conf $(CFGDIR)
22
-	$(INSTALL) -m 644 etc/isnsadm.conf $(CFGDIR)
23
+	$(INSTALL) -m 644 etc/isnsd.conf $(CFGDIR)/isnsd.conf.sample
24
+	$(INSTALL) -m 644 etc/isnsdd.conf $(CFGDIR)/isnsdd.conf.sample
25
+	$(INSTALL) -m 644 etc/isnsadm.conf $(CFGDIR)/isnsadm.conf.sample
26
 	$(INSTALL) -m 644 doc/isnsd.8 $(MANDIR)/man8
27
 	$(INSTALL) -m 644 doc/isnsdd.8 $(MANDIR)/man8
28
 	$(INSTALL) -m 644 doc/isnsadm.8 $(MANDIR)/man8
29
 	$(INSTALL) -m 644 doc/isns_config.5 $(MANDIR)/man5
30
-	$(INSTALL) -m 644 isnsd.service $(SYSTEMDDIR)
31
-	$(INSTALL) -m 644 isnsd.socket $(SYSTEMDDIR)
32
 
33
 install_hdrs: 
34
 	@echo '*** Installing Open-iSNS header files ***'
(-)net/open-isns/pkg-descr (+4 lines)
Line 0 Link Here
1
This is a partial implementation of iSNS,
2
according to RFC4171.
3
4
WWW: https://github.com/open-iscsi/open-isns/
(-)net/open-isns/pkg-plist (+24 lines)
Line 0 Link Here
1
@sample etc/isns/isnsadm.conf.sample
2
@sample etc/isns/isnsd.conf.sample
3
@sample etc/isns/isnsdd.conf.sample
4
etc/rc.d/isnsd
5
%%DEV%%include/libisns/attrs.h
6
%%DEV%%include/libisns/buffer.h
7
%%DEV%%include/libisns/isns-proto.h
8
%%DEV%%include/libisns/isns.h
9
%%DEV%%include/libisns/message.h
10
%%DEV%%include/libisns/paths.h
11
%%DEV%%include/libisns/source.h
12
%%DEV%%include/libisns/types.h
13
%%DEV%%include/libisns/util.h
14
%%DEV%%lib/libisns.a
15
lib/libisns.so
16
lib/libisns.so.0
17
man/man5/isns_config.5.gz
18
man/man8/isnsadm.8.gz
19
man/man8/isnsd.8.gz
20
man/man8/isnsdd.8.gz
21
sbin/isnsadm
22
sbin/isnsd
23
sbin/isnsdd
24
@dir /var/db/isns

Return to bug 218686