lmbench_3.0-a9.bb 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. SUMMARY = "Tools for performance analysis"
  2. HOMEPAGE = "http://lmbench.sourceforge.net/"
  3. SECTION = "console/utils"
  4. LICENSE = "GPLv2 & GPL-2.0-with-lmbench-restriction"
  5. LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \
  6. file://COPYING-2;md5=8e9aee2ccc75d61d107e43794a25cdf9"
  7. inherit autotools-brokensep
  8. PR = "r2"
  9. SRC_URI = "${SOURCEFORGE_MIRROR}/lmbench/lmbench-${PV}.tgz \
  10. file://lmbench-run \
  11. file://rename-line-binary.patch \
  12. file://update-results-script.patch \
  13. file://obey-ranlib.patch \
  14. file://update-config-script.patch \
  15. file://use-base_libdir-instead-of-hardcoded-lib.patch \
  16. file://lmbench_result_html_report.patch \
  17. file://fix-lmbench-memory-check-failure.patch \
  18. "
  19. SRC_URI[md5sum] = "b3351a3294db66a72e2864a199d37cbf"
  20. SRC_URI[sha256sum] = "cbd5777d15f44eab7666dcac418054c3c09df99826961a397d9acf43d8a2a551"
  21. EXTRA_OEMAKE = 'CC="${CC}" AR="${AR}" RANLIB="${RANLIB}" CFLAGS="${CFLAGS}" \
  22. LDFLAGS="${LDFLAGS}" LD="${LD}" OS="${TARGET_SYS}" \
  23. TARGET="${TARGET_OS}" BASE="${prefix}" MANDIR="${mandir}"'
  24. do_configure() {
  25. :
  26. }
  27. do_compile () {
  28. . ${CONFIG_SITE}
  29. if [ X"$ac_cv_uint" = X"yes" ]; then
  30. CFLAGS="${CFLAGS} -DHAVE_uint"
  31. fi
  32. install -d ${S}/bin/${TARGET_SYS}
  33. oe_runmake -C src
  34. }
  35. do_install () {
  36. install -d ${D}${sysconfdir}/default/volatiles \
  37. ${D}${bindir} ${D}${mandir} ${D}${libdir}/lmbench \
  38. ${D}${datadir}/lmbench/scripts
  39. echo "d root root 0755 ${localstatedir}/run/${BPN} none" \
  40. > ${D}${sysconfdir}/default/volatiles/99_lmbench
  41. if ${@base_contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
  42. install -d ${D}${sysconfdir}/tmpfiles.d
  43. echo "d /run/${BPN} - - - -" \
  44. > ${D}${sysconfdir}/tmpfiles.d/lmbench.conf
  45. fi
  46. oe_runmake BASE="${D}${prefix}" MANDIR="${D}${mandir}" \
  47. -C src install
  48. mv ${D}${bindir}/line ${D}${bindir}/lm_line
  49. install -m 0755 ${WORKDIR}/lmbench-run ${D}${bindir}/
  50. sed -i -e 's,^SHAREDIR=.*$,SHAREDIR=${datadir}/${BPN},;' \
  51. -e 's,^BINDIR=.*$,BINDIR=${libdir}/${BPN},;' \
  52. -e 's,^CONFIG=.*$,CONFIG=`$SCRIPTSDIR/config`,;' \
  53. ${D}${bindir}/lmbench-run
  54. install -m 0755 ${S}/scripts/lmbench ${D}${bindir}
  55. install -m 0755 ${S}/scripts/* ${D}${datadir}/lmbench/scripts
  56. }
  57. pkg_postinst_${PN} () {
  58. if [ -z "$D" ]; then
  59. if command -v systemd-tmpfiles >/dev/null; then
  60. systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/lmbench.conf
  61. elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
  62. ${sysconfdir}/init.d/populate-volatile.sh update
  63. fi
  64. fi
  65. }
  66. RDEPENDS_${PN} = "perl"
  67. FILES_${PN} += "${datadir}/lmbench ${libdir}/lmbench"