Skip to content

Commit e2c610b

Browse files
committed
feat: build p-net from binary library
1 parent 8831abb commit e2c610b

File tree

3 files changed

+57
-45
lines changed

3 files changed

+57
-45
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
SUMMARY = "P-Net Profinet communication stack"
2+
HOMEPAGE = "https://github.com/rtlabs-com/p-net"
3+
LICENSE = "GPLv3"
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).*-linux"
9+
10+
SRC_URI = "https://github.com/rtlabs-com/p-net/releases/download/public%2Fv${PV}/p-net-${PV}-Linux-x86_64.zip"
11+
SRC_URI[sha256sum] = "58f3e1e0a645bf3ca83232f2ec1d605d3fea7fbe114fe530ab2dc98ae3c950c5"
12+
13+
S = "${WORKDIR}/p-net-${PV}-Linux-x86_64"
14+
15+
ARCH_DIR:x86-64 = "build-x86_64"
16+
17+
INSANE_SKIP:${PN} = "ldflags"
18+
INHIBIT_PACKAGE_STRIP = "1"
19+
INHIBIT_SYSROOT_STRIP = "1"
20+
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
21+
22+
FILES:${PN} += " \
23+
${prefix}/cmake/*.cmake \
24+
"
25+
26+
SYSROOT_DIRS += "${prefix}/cmake"
27+
28+
do_install () {
29+
install -d ${D}${libdir}
30+
install -m 0755 ${S}/lib/* ${D}${libdir}
31+
32+
install -d ${D}${includedir}
33+
install -m 0755 ${S}/include/*.h ${D}${includedir}
34+
35+
install -d ${D}${includedir}/sys
36+
install -m 0755 ${S}/include/sys/*.h ${D}${includedir}/sys
37+
38+
install -d ${D}${bindir}
39+
install -m 0755 ${S}/bin/* ${D}${bindir}
40+
41+
install -d ${D}${prefix}
42+
install -d ${D}${prefix}/cmake
43+
install -m 0755 ${S}/cmake/*.cmake ${D}${prefix}/cmake
44+
}
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 = "GPLv3"
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)