diff options
Diffstat (limited to 'meta-openembedded/meta-networking/recipes-support/netperf')
-rw-r--r-- | meta-openembedded/meta-networking/recipes-support/netperf/files/netserver.service | 9 | ||||
-rw-r--r-- | meta-openembedded/meta-networking/recipes-support/netperf/netperf_git.bb | 25 |
2 files changed, 23 insertions, 11 deletions
diff --git a/meta-openembedded/meta-networking/recipes-support/netperf/files/netserver.service b/meta-openembedded/meta-networking/recipes-support/netperf/files/netserver.service new file mode 100644 index 000000000..0876a0d22 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-support/netperf/files/netserver.service @@ -0,0 +1,9 @@ +[Unit] +Description=Netperf Benchmark Server +After=network.target + +[Service] +ExecStart=/usr/sbin/netserver -D + +[Install] +WantedBy=multi-user.target diff --git a/meta-openembedded/meta-networking/recipes-support/netperf/netperf_git.bb b/meta-openembedded/meta-networking/recipes-support/netperf/netperf_git.bb index a084fb4c1..724869b60 100644 --- a/meta-openembedded/meta-networking/recipes-support/netperf/netperf_git.bb +++ b/meta-openembedded/meta-networking/recipes-support/netperf/netperf_git.bb @@ -2,9 +2,8 @@ SUMMARY = "A networking benchmarking tool" DESCRIPTION = "Network performance benchmark including tests for TCP, UDP, sockets, ATM and more." SECTION = "net" HOMEPAGE = "http://www.netperf.org/" -LICENSE = "netperf" -LICENSE_FLAGS = "non-commercial" -LIC_FILES_CHKSUM = "file://COPYING;md5=a0ab17253e7a3f318da85382c7d5d5d6" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=e661ab33a2a71ad6652c178dedf8aaa2" PV = "2.7.0+git${SRCPV}" @@ -12,22 +11,23 @@ SRC_URI = "git://github.com/HewlettPackard/netperf.git \ file://cpu_set.patch \ file://vfork.patch \ file://init \ + file://netserver.service \ file://0001-netlib.c-Move-including-sched.h-out-og-function.patch \ file://0001-nettest_omni-Remove-duplicate-variable-definitions.patch \ " -SRCREV = "f482bab49fcedee46fc5b755da127f608325cd13" +SRCREV = "3bc455b23f901dae377ca0a558e1e32aa56b31c4" S = "${WORKDIR}/git" -inherit update-rc.d autotools texinfo +inherit update-rc.d autotools texinfo systemd # cpu_set.patch plus _GNU_SOURCE makes src/netlib.c compile with CPU_ macros -CFLAGS_append = " -DDO_UNIX -DDO_IPV6 -D_GNU_SOURCE" +CFLAGS:append = " -DDO_UNIX -DDO_IPV6 -D_GNU_SOURCE" # set the "_FILE_OFFSET_BITS" preprocessor symbol to 64 to support files # larger than 2GB -CFLAGS_append = "${@bb.utils.contains('DISTRO_FEATURES', 'largefile', \ +CFLAGS:append = "${@bb.utils.contains('DISTRO_FEATURES', 'largefile', \ ' -D_FILE_OFFSET_BITS=64', '', d)}" PACKAGECONFIG ??= "" @@ -37,14 +37,16 @@ PACKAGECONFIG[histogram] = "--enable-histogram,--disable-histogram,," # autotools.bbclass attends to include m4 files with path depth <= 2 by # "find ${S} -maxdepth 2 -name \*.m4", so move m4 files from m4/m4. -do_configure_prepend() { +do_configure:prepend() { test -d ${S}/m4/m4 && mv -f ${S}/m4/m4 ${S}/m4-files } do_install() { sed -e 's#/usr/sbin/#${sbindir}/#g' -i ${WORKDIR}/init - - install -d ${D}${sbindir} ${D}${bindir} ${D}${sysconfdir}/init.d + install -d ${D}${sbindir} ${D}${bindir} ${D}${sysconfdir}/init.d ${D}${systemd_system_unitdir} + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + sed -e 's#/usr/sbin/#${sbindir}/#g' ${WORKDIR}/netserver.service > ${D}${systemd_system_unitdir}/netserver.service + fi install -m 4755 src/netperf ${D}${bindir} install -m 4755 src/netserver ${D}${sbindir} install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/netperf @@ -65,7 +67,8 @@ do_install() { install -m 0644 ${S}/doc/netperf_old.ps ${D}${docdir}/netperf } -RRECOMMENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'sctp', 'kernel-module-sctp', '', d)}" +RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'sctp', 'kernel-module-sctp', '', d)}" INITSCRIPT_NAME="netperf" INITSCRIPT_PARAMS="defaults" +SYSTEMD_SERVICE:${PN} = "netserver.service" |