Skip to content

Commit 19331dc

Browse files
committed
feat: build p-net from binary library
This allow us to build p-net from releases instead of source code which i useful for evaluation.
1 parent 8831abb commit 19331dc

File tree

3 files changed

+65
-45
lines changed

3 files changed

+65
-45
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
SUMMARY = "P-Net Profinet communication stack"
2+
HOMEPAGE = "https://github.com/rtlabs-com/p-net"
3+
LICENSE = "GPL-3.0-or-later"
4+
LIC_FILES_CHKSUM = "file://include/pnet_api.h;beginline=1;endline=14;md5=9613aac56556c534a901f25038170285"
5+
SECTION = "libs"
6+
PROVIDES = "p-net"
7+
8+
COMPATIBLE_HOST = "(x86_64|aarch64).*-linux"
9+
10+
_SRC_CHECKSUM:x86-64 = "58f3e1e0a645bf3ca83232f2ec1d605d3fea7fbe114fe530ab2dc98ae3c950c5"
11+
_SRC_CHECKSUM:aarch64 = "e1f928b5ec66e80c5b2a589fc42d8a1a371c70d5ebc0d53f63a5cec2a6860ad8"
12+
_SRC_SUFFIX:x86-64 = "-Linux-x86_64"
13+
_SRC_SUFFIX:aarch64 = "-Linux-aarch64"
14+
15+
SRC_URI = "https://github.com/rtlabs-com/p-net/releases/download/public%2Fv${PV}/p-net-${PV}${_SRC_SUFFIX}.zip"
16+
SRC_URI[sha256sum] = "${_SRC_CHECKSUM}"
17+
S = "${WORKDIR}/p-net-${PV}${_SRC_SUFFIX}"
18+
19+
INSANE_SKIP:${PN} = "ldflags"
20+
INHIBIT_PACKAGE_STRIP = "1"
21+
INHIBIT_SYSROOT_STRIP = "1"
22+
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
23+
24+
FILES:${PN}-dev += " \
25+
${prefix}/cmake/*.cmake \
26+
"
27+
28+
FILES:${PN} += " \
29+
${prefix}/share/profinet \
30+
"
31+
32+
SYSROOT_DIRS += "${prefix}/cmake"
33+
34+
do_install () {
35+
install -d ${D}${libdir}
36+
install -m 0755 ${S}/lib/* ${D}${libdir}
37+
38+
install -d ${D}${includedir}
39+
install -m 0755 ${S}/include/*.h ${D}${includedir}
40+
41+
install -d ${D}${includedir}/sys
42+
install -m 0755 ${S}/include/sys/*.h ${D}${includedir}/sys
43+
44+
install -d ${D}${bindir}
45+
install -m 0755 ${S}/bin/* ${D}${bindir}
46+
47+
install -d ${D}${prefix}/cmake
48+
install -m 0755 ${S}/cmake/*.cmake ${D}${prefix}/cmake
49+
50+
install -d ${D}${prefix}/share/profinet
51+
install -m 0755 ${S}/share/profinet/* ${D}${prefix}/share/profinet
52+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
SUMMARY = "P-Net Profinet communication stack - Samples"
2+
LICENSE = "GPL-3.0-or-later"
3+
LIC_FILES_CHKSUM = "file://CMakeLists.txt;beginline=1;endline=14;md5=aa7e6f963fad674b02c35dc8e9aa5519"
4+
SECTION = "console/network"
5+
6+
DEPENDS = "p-net-eval"
7+
8+
SRC_URI = "https://github.com/rtlabs-com/p-net/releases/download/public%2Fv${PV}/p-net-${PV}-samples.zip"
9+
SRC_URI[sha256sum] = "8ce40738fa67bf04deb4f27938e6a70599526765ea6d8cf1a26b73395073d658"
10+
11+
S = "${WORKDIR}/p-net-${PV}-samples"
12+
13+
inherit pkgconfig cmake

recipes-connectivity/p-net/p-net.bb

Lines changed: 0 additions & 45 deletions
This file was deleted.

0 commit comments

Comments
 (0)