Merge oe-devel@oe-devel.bkbits.net:packages
[openembedded.git] / lmbench / lmbench_2.0.4.oe
1 SECTION = "console/utils"
2 DESCRIPTION = "Tools for performance analysis."
3 LICENSE = "GPL"
4 MAINTAINER = "Chris Larson <kergoth@handhelds.org>"
5
6 SRC_URI = "ftp://ftp.bitmover.com/lmbench/lmbench-${PV}.tgz \
7            file://debian.patch;patch=1 \
8            file://exe.patch;patch=1 \
9            file://lmbench-run"
10 S = "${WORKDIR}/lmbench-${PV}"
11
12 EXTRA_OEMAKE = '"CC=${CC}" "AR=${AR}" "CFLAGS=$CFLAGS" \
13                 "LDFLAGS=${LDFLAGS}" "LD=${LD}" "OS=${TARGET_SYS}" \
14                 "TARGET=${TARGET_OS}" "O=${S}/bin/${TARGET_SYS}"'
15
16 python do_unpack () {
17         oe.build.exec_func('base_do_unpack', d)
18         oe.build.exec_func('byebk_do_unpack', d)
19 }
20
21 byebk_do_unpack () {
22         find ${S}/.. -name BitKeeper -o -name SCCS | xargs rm -rf
23 }
24
25 do_compile () {
26         . ${CONFIG_SITE}
27         if [ X"$ac_cv_uint" == X"yes" ]; then
28                 CFLAGS="${CFLAGS} -DHAVE_uint"
29         fi
30         install -d ${S}/bin/${TARGET_SYS}
31         oe_runmake -C src exe
32         sed -i -e 's,^SHAREDIR=.*$,SHAREDIR=${datadir}/${PN},;' \
33                -e 's,^BINDIR=.*$,BINDIR=${libdir}/${PN},;' ${WORKDIR}/lmbench-run
34 }
35
36 do_install () {
37         oe_runmake 'PREFIX=${D}/${prefix}' \
38                    'SHAREDIR=${D}/${datadir}/${PN}' \
39                    'BINDIR=${D}/${libdir}/lmbench' install
40         install -d ${D}/${localstatedir}/lib/lmbench/config \
41                    ${D}/${localstatedir}/run/lmbench \
42                    ${D}/${bindir}
43         install -m 0755 ${WORKDIR}/lmbench-run ${D}/${bindir}/
44 }