diff options
Diffstat (limited to 'meta-networking/recipes-support/netperf')
| -rw-r--r-- | meta-networking/recipes-support/netperf/files/netserver.service | 9 | ||||
| -rw-r--r-- | meta-networking/recipes-support/netperf/netperf_git.bb | 12 |
2 files changed, 17 insertions, 4 deletions
diff --git a/meta-networking/recipes-support/netperf/files/netserver.service b/meta-networking/recipes-support/netperf/files/netserver.service new file mode 100644 index 0000000000..0876a0d223 --- /dev/null +++ b/meta-networking/recipes-support/netperf/files/netserver.service | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | [Unit] | ||
| 2 | Description=Netperf Benchmark Server | ||
| 3 | After=network.target | ||
| 4 | |||
| 5 | [Service] | ||
| 6 | ExecStart=/usr/sbin/netserver -D | ||
| 7 | |||
| 8 | [Install] | ||
| 9 | WantedBy=multi-user.target | ||
diff --git a/meta-networking/recipes-support/netperf/netperf_git.bb b/meta-networking/recipes-support/netperf/netperf_git.bb index 9d1e8df8e8..72efcb4f8a 100644 --- a/meta-networking/recipes-support/netperf/netperf_git.bb +++ b/meta-networking/recipes-support/netperf/netperf_git.bb | |||
| @@ -3,7 +3,7 @@ DESCRIPTION = "Network performance benchmark including tests for TCP, UDP, socke | |||
| 3 | SECTION = "net" | 3 | SECTION = "net" |
| 4 | HOMEPAGE = "http://www.netperf.org/" | 4 | HOMEPAGE = "http://www.netperf.org/" |
| 5 | LICENSE = "MIT" | 5 | LICENSE = "MIT" |
| 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=a0ab17253e7a3f318da85382c7d5d5d6" | 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=e661ab33a2a71ad6652c178dedf8aaa2" |
| 7 | 7 | ||
| 8 | PV = "2.7.0+git${SRCPV}" | 8 | PV = "2.7.0+git${SRCPV}" |
| 9 | 9 | ||
| @@ -11,6 +11,7 @@ SRC_URI = "git://github.com/HewlettPackard/netperf.git \ | |||
| 11 | file://cpu_set.patch \ | 11 | file://cpu_set.patch \ |
| 12 | file://vfork.patch \ | 12 | file://vfork.patch \ |
| 13 | file://init \ | 13 | file://init \ |
| 14 | file://netserver.service \ | ||
| 14 | file://0001-netlib.c-Move-including-sched.h-out-og-function.patch \ | 15 | file://0001-netlib.c-Move-including-sched.h-out-og-function.patch \ |
| 15 | file://0001-nettest_omni-Remove-duplicate-variable-definitions.patch \ | 16 | file://0001-nettest_omni-Remove-duplicate-variable-definitions.patch \ |
| 16 | " | 17 | " |
| @@ -19,7 +20,7 @@ SRCREV = "3bc455b23f901dae377ca0a558e1e32aa56b31c4" | |||
| 19 | 20 | ||
| 20 | S = "${WORKDIR}/git" | 21 | S = "${WORKDIR}/git" |
| 21 | 22 | ||
| 22 | inherit update-rc.d autotools texinfo | 23 | inherit update-rc.d autotools texinfo systemd |
| 23 | 24 | ||
| 24 | # cpu_set.patch plus _GNU_SOURCE makes src/netlib.c compile with CPU_ macros | 25 | # 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 | CFLAGS_append = " -DDO_UNIX -DDO_IPV6 -D_GNU_SOURCE" |
| @@ -42,8 +43,10 @@ do_configure_prepend() { | |||
| 42 | 43 | ||
| 43 | do_install() { | 44 | do_install() { |
| 44 | sed -e 's#/usr/sbin/#${sbindir}/#g' -i ${WORKDIR}/init | 45 | sed -e 's#/usr/sbin/#${sbindir}/#g' -i ${WORKDIR}/init |
| 45 | 46 | install -d ${D}${sbindir} ${D}${bindir} ${D}${sysconfdir}/init.d ${D}${systemd_system_unitdir} | |
| 46 | install -d ${D}${sbindir} ${D}${bindir} ${D}${sysconfdir}/init.d | 47 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then |
| 48 | sed -e 's#/usr/sbin/#${sbindir}/#g' ${WORKDIR}/netserver.service > ${D}${systemd_system_unitdir}/netserver.service | ||
| 49 | fi | ||
| 47 | install -m 4755 src/netperf ${D}${bindir} | 50 | install -m 4755 src/netperf ${D}${bindir} |
| 48 | install -m 4755 src/netserver ${D}${sbindir} | 51 | install -m 4755 src/netserver ${D}${sbindir} |
| 49 | install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/netperf | 52 | install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/netperf |
| @@ -68,3 +71,4 @@ RRECOMMENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'sctp', 'kernel-modu | |||
| 68 | 71 | ||
| 69 | INITSCRIPT_NAME="netperf" | 72 | INITSCRIPT_NAME="netperf" |
| 70 | INITSCRIPT_PARAMS="defaults" | 73 | INITSCRIPT_PARAMS="defaults" |
| 74 | SYSTEMD_SERVICE_${PN} = "netserver.service" | ||
