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> |