summaryrefslogtreecommitdiff
path: root/benchmarks/bonnie/Makefile
blob: fce7fa41ceac791b0a5b111f616ff8ad4a0d433d (plain)
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
# $NetBSD: Makefile,v 1.39 2014/10/09 14:05:58 wiz Exp $

DISTNAME=	bonnie
PKGNAME=	bonnie-2.06
PKGREVISION=	3
CATEGORIES=	benchmarks
MASTER_SITES=	http://www.textuality.com/bonnie/

MAINTAINER=	pkgsrc-users@NetBSD.org
HOMEPAGE=	http://www.textuality.com/bonnie/index.html
COMMENT=	Performance Test of Sequential Filesystem I/O and STDIO

NOT_FOR_PLATFORM=	Interix-*-* # has only 32-bit off_t

NO_CONFIGURE=	yes
WRKSRC=		${WRKDIR}

USE_TOOLS+=		expr groff nroff
USE_BSD_MAKEFILE=	yes
MANCOMPRESSED_IF_MANZ=	yes

CFLAGS.Linux+=	-D_FILE_OFFSET_BITS=64
CFLAGS.SunOS+=	-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64

INSTALLATION_DIRS=	bin ${PKGMANDIR}/cat1 ${PKGMANDIR}/man1

post-extract:
	${MV} ${WRKSRC}/Bonnie.c ${WRKSRC}/bonnie.c

SYSCTL?=	/sbin/sysctl

benchmark:
	@(cd ${WRKSRC}; ./bonnie -m nb$$(uname -r) -s $$(${EXPR} 4 \* $$(${SYSCTL} -n hw.physmem) / 1024 / 1024) | tee bonnie.out)

results:
	@${MKDIR} /tmp/benches/$$(domainname)
	-@${CP} ${WRKSRC}/bonnie.out /tmp/benches/$$(domainname)/bonnie.$$(uname)-$$(uname -m)-$$(uname -r).$$(hostname)

.include "../../mk/bsd.pkg.mk"