View | Details | Raw Unified | Return to bug 191046 | Differences between
and this patch

Collapse All | Expand All

(-)moosefs-chunkserver/Makefile (-25 / +18 lines)
Lines 2-47 Link Here
2
# $FreeBSD: head/sysutils/moosefs-chunkserver/Makefile 327772 2013-09-20 23:05:58Z bapt $
2
# $FreeBSD: head/sysutils/moosefs-chunkserver/Makefile 327772 2013-09-20 23:05:58Z bapt $
3
3
4
PORTNAME=	moosefs
4
PORTNAME=	moosefs
5
PORTVERSION=	#
5
DISTVERSION=	1.6.27-5
6
CATEGORIES=	sysutils
6
CATEGORIES=	sysutils
7
MASTER_SITES=	http://www.moosefs.org/tl_files/mfscode/ \
8
		http://ports.quxingwen.com/dist/mfs/
7
PKGNAMESUFFIX=	-chunkserver
9
PKGNAMESUFFIX=	-chunkserver
8
NO_STAGE=	yes
10
DISTNAME=	mfs-${DISTVERSION}
9
.include "${.CURDIR}/../moosefs-master/bsd.port.moosefs.mk"
10
11
11
MAINTAINER=	chifeng@gmail.com
12
MAINTAINER=	chifeng@gmail.com
12
COMMENT=	Storing files data and synchronizing it among themselves
13
COMMENT=	Storing files data and synchronizing it among themselves
13
14
14
DISTINFO_FILE=	${.CURDIR}/../moosefs-master/distinfo
15
LICENSE=	GPLv3
15
USE_RC_SUBR=	mfschunkserver
16
17
WRKSRC=		${WRKDIR}/mfs-1.6.27
18
USERS=		mfs
19
GROUPS=		mfs
20
GNU_CONFIGURE=	yes
16
21
17
MAN5=		mfschunkserver.cfg.5 mfshdd.cfg.5
22
USE_RC_SUBR=	mfschunkserver
18
MAN8=		mfschunkserver.8
19
23
20
SUB_FILES+=	pkg-message pkg-deinstall
24
SUB_FILES=	pkg-message
21
SUB_LIST+=	MFS_WORKDIR="${MFS_WORKDIR}"
22
25
23
CONFIGURE_ARGS=	--localstatedir=${MFS_WORKDIR} \
26
CONFIGURE_ARGS=	--localstatedir=/var \
24
		--bindir=${PREFIX}/sbin \
27
		--enable-mfschunkserver \
25
		--with-default-user=${MFSUSER} \
26
		--with-default-group=${MFSGROUP} \
27
		--disable-mfsmaster \
28
		--disable-mfsmaster \
28
		--disable-mfsmount \
29
		--disable-mfsmount \
29
		--disable-mfscgi \
30
		--disable-mfscgi \
30
		--disable-mfscgiserv \
31
		--disable-mfscgiserv \
31
		--enable-mfschunkserver
32
		--bindir=${PREFIX}/sbin \
32
33
		--with-default-user=mfs \
33
.include <bsd.port.pre.mk>
34
		--with-default-group=mfs
34
35
35
post-patch:
36
post-patch:
36
	${REINPLACE_CMD} -e 's;^general_mans;#general_mans;g' ${WRKSRC}/doc/Makefile.am \
37
	${REINPLACE_CMD} -e 's;^general_mans;#general_mans;g' ${WRKSRC}/doc/Makefile.am \
37
		${WRKSRC}/doc/Makefile.in
38
		${WRKSRC}/doc/Makefile.in
38
39
39
post-install:
40
.include <bsd.port.mk>
40
.for FILE in mfschunkserver mfshdd
41
	@if [ ! -f ${PREFIX}/etc/${i}.cfg ]; then \
42
		${CP} ${PREFIX}/etc/mfs/${FILE}.cfg.dist ${PREFIX}/etc/${FILE}.cfg ; \
43
	fi
44
.endfor
45
	@${CAT} ${PKGMESSAGE}
46
47
.include <bsd.port.post.mk>
(-)moosefs-chunkserver/distinfo (+2 lines)
Line 0 Link Here
1
SHA256 (mfs-1.6.27-5.tar.gz) = 5e6d7dd5dfe181ffb6beee44fd2be51b3faf56a71b90b460b2dc717462ff1eeb
2
SIZE (mfs-1.6.27-5.tar.gz) = 784507
(-)moosefs-chunkserver/files/mfschunkserver.in (-13 / +13 lines)
Lines 8-16 Link Here
8
# KEYWORD: shutdown
8
# KEYWORD: shutdown
9
9
10
#
10
#
11
# Add the following lines to /etc/rc.conf or or /etc/rc.conf to enable mfschunkserver:
11
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf to enable mfschunkserver:
12
#
12
#
13
# mfschunkserver_enable="YES"
13
# mfschunkserver_enable (bool):   Set to NO by default.
14
#                                 Set it to YES to enable mfschunkserver.
15
# mfschunkserver_config (path):   Set to %%PREFIX%%/etc/mfs/mfschunkserver.cfg
16
#                                 by default.
17
# mfschunkserver_flags (str):     Set to ""  by default.
18
#                                 Extra flags passed to mfschunkserver.
14
#
19
#
15
20
16
. /etc/rc.subr
21
. /etc/rc.subr
Lines 18-35 Link Here
18
name=mfschunkserver
23
name=mfschunkserver
19
rcvar=mfschunkserver_enable
24
rcvar=mfschunkserver_enable
20
25
21
command=%%PREFIX%%/sbin/${name}
26
load_rc_config $name
22
27
23
stop_postcmd=stop_postcmd
28
: ${mfschunkserver_enable=NO}
29
: ${mfschunkserver_config=%%PREFIX%%/etc/mfs/mfschunkserver.cfg}
24
30
25
stop_postcmd()
31
extra_commands=reload
26
{
32
command=%%PREFIX%%/sbin/${name}
27
  rm -f $pidfile
33
command_args="-c ${mfschunkserver_config}"
28
}
29
30
# set defaults
31
mfschunkserver_enable=${mfschunkserver_enable:-"NO"}
32
mfschunkserver_flags=${mfschunkserver_flags:-"-c %%PREFIX%%/etc/mfschunkserver.cfg"}
33
34
34
load_rc_config $name
35
run_rc_command "$1"
35
run_rc_command "$1"
(-)moosefs-chunkserver/files/pkg-deinstall.in (-10 lines)
Lines 1-10 Link Here
1
#!/bin/sh
2
3
PATH="/bin:/sbin:/usr/bin:/usr/sbin"
4
5
WORKDIR=%%MFS_WORKDIR%%/mfs
6
7
if [ "$2" = "POST-DEINSTALL" ]; then
8
	echo "=> Deleting ${WORKDIR} if empty..."
9
	rm -d ${WORKDIR} 2>/dev/null || true
10
fi
(-)moosefs-chunkserver/pkg-plist (-4 / +10 lines)
Lines 1-8 Link Here
1
@exec  if [ ! -f %D/etc/mfshdd.cfg ]; then /bin/cp %D/%F %D/etc/mfshdd.cfg; fi
1
@unexec if cmp -s %D/%F %B/mfschunkserver.cfg; then rm -f %B/mfschunkserver.cfg; fi
2
@exec  if [ ! -f %D/etc/mfschunkserver.cfg ]; then /bin/cp %D/%F %D/etc/mfschunkserver.cfg; fi
3
@unexec if cmp -s %D/etc/mfs/mfshdd.cfg.dist %D/etc/mfshdd.cfg; then rm -f %D/etc/mfshdd.cfg; fi
4
@unexec if cmp -s %D/etc/mfs/mfschunkserver.cfg.dist %D/etc/mfschunkserver.cfg; then rm -f %D/etc/mfschunkserver.cfg; fi
5
etc/mfs/mfschunkserver.cfg.dist
2
etc/mfs/mfschunkserver.cfg.dist
3
@exec if [ ! -f %B/mfschunkserver.cfg ]; then cp %D/%F %B/mfschunkserver.cfg; chmod u+w %B/mfschunkserver.cfg; fi
4
@unexec if cmp -s %D/%F %B/mfshdd.cfg; then rm -f %B/mfshdd.cfg; fi
6
etc/mfs/mfshdd.cfg.dist
5
etc/mfs/mfshdd.cfg.dist
6
@exec if [ ! -f %B/mfshdd.cfg ]; then cp %D/%F %B/mfshdd.cfg; chmod u+w %B/mfshdd.cfg; fi
7
man/man5/mfschunkserver.cfg.5.gz
8
man/man5/mfshdd.cfg.5.gz
9
man/man8/mfschunkserver.8.gz
7
sbin/mfschunkserver
10
sbin/mfschunkserver
8
@dirrm etc/mfs
11
@dirrm etc/mfs
12
@owner mfs
13
@group mfs
14
@unexec rmdir "/var/mfs" >/dev/null 2>&1 || :

Return to bug 191046