lmbench_3.0-a9.bb 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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 update-alternatives
  8. DEPENDS += "libtirpc"
  9. CFLAGS += "-I${STAGING_INCDIR}/tirpc"
  10. LDLIBS += " -ltirpc "
  11. PR = "r2"
  12. SRC_URI = "${SOURCEFORGE_MIRROR}/lmbench/lmbench-${PV}.tgz \
  13. file://lmbench-run \
  14. file://rename-line-binary.patch \
  15. file://update-results-script.patch \
  16. file://obey-ranlib.patch \
  17. file://update-config-script.patch \
  18. file://lmbench_result_html_report.patch \
  19. file://fix-lmbench-memory-check-failure.patch \
  20. file://0001-avoid-gcc-optimize-away-the-loops.patch \
  21. file://0001-lat_http.c-Add-printf-format.patch \
  22. file://0001-Check-for-musl-define-guard-before-redefining-sockle.patch \
  23. file://0002-build-Adjust-CFLAGS-LDFLAGS-to-append-values-passed-.patch \
  24. file://0001-src-Makefile-use-libdir-instead-of-hardcoded-lib.patch \
  25. "
  26. SRC_URI[md5sum] = "b3351a3294db66a72e2864a199d37cbf"
  27. SRC_URI[sha256sum] = "cbd5777d15f44eab7666dcac418054c3c09df99826961a397d9acf43d8a2a551"
  28. UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/lmbench/files/development/"
  29. UPSTREAM_CHECK_REGEX = "lmbench-(?P<pver>\d+(\.\d+)+-[a-z]+\d+)"
  30. EXTRA_OEMAKE = 'CC="${CC}" AR="${AR}" RANLIB="${RANLIB}" CFLAGS="${CFLAGS}" \
  31. LDFLAGS="${LDFLAGS}" LDLIBS="${LDLIBS}" LD="${LD}" OS="${TARGET_SYS}" \
  32. TARGET="${TARGET_OS}" BASE="${prefix}" MANDIR="${mandir}"'
  33. do_configure() {
  34. :
  35. }
  36. do_compile () {
  37. for CONFIG_SITE_ITEM in $CONFIG_SITE; do
  38. . $CONFIG_SITE_ITEM
  39. done
  40. if [ X"$ac_cv_uint" = X"yes" ]; then
  41. CFLAGS="${CFLAGS} -DHAVE_uint"
  42. fi
  43. install -d ${S}/bin/${TARGET_SYS}
  44. oe_runmake -C src
  45. }
  46. do_install () {
  47. install -d ${D}${sysconfdir}/default/volatiles \
  48. ${D}${bindir} ${D}${mandir} \
  49. ${D}${datadir}/lmbench/scripts
  50. echo "d root root 0755 ${localstatedir}/run/${BPN} none" \
  51. > ${D}${sysconfdir}/default/volatiles/99_lmbench
  52. if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
  53. install -d ${D}${sysconfdir}/tmpfiles.d
  54. echo "d /run/${BPN} - - - -" \
  55. > ${D}${sysconfdir}/tmpfiles.d/lmbench.conf
  56. fi
  57. oe_runmake BASE="${D}${prefix}" MANDIR="${D}${mandir}" \
  58. DESTDIR="${D}" \
  59. -C src install
  60. mv ${D}${bindir}/line ${D}${bindir}/lm_line
  61. install -m 0755 ${WORKDIR}/lmbench-run ${D}${bindir}/
  62. sed -i -e 's,^SHAREDIR=.*$,SHAREDIR=${datadir}/${BPN},;' \
  63. -e 's,^CONFIG=.*$,CONFIG=`$SCRIPTSDIR/config`,;' \
  64. ${D}${bindir}/lmbench-run
  65. install -m 0755 ${S}/scripts/lmbench ${D}${bindir}
  66. install -m 0755 ${S}/scripts/* ${D}${datadir}/lmbench/scripts
  67. }
  68. pkg_postinst_${PN} () {
  69. if [ -z "$D" ]; then
  70. if command -v systemd-tmpfiles >/dev/null; then
  71. systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/lmbench.conf
  72. elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
  73. ${sysconfdir}/init.d/populate-volatile.sh update
  74. fi
  75. fi
  76. }
  77. RDEPENDS_${PN} = "perl"
  78. FILES_${PN} += "${datadir}/lmbench"
  79. ALTERNATIVE_${PN} = "stream"
  80. ALTERNATIVE_LINK_NAME[stream] = "${bindir}/stream"