Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 1 | SUMMARY = "A networking benchmarking tool" |
| 2 | DESCRIPTION = "Network performance benchmark including tests for TCP, UDP, sockets, ATM and more." |
| 3 | SECTION = "net" |
| 4 | HOMEPAGE = "http://www.netperf.org/" |
| 5 | LICENSE = "netperf" |
| 6 | LICENSE_FLAGS = "non-commercial" |
| 7 | LIC_FILES_CHKSUM = "file://COPYING;md5=a0ab17253e7a3f318da85382c7d5d5d6" |
| 8 | |
| 9 | PV = "2.7.0+git${SRCPV}" |
| 10 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 11 | SRC_URI = "git://github.com/HewlettPackard/netperf.git \ |
| 12 | file://cpu_set.patch \ |
| 13 | file://vfork.patch \ |
| 14 | file://init \ |
| 15 | file://0001-netlib.c-Move-including-sched.h-out-og-function.patch \ |
| 16 | " |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 17 | |
| 18 | SRCREV = "f482bab49fcedee46fc5b755da127f608325cd13" |
| 19 | |
| 20 | S = "${WORKDIR}/git" |
| 21 | |
| 22 | inherit update-rc.d autotools |
| 23 | |
| 24 | # cpu_set.patch plus _GNU_SOURCE makes src/netlib.c compile with CPU_ macros |
| 25 | CFLAGS_append = " -DDO_UNIX -DDO_IPV6 -D_GNU_SOURCE" |
| 26 | |
| 27 | # set the "_FILE_OFFSET_BITS" preprocessor symbol to 64 to support files |
| 28 | # larger than 2GB |
| 29 | CFLAGS_append = "${@bb.utils.contains('DISTRO_FEATURES', 'largefile', \ |
| 30 | ' -D_FILE_OFFSET_BITS=64', '', d)}" |
| 31 | |
| 32 | PACKAGECONFIG ??= "" |
| 33 | PACKAGECONFIG[sctp] = "--enable-sctp,--disable-sctp,lksctp-tools," |
| 34 | |
| 35 | # autotools.bbclass attends to include m4 files with path depth <= 2 by |
| 36 | # "find ${S} -maxdepth 2 -name \*.m4", so move m4 files from m4/m4. |
| 37 | do_configure_prepend() { |
| 38 | test -d ${S}/m4/m4 && mv -f ${S}/m4/m4 ${S}/m4-files |
| 39 | } |
| 40 | |
| 41 | do_install() { |
| 42 | sed -e 's#/usr/sbin/#${sbindir}/#g' -i ${WORKDIR}/init |
| 43 | |
| 44 | install -d ${D}${sbindir} ${D}${bindir} ${D}${sysconfdir}/init.d |
| 45 | install -m 4755 src/netperf ${D}${bindir} |
| 46 | install -m 4755 src/netserver ${D}${sbindir} |
| 47 | install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/netperf |
| 48 | |
| 49 | # man |
| 50 | install -d ${D}${mandir}/man1/ |
| 51 | install -m 0644 ${S}/doc/netserver.man ${D}${mandir}/man1/netserver.1 |
| 52 | install -m 0644 ${S}/doc/netperf.man ${D}${mandir}/man1/netperf.1 |
| 53 | |
| 54 | # move scripts to examples directory |
| 55 | install -d ${D}${docdir}/netperf/examples |
| 56 | install -m 0644 ${S}/doc/examples/*_script ${D}${docdir}/netperf/examples/ |
| 57 | |
| 58 | # docs .. |
| 59 | install -m 0644 ${S}/COPYING ${D}${docdir}/netperf |
| 60 | install -m 0644 ${S}/Release_Notes ${D}${docdir}/netperf |
| 61 | install -m 0644 ${S}/README ${D}${docdir}/netperf |
| 62 | install -m 0644 ${S}/doc/netperf_old.ps ${D}${docdir}/netperf |
| 63 | } |
| 64 | |
| 65 | RRECOMMENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'sctp', 'kernel-module-sctp', '', d)}" |
| 66 | |
| 67 | INITSCRIPT_NAME="netperf" |
| 68 | INITSCRIPT_PARAMS="defaults" |