summaryrefslogtreecommitdiff
path: root/sysutils/moosefs3-master/Makefile
blob: bb9f41aa1eb0f0cb8c51b80abf362329f809ddbe (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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# Created by: Jakub Kruszona-Zawadzki <acid@moosefs.com> ; Based on port created by: Chifeng Qu <chifeng@gmail.com>
# $FreeBSD$

PORTNAME=		moosefs3
PORTVERSION=		3.0.88
CATEGORIES=		sysutils
MASTER_SITES=		http://ppa.moosefs.com/src/
PKGNAMESUFFIX?=		-master
DISTNAME=		moosefs-${PORTVERSION}-1

MAINTAINER=		freebsd@moosefs.com
COMMENT?=		Fault-tolerant distributed filesystem

LICENSE=		GPLv2

USES=			python:build
GNU_CONFIGURE=		yes
WRKSRC=			${WRKDIR}/moosefs-${PORTVERSION}
PLIST=			${.CURDIR}/pkg-plist
DESCR=			${.CURDIR}/pkg-descr

MFS_COMPONENT?=		master
MFS_USER=		mfs
MFS_GROUP=		mfs
MFS_WORKDIR=		/var

USERS=			${MFS_USER}
GROUPS=			${MFS_GROUP}

CONFIGURE_ARGS+=	--localstatedir=${MFS_WORKDIR} \
			--with-default-user=${MFS_USER} \
			--with-default-group=${MFS_GROUP}

CONFLICTS=		moosefs2-${MFS_COMPONENT}-*

.if ${MFS_COMPONENT} == cgi
MFS_CGIDIR=		${PREFIX}/share/mfscgi
USES=			python:2.5+
CONFIGURE_ARGS+=	--enable-mfscgi \
			--with-mfscgi-dir=${MFS_CGIDIR}
.else
CONFIGURE_ARGS+=	--disable-mfscgi
.endif

.if ${MFS_COMPONENT} == cgiserv
MFS_CGISERVDIR=		${PREFIX}/sbin
USES=			python:2.5+
USE_RC_SUBR=		mfscgiserv
SUB_FILES+=		pkg-message-cgiserv
PKGMESSAGE=		${WRKDIR}/pkg-message-cgiserv
PLIST_SUB+=		MFS_WORKDIR="${MFS_WORKDIR}"
CONFIGURE_ARGS+=	--enable-mfscgiserv \
			--with-mfscgiserv-dir=${MFS_CGISERVDIR}
RUN_DEPENDS=		moosefs3-cgi>0:sysutils/moosefs3-cgi
.else
CONFIGURE_ARGS+=	--disable-mfscgiserv
.endif

.if ${MFS_COMPONENT} == chunkserver
USE_RC_SUBR=		mfschunkserver
SUB_FILES+=		pkg-message-chunkserver
PKGMESSAGE=		${WRKDIR}/pkg-message-chunkserver
PLIST_SUB+=		MFS_WORKDIR="${MFS_WORKDIR}"
CONFIGURE_ARGS+=	--enable-mfschunkserver
.else
CONFIGURE_ARGS+=	--disable-mfschunkserver
.endif

.if ${MFS_COMPONENT} == cli
USES=			python:2.5+
CONFIGURE_ARGS+=	--enable-mfscli
.else
CONFIGURE_ARGS+=	--disable-mfscli
.endif

.if ${MFS_COMPONENT} == client
USES=			fuse pkgconfig
CONFIGURE_ARGS+=	--enable-mfsmount
.else
CONFIGURE_ARGS+=	--disable-mfsmount
.endif

.if ${MFS_COMPONENT} == master
USE_RC_SUBR=		mfsmaster
PLIST_SUB+=		MFS_WORKDIR="${MFS_WORKDIR}"
SUB_FILES+=		pkg-message-master
PKGMESSAGE=		${WRKDIR}/pkg-message-master
CONFIGURE_ARGS+=	--enable-mfsmaster
.else
CONFIGURE_ARGS+=	--disable-mfsmaster
.endif

.if ${MFS_COMPONENT} == metalogger
USE_RC_SUBR=		mfsmetalogger
SUB_FILES+=		pkg-message-metalogger
PKGMESSAGE=		${WRKDIR}/pkg-message-metalogger
PLIST_SUB+=		MFS_WORKDIR="${MFS_WORKDIR}"
CONFIGURE_ARGS+=	--enable-mfsmetalogger
.else
CONFIGURE_ARGS+=	--disable-mfsmetalogger
.endif

.if ${MFS_COMPONENT} == netdump
CONFIGURE_ARGS+=	--enable-mfsnetdump
.else
CONFIGURE_ARGS+=	--disable-mfsnetdump
.endif

.include <bsd.port.mk>