4 %bcond_without apidocs # API documentation
6 Summary: Open source C implementation of OPC UA
7 Summary(pl.UTF-8): Mająca otwarte źródła, napisana w C implementacja OPC UA
13 #Source0Download: https://github.com/open62541/open62541/releases
14 Source0: https://github.com/open62541/open62541/archive/v%{version}/%{name}-%{version}.tar.gz
15 # Source0-md5: 5a0ad259c1239221dea21e33815284d6
16 Patch0: %{name}-types.patch
17 Patch1: %{name}-bpf.patch
18 Patch2: %{name}-libwebsockets4.patch
19 Patch3: %{name}-visibility.patch
20 Patch4: %{name}-rpath.patch
21 URL: http://www.open62541.org/
22 BuildRequires: cmake >= 3.0
23 BuildRequires: libbpf-devel
24 BuildRequires: libwebsockets-devel
25 BuildRequires: libxdp-devel
26 BuildRequires: openssl-devel
27 BuildRequires: p11-kit-devel
28 BuildRequires: python3 >= 1:3
29 BuildRequires: tpm2-pkcs11-devel
31 BuildRequires: python3-sphinx_rtd_theme
32 BuildRequires: sphinx-pdg >= 2
34 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 open62541 is an open source and free implementation of OPC UA (OPC
38 Unified Architecture) written in the common subset of the C99 and
39 C++98 languages. The library is usable with all major compilers and
40 provides the necessary tools to implement dedicated OPC UA clients and
41 servers, or to integrate OPC UA-based communication into existing
42 applications. open62541 library is platform independent. All
43 platform-specific functionality is implemented via exchangeable
44 plugins. Plugin implementations are provided for the major operating
47 %description -l pl.UTF-8
48 open62541 to wolnodostępna, otwarta implementacja OPC UA (OPC Unified
49 Architecture), napisana we wspólnym podzbiorze języków C99 i C++98.
50 Biblioteka jest używalna ze wszystkimi głównymi kompilatorami,
51 dostarcza narzędzia potrzebne do implementacji dedykowanych klientów i
52 serwerów OPC UA lub integracji komunikacji opartej o OPC UA w
53 istniejących aplikacjach. Biblioteka open62541 jest niezależna od
54 platformy. Zała funkcjonalność zależna od platformy jest
55 implementowana poprzez wymienne wtyczki. Implementacje wtyczek dla
56 wszystkich głównych systemów są dostarczone.
59 Summary: Header files for open62541 library
60 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki open62541
61 Group: Development/Libraries
62 Requires: %{name} = %{version}-%{release}
65 Header files for open62541 library.
67 %description devel -l pl.UTF-8
68 Pliki nagłówkowe biblioteki open62541.
71 Summary: API documentation for open62541 library
72 Summary(pl.UTF-8): Dokumentacja API biblioteki open62541
77 API documentation for open62541 library.
79 %description apidocs -l pl.UTF-8
80 Dokumentacja API biblioteki open62541.
91 %{__sed} -i -e '/check_add_.*-Wno-static-in-inline/d' CMakeLists.txt
93 %{__sed} -i -e '1s,/usr/bin/env python,%{__python},' \
95 tools/nodeset_compiler/nodeset_testing.py
97 %{__sed} -i -e '1s,/usr/bin/env python3,%{__python3},' \
98 tools/certs/create_self-signed.py \
99 tools/nodeset_compiler/nodeset_compiler.py
101 # not executable directly, drop shebangs
102 %{__sed} -i -e '1s,.*/usr/bin/env python.*,,' \
103 tools/nodeset_compiler/{backend_open62541,backend_open62541_nodes,datatypes,nodes,nodeset}.py
108 # tpm2 support needs pkcs11.h from tpm2-pkcs11, which is in fast p11-kit include file
109 CFLAGS="%{rpmcflags} -I/usr/include/p11-kit-1/p11-kit -Wno-error=maybe-uninitialized"
110 LDFLAGS="%{rpmldflags} -L%{_libdir}/pkcs11"
112 -DCMAKE_INSTALL_INCLUDEDIR=include \
113 -DCMAKE_INSTALL_LIBDIR=%{_lib} \
114 -DTPM2_LIB=%{_libdir}/pkcs11/libtpm2_pkcs11.so \
115 -DUA_BUILD_TOOLS=ON \
116 -DUA_ENABLE_DISCOVERY=ON \
117 -DUA_ENABLE_ENCRYPTION=MBEDTLS \
118 -DUA_ENABLE_ENCRYPTION_TPM2=ON \
119 -DUA_ENABLE_JSON_ENCODING=ON \
120 -DUA_ENABLE_PUBSUB=ON \
121 -DUA_ENABLE_PUBSUB_ENCRYPTION=ON \
122 -DUA_ENABLE_PUBSUB_ETH_UADP=ON \
123 -DUA_ENABLE_WEBSOCKET_SERVER=ON \
124 -DUA_MULTITHREADING=100
126 # -DUA_ENABLE_DISCOVERY_MULTICAST=ON requires deps/mdnsd
127 # -DUA_ENABLE_PUBSUB_MQTT requires deps/mqtt-c
128 # -DUA_NAMESPACE_ZERO=FULL requires deps/ua_nodeset
137 rm -rf $RPM_BUILD_ROOT
139 %{__make} -C build install \
140 DESTDIR=$RPM_BUILD_ROOT
143 %{__rm} $RPM_BUILD_ROOT%{_datadir}/open62541/tools/nodeset_compiler/nodeset_testing.py
146 rm -rf $RPM_BUILD_ROOT
148 %post -p /sbin/ldconfig
149 %postun -p /sbin/ldconfig
152 %defattr(644,root,root,755)
153 %doc AUTHORS CHANGELOG FEATURES.md README.md
154 %attr(755,root,root) %{_libdir}/libopen62541.so.*.*.*
155 %attr(755,root,root) %ghost %{_libdir}/libopen62541.so.1
156 %dir %{_datadir}/open62541
157 %dir %{_datadir}/open62541/tools
158 %attr(755,root,root) %{_datadir}/open62541/tools/generate_*.py
159 %dir %{_datadir}/open62541/tools/certs
160 %attr(755,root,root) %{_datadir}/open62541/tools/certs/create_self-signed.py
161 %{_datadir}/open62541/tools/certs/localhost.cnf
162 %dir %{_datadir}/open62541/tools/nodeset_compiler
163 %attr(755,root,root) %{_datadir}/open62541/tools/nodeset_compiler/nodeset_compiler.py
164 %{_datadir}/open62541/tools/nodeset_compiler/[!n]*.py
165 %{_datadir}/open62541/tools/nodeset_compiler/nodes.py
166 %{_datadir}/open62541/tools/nodeset_compiler/nodeset.py
167 %{_datadir}/open62541/tools/nodeset_compiler/__pycache__
168 %{_datadir}/open62541/tools/nodeset_compiler/NodeID_NS0_Base.txt
169 %doc %{_datadir}/open62541/tools/nodeset_compiler/README.md
170 %{_datadir}/open62541/tools/schema
173 %defattr(644,root,root,755)
174 %attr(755,root,root) %{_libdir}/libopen62541.so
175 %{_includedir}/open62541
176 %{_includedir}/aa_tree.h
177 %{_includedir}/ms_stdint.h
178 %{_includedir}/ziptree.h
179 %{_pkgconfigdir}/open62541.pc
180 %{_libdir}/cmake/open62541
184 %defattr(644,root,root,755)
185 %doc build/doc/{_images,_static,*.html,*.js}