2008-04-05 16:09:18 +02:00
|
|
|
# $NetBSD: Makefile,v 1.40 2008/04/05 14:09:18 chris Exp $
|
1998-09-06 00:02:19 +02:00
|
|
|
|
|
|
|
DISTNAME= hbench-OS-1.0
|
2002-01-22 21:50:52 +01:00
|
|
|
PKGNAME= hbench-1.0
|
2008-04-05 16:09:18 +02:00
|
|
|
PKGREVISION= 6
|
1998-09-06 00:02:19 +02:00
|
|
|
CATEGORIES= benchmarks
|
2006-10-04 22:46:42 +02:00
|
|
|
MASTER_SITES= http://www.eecs.harvard.edu/vino/perf/hbench/
|
1998-09-06 00:02:19 +02:00
|
|
|
|
2008-01-19 10:16:17 +01:00
|
|
|
MAINTAINER= pkgsrc-users@NetBSD.org
|
1998-09-06 00:02:19 +02:00
|
|
|
HOMEPAGE= http://www.eecs.harvard.edu/vino/perf/hbench/
|
2001-02-16 14:30:32 +01:00
|
|
|
COMMENT= Suite of portable benchmarks to measure the OS and the hardware
|
1998-09-06 00:02:19 +02:00
|
|
|
|
2001-03-22 14:27:27 +01:00
|
|
|
DEPENDS+= gnuplot>=3.7:../../graphics/gnuplot
|
1998-09-06 00:02:19 +02:00
|
|
|
|
2004-07-30 17:50:37 +02:00
|
|
|
PKG_INSTALLATION_TYPES= overwrite pkgviews
|
|
|
|
|
2004-01-20 13:07:06 +01:00
|
|
|
WRKSRC= ${WRKDIR}/hbench-OS
|
2001-11-28 06:20:38 +01:00
|
|
|
OSVERSION_SPECIFIC= YES
|
2004-12-03 16:14:50 +01:00
|
|
|
BUILD_TARGET= build
|
2005-07-16 21:10:37 +02:00
|
|
|
USE_TOOLS+= perl:run
|
2006-06-18 12:07:09 +02:00
|
|
|
OVERRIDE_GNU_CONFIG_SCRIPTS= yes
|
1998-09-06 00:02:19 +02:00
|
|
|
|
2004-10-28 18:49:45 +02:00
|
|
|
DIST_SUBDIR= ${PKGNAME_NOREV}
|
|
|
|
|
2006-03-11 04:44:20 +01:00
|
|
|
GET_ARCH_CMD= ${PKGSRCDIR:Q}/mk/gnu-config/config.guess | ${SED} -e 's/-.*-.*$$//'
|
|
|
|
GET_OS_CMD= ${PKGSRCDIR:Q}/mk/gnu-config/config.guess | ${SED} -e 's/^.*-.*-//'
|
|
|
|
PLIST_SUBST+= PLATFORM=${GET_OS_CMD:sh:Q}-${GET_ARCH_CMD:sh:Q}
|
|
|
|
|
2006-06-18 12:07:09 +02:00
|
|
|
post-extract:
|
|
|
|
${CP} ${FILESDIR}/do-install ${WRKSRC}
|
2006-01-12 16:10:29 +01:00
|
|
|
|
2006-06-18 12:07:09 +02:00
|
|
|
SUBST_CLASSES+= hb
|
|
|
|
SUBST_STAGE.hb= pre-configure
|
|
|
|
SUBST_MESSAGE.hb= Replacing bin with libexec.
|
|
|
|
SUBST_FILES.hb= do-install
|
|
|
|
SUBST_FILES.hb+= scripts/*
|
|
|
|
SUBST_FILES.hb+= Results/Makefile
|
|
|
|
SUBST_SED.hb= -e 's,@PREFIX@,${PREFIX},g'
|
|
|
|
SUBST_SED.hb+= -e 's,/bin/hbench,/libexec/hbench,g'
|
1998-09-06 00:02:19 +02:00
|
|
|
|
|
|
|
do-install:
|
2005-12-29 04:26:28 +01:00
|
|
|
${SETENV} ${MAKE_ENV} WRKSRC=${WRKSRC} BINOWN=${BINOWN} \
|
2006-06-18 12:07:09 +02:00
|
|
|
BINGRP=${BINGRP} ${WRKSRC}/do-install
|
1998-09-06 00:02:19 +02:00
|
|
|
|
1998-09-23 18:56:00 +02:00
|
|
|
benchmark:
|
1999-12-28 05:26:17 +01:00
|
|
|
@if [ `id -u` != 0 ]; then ${ECHO} "This benchmark must be run as root!" ; exit 1 ; fi
|
1998-12-26 16:59:54 +01:00
|
|
|
cd ${WRKSRC}; \
|
|
|
|
${MKDIR} conf; \
|
|
|
|
${MKDIR} results; \
|
1998-09-23 18:56:00 +02:00
|
|
|
${SED} -e 's|@pwd@|'`/bin/pwd`'|g' \
|
|
|
|
-e 's|@hostname@|'`/bin/hostname -s`'|g' \
|
1998-12-26 16:59:54 +01:00
|
|
|
-e 's|@wrksrc@|'`/bin/pwd`'|g' \
|
1998-09-23 18:56:00 +02:00
|
|
|
${FILESDIR}/setup.answers | ${MAKE} setup; \
|
1998-12-26 16:59:54 +01:00
|
|
|
${MV} conf/`/bin/hostname -s`.run conf/foo ; \
|
|
|
|
${SED} -e 's|#PLAINBINDIR=${HBENCHROOT}|PLAINBINDIR='`/bin/pwd`'|' \
|
|
|
|
< conf/foo > conf/`/bin/hostname -s`.run ; \
|
1998-09-23 18:56:00 +02:00
|
|
|
${MAKE} run
|
|
|
|
|
1998-12-26 16:59:54 +01:00
|
|
|
results:
|
2001-04-09 13:45:33 +02:00
|
|
|
@${MKDIR} /tmp/benches/`domainname`
|
1998-12-26 16:59:54 +01:00
|
|
|
-@cd ${WRKSRC} ; \
|
|
|
|
tar -cf /tmp/benches/`domainname`/hbench.`uname`-`uname -m`-`uname -r`.`hostname`.tar results conf
|
|
|
|
|
1998-09-06 00:02:19 +02:00
|
|
|
.include "../../mk/bsd.pkg.mk"
|