blob: 6a0a11a22296323a34e1f839defee430ce5cfc77 (
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
# $NetBSD: Makefile,v 1.28 2015/06/12 10:48:25 wiz Exp $
DISTNAME= unixbench-4.1.0
PKGNAME= ${DISTNAME:S/unix/byte/}
PKGREVISION= 7
CATEGORIES= benchmarks
MASTER_SITES= http://www.tux.org/pub/tux/benchmarks/System/unixbench/
EXTRACT_SUFX= .tgz
MAINTAINER= pkgsrc-users@NetBSD.org
COMMENT= BYTE Magazine's Public Domain benchmark for UNIX
BENCHMARK_ENV+= BINDIR=${WRKSRC}/pgms
BENCHMARK_ENV+= SCRPDIR=${WRKSRC}/pgms
BENCHMARK_ENV+= RESULTDIR=${WRKSRC}/results
BENCHMARK_ENV+= BENCHDIR=${WRKSRC}/testdir
BENCHMARK_ENV+= TESTDIR=${WRKSRC}/tmp
OWN_DIRS= /var/bytebench
INSTALLATION_DIRS= bin
REPLACE_PERL+= pgms/perlbench
USE_TOOLS+= perl:run
MAKE_JOBS_SAFE= no
post-extract:
${RM} -f ${WRKSRC}/pgms/select
post-patch:
cd ${WRKSRC}; ${SED} -e "s|@PREFIX@|${PREFIX}|g" Run > run-byte
${CHMOD} +x ${WRKSRC}/run-byte
pre-install:
${FIND} ${WRKSRC} -name "*.orig" -print | ${XARGS} ${RM} -f
do-install:
${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/libexec/bytebench
${INSTALL_SCRIPT} ${WRKSRC}/pgms/* ${DESTDIR}${PREFIX}/libexec/bytebench
${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/bytebench
${INSTALL_DATA} ${WRKSRC}/testdir/* ${DESTDIR}${PREFIX}/share/bytebench
${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/doc/bytebench
${INSTALL_DATA} ${WRKSRC}/README ${DESTDIR}${PREFIX}/share/doc/bytebench
${INSTALL_SCRIPT} ${WRKSRC}/run-byte ${DESTDIR}${PREFIX}/bin
benchmark:
@if [ `${ID} -u` != 0 ]; then \
${ECHO} "This benchmark must be run as root!"; \
exit 1; \
fi
@( cd ${WRKSRC}; ${SETENV} ${BENCHMARK_ENV} ./run-byte \
| tee bytebench.out )
results:
@${MKDIR} /tmp/benches/`domainname`
-@${CP} ${WRKSRC}/bytebench.out /tmp/benches/`domainname`/bytebench.`uname`-`uname -m`-`uname -r`.`hostname`
.include "../../mk/bsd.pkg.mk"
|