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: libwebsockets-devel
24 BuildRequires: openssl-devel
25 BuildRequires: p11-kit-devel
26 BuildRequires: python3 >= 1:3
27 BuildRequires: tpm2-pkcs11-devel
29 BuildRequires: python3-sphinx_rtd_theme
30 BuildRequires: sphinx-pdg >= 2
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 open62541 is an open source and free implementation of OPC UA (OPC
36 Unified Architecture) written in the common subset of the C99 and
37 C++98 languages. The library is usable with all major compilers and
38 provides the necessary tools to implement dedicated OPC UA clients and
39 servers, or to integrate OPC UA-based communication into existing
40 applications. open62541 library is platform independent. All
41 platform-specific functionality is implemented via exchangeable
42 plugins. Plugin implementations are provided for the major operating
45 %description -l pl.UTF-8
46 open62541 to wolnodostępna, otwarta implementacja OPC UA (OPC Unified
47 Architecture), napisana we wspólnym podzbiorze języków C99 i C++98.
48 Biblioteka jest używalna ze wszystkimi głównymi kompilatorami,
49 dostarcza narzędzia potrzebne do implementacji dedykowanych klientów i
50 serwerów OPC UA lub integracji komunikacji opartej o OPC UA w
51 istniejących aplikacjach. Biblioteka open62541 jest niezależna od
52 platformy. Zała funkcjonalność zależna od platformy jest
53 implementowana poprzez wymienne wtyczki. Implementacje wtyczek dla
54 wszystkich głównych systemów są dostarczone.
57 Summary: Header files for open62541 library
58 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki open62541
59 Group: Development/Libraries
60 Requires: %{name} = %{version}-%{release}
63 Header files for open62541 library.
65 %description devel -l pl.UTF-8
66 Pliki nagłówkowe biblioteki open62541.
69 Summary: API documentation for open62541 library
70 Summary(pl.UTF-8): Dokumentacja API biblioteki open62541
75 API documentation for open62541 library.
77 %description apidocs -l pl.UTF-8
78 Dokumentacja API biblioteki open62541.
89 %{__sed} -i -e '/check_add_.*-Wno-static-in-inline/d' CMakeLists.txt
91 %{__sed} -i -e '1s,/usr/bin/env python,%{__python},' \
93 tools/nodeset_compiler/nodeset_testing.py
95 %{__sed} -i -e '1s,/usr/bin/env python3,%{__python3},' \
96 tools/certs/create_self-signed.py \
97 tools/nodeset_compiler/nodeset_compiler.py
99 # not executable directly, drop shebangs
100 %{__sed} -i -e '1s,.*/usr/bin/env python.*,,' \
101 tools/nodeset_compiler/{backend_open62541,backend_open62541_nodes,datatypes,nodes,nodeset}.py
106 # tpm2 support needs pkcs11.h from tpm2-pkcs11, which is in fast p11-kit include file
107 CFLAGS="%{rpmcflags} -I/usr/include/p11-kit-1/p11-kit -Wno-error=maybe-uninitialized"
108 LDFLAGS="%{rpmldflags} -L%{_libdir}/pkcs11"
110 -DCMAKE_INSTALL_INCLUDEDIR=include \
111 -DCMAKE_INSTALL_LIBDIR=%{_lib} \
112 -DTPM2_LIB=%{_libdir}/pkcs11/libtpm2_pkcs11.so \
113 -DUA_BUILD_TOOLS=ON \
114 -DUA_ENABLE_DISCOVERY=ON \
115 -DUA_ENABLE_ENCRYPTION=MBEDTLS \
116 -DUA_ENABLE_ENCRYPTION_TPM2=ON \
117 -DUA_ENABLE_JSON_ENCODING=ON \
118 -DUA_ENABLE_PUBSUB=ON \
119 -DUA_ENABLE_PUBSUB_ENCRYPTION=ON \
120 -DUA_ENABLE_PUBSUB_ETH_UADP=ON \
121 -DUA_ENABLE_WEBSOCKET_SERVER=ON \
122 -DUA_MULTITHREADING=100
124 # -DUA_ENABLE_DISCOVERY_MULTICAST=ON requires deps/mdnsd
125 # -DUA_ENABLE_PUBSUB_MQTT requires deps/mqtt-c
126 # -DUA_NAMESPACE_ZERO=FULL requires deps/ua_nodeset
135 rm -rf $RPM_BUILD_ROOT
137 %{__make} -C build install \
138 DESTDIR=$RPM_BUILD_ROOT
141 %{__rm} $RPM_BUILD_ROOT%{_datadir}/open62541/tools/nodeset_compiler/nodeset_testing.py
144 rm -rf $RPM_BUILD_ROOT
146 %post -p /sbin/ldconfig
147 %postun -p /sbin/ldconfig
150 %defattr(644,root,root,755)
151 %doc AUTHORS CHANGELOG FEATURES.md README.md
152 %attr(755,root,root) %{_libdir}/libopen62541.so.*.*.*
153 %attr(755,root,root) %ghost %{_libdir}/libopen62541.so.1
154 %dir %{_datadir}/open62541
155 %dir %{_datadir}/open62541/tools
156 %attr(755,root,root) %{_datadir}/open62541/tools/generate_*.py
157 %dir %{_datadir}/open62541/tools/certs
158 %attr(755,root,root) %{_datadir}/open62541/tools/certs/create_self-signed.py
159 %{_datadir}/open62541/tools/certs/localhost.cnf
160 %dir %{_datadir}/open62541/tools/nodeset_compiler
161 %attr(755,root,root) %{_datadir}/open62541/tools/nodeset_compiler/nodeset_compiler.py
162 %{_datadir}/open62541/tools/nodeset_compiler/[!n]*.py
163 %{_datadir}/open62541/tools/nodeset_compiler/nodes.py
164 %{_datadir}/open62541/tools/nodeset_compiler/nodeset.py
165 %{_datadir}/open62541/tools/nodeset_compiler/__pycache__
166 %{_datadir}/open62541/tools/nodeset_compiler/NodeID_NS0_Base.txt
167 %doc %{_datadir}/open62541/tools/nodeset_compiler/README.md
168 %{_datadir}/open62541/tools/schema
171 %defattr(644,root,root,755)
172 %attr(755,root,root) %{_libdir}/libopen62541.so
173 %{_includedir}/open62541
174 %{_includedir}/aa_tree.h
175 %{_includedir}/ms_stdint.h
176 %{_includedir}/ziptree.h
177 %{_pkgconfigdir}/open62541.pc
178 %{_libdir}/cmake/open62541
182 %defattr(644,root,root,755)
183 %doc build/doc/{_images,_static,*.html,*.js}