aboutsummaryrefslogtreecommitdiffstats
path: root/net/spread4/Makefile
blob: 4bcbb8b4f914a0d8fc22f0ee66dcea1787746694 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Created by: Anders Nordby <anders@fix.no>
# $FreeBSD$

PORTNAME=   spread4
PORTVERSION=    4.2.0
CATEGORIES= net perl5
MASTER_SITES=   LOCAL/ohauer
DISTNAME=   spread-src-${PORTVERSION}

MAINTAINER= ports@FreeBSD.org
COMMENT=    The Spread Group Communication System, a network toolkit

GNU_CONFIGURE=  yes
USE_GMAKE=  yes
USE_RC_SUBR=    spread
USE_LDCONFIG=   yes
ALL_TARGET= all

USERS=      spread
GROUPS=     spread
RUNDIR=     /var/run/spread

PLIST_SUB+= USERS=${USERS} GROUPS=${GROUPS} RUNDIR=${RUNDIR}
SUB_LIST+=  USERS=${USERS} GROUPS=${GROUPS}

WRKSRC=     ${WRKDIR}/spread-src-${PORTVERSION}

PKGMESSAGE= ${WRKSRC}/license.txt

DOCFILES=   DynamicConfiguration.txt Flush_or_SpreadAPI.txt \
        MultithreadedClients.txt Short_Buffer_Handling.txt \
        TODO PORTING
MAN1=       spflooder.1 spmonitor.1 spread.1 sptuser.1 spuser.1
MAN3=       SP_connect.3 SP_disconnect.3 SP_equal_group_ids.3 \
        SP_error.3 SP_get_memb_info.3 SP_get_vs_set_members.3 \
        SP_get_vs_sets_info.3 SP_join.3 SP_kill.3 \
        SP_leave.3 SP_multicast.3 SP_multigroup_multicast.3 \
        SP_multigroup_scat_multicast.3 SP_poll.3 SP_receive.3 \
        SP_scat_get_memb_info.3 SP_scat_get_vs_set_members.3 \
        SP_scat_get_vs_sets_info.3 SP_scat_multicast.3 \
        SP_scat_receive.3 SP_version.3 libspread.3

NO_STAGE=   yes
.include <bsd.port.pre.mk>

post-extract:
        @${REINPLACE_CMD} -e 's|INSTALLSUBDIRS=daemon docs|INSTALLSUBDIRS=daemon|' \
        ${WRKSRC}/Makefile.in

post-install:
    ${INSTALL_DATA} -m 644 ${WRKSRC}/docs/sample.spread.conf \
        ${PREFIX}/etc/spread.conf.sample
    ${INSTALL_DATA} -m 644 ${WRKSRC}/docs/sample.spread.access_ip \
        ${PREFIX}/etc/spread.access_ip.sample

.if !exists(${PREFIX}/etc/spread.conf)
    ${INSTALL_DATA} -m 644 ${WRKSRC}/docs/sample.spread.conf \
        ${PREFIX}/etc/spread.conf
.endif

.if !exists(${PREFIX}/etc/spread.access_ip)
    ${INSTALL_DATA} -m 644 ${WRKSRC}/docs/sample.spread.access_ip \
        ${PREFIX}/etc/spread.access_ip
.endif

.if !defined(NOPORTDOCS)
    ${MKDIR} ${DOCSDIR}
.for f in ${DOCFILES}
    ${INSTALL_DATA} ${WRKSRC}/docs/${f} ${DOCSDIR}
.endfor
.endif

.for f in ${MAN1}
    ${INSTALL_MAN} ${WRKSRC}/docs/${f} ${LOCALBASE}/man/man1/
.endfor

.for f in ${MAN3}
    ${INSTALL_MAN} ${WRKSRC}/docs/${f} ${LOCALBASE}/man/man3/
.endfor
    @${INSTALL} -m 750 -o ${USERS} -g ${GROUPS} -d ${RUNDIR}
    @${CAT} ${PKGMESSAGE}

.include <bsd.port.post.mk>