%global sdk_version 1.15.2 Name: aws-iot-device-sdk-cpp-v2 Version: %{sdk_version} Release: 6%{?dist} Summary: AWS IoT Device SDK for C++ v2 License: Apache-2.0 URL: https://github.com/aws/aws-iot-device-sdk-cpp-v2 # Use the recursive tarball that includes all git submodules (aws-crt-cpp, # aws-c-common, aws-c-io, aws-c-mqtt, s2n-tls, aws-lc, etc.) # Generate with: # git clone --recursive --branch v%%{version} %%{url}.git aws-iot-device-sdk-cpp-v2-%%{version} # tar czf aws-iot-device-sdk-cpp-v2-%%{version}-full.tar.gz aws-iot-device-sdk-cpp-v2-%%{version} Source0: %{url}/archive/v%{version}/aws-iot-device-sdk-cpp-v2-%{version}.tar.gz # The SDK bundles the entire AWS Common Runtime (aws-crt-cpp and 13+ # aws-c-* / s2n / aws-lc libraries) via git submodules. These are not # available as individual Fedora packages, so we bundle them. # BUILD_DEPS=ON (the default) builds them all from the submodule sources. Provides: bundled(aws-crt-cpp) Provides: bundled(aws-c-common) Provides: bundled(aws-c-io) Provides: bundled(aws-c-cal) Provides: bundled(aws-c-auth) Provides: bundled(aws-c-compression) Provides: bundled(aws-c-http) Provides: bundled(aws-c-mqtt) Provides: bundled(aws-c-event-stream) Provides: bundled(aws-c-s3) Provides: bundled(aws-c-sdkutils) Provides: bundled(aws-c-iot) Provides: bundled(aws-checksums) Provides: bundled(aws-lc) Provides: bundled(s2n-tls) BuildRequires: cmake >= 3.9 BuildRequires: gcc-c++ BuildRequires: ninja-build BuildRequires: openssl-devel BuildRequires: perl-interpreter # The SDK requires all CRT submodules at build time. Since a plain GitHub # tarball does not include submodule contents, the build clones them. # If building offline, supply the -full tarball described above. %description The AWS IoT Device SDK for C++ v2 provides MQTT (v3.1.1 and v5) client functionality along with support for AWS IoT services including Device Shadow, Jobs, Device Defender, Secure Tunneling, and Greengrass IPC. This SDK is built on top of the AWS Common Runtime (aws-crt-cpp). %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description devel Header files and CMake configuration for developing applications that use the AWS IoT Device SDK for C++ v2. %prep %autosetup -n aws-iot-device-sdk-cpp-v2-%{version} # Strip -Werror from all bundled CRT libraries. # GCC 16 on Fedora rawhide flags new warnings (e.g., # -Wunused-but-set-variable in aws-lc crypto/x509/t_x509.c:321) and # -Werror turns them into fatal build errors. Remove -Werror broadly so # the build survives future compiler upgrades as well. find crt/ -name CMakeLists.txt -o -name '*.cmake' | \ xargs sed -i 's/-Werror//g' %build %cmake \ -GNinja \ -DCMAKE_BUILD_TYPE=Release \ -DBUILD_DEPS=ON \ -DBUILD_SAMPLES=OFF \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DCMAKE_INSTALL_LIBDIR=%{_libdir} \ -DBUILD_SHARED_LIBS=ON \ -DCMAKE_POLICY_VERSION_MINIMUM=3.5 %cmake_build %install %cmake_install # Remove any static libraries that may have been installed alongside shared find %{buildroot} -name '*.a' -delete # Remove bundled aws-lc OpenSSL-compatible headers that would conflict # with system openssl-devel rm -rf %{buildroot}%{_includedir}/openssl # Remove test headers that are not needed at runtime rm -rf %{buildroot}%{_includedir}/awstest %files %license LICENSE NOTICE %doc README.md %{_libdir}/lib*.so.* %files devel %{_includedir}/aws/ %{_includedir}/s2n.h %{_libdir}/lib*.so %{_libdir}/cmake/ # CRT components install cmake configs under per-component lib subdirs %{_libdir}/*/cmake/ %changelog * Wed Feb 11 2026 O3DE Package Maintainer - 1.15.2-6 - Remove unneeded awstest/ test headers from install * Wed Feb 11 2026 O3DE Package Maintainer - 1.15.2-5 - Remove non-existent s2n/ include directory from files list * Wed Feb 11 2026 O3DE Package Maintainer - 1.15.2-4 - Fix unpackaged files: add CRT cmake config dirs and s2n headers - Remove bundled aws-lc openssl headers that conflict with system openssl-devel * Wed Feb 11 2026 O3DE Package Maintainer - 1.15.2-3 - Strip -Werror from all bundled CRT cmake files to fix FTBFS with GCC 16 (unused-but-set-variable error in aws-lc crypto/x509/t_x509.c) * Wed Feb 11 2026 O3DE Package Maintainer - 1.15.2-1 - Initial RPM package of AWS IoT Device SDK for C++ v2 - Version 1.15.2 for O3DE compatibility - Bundles AWS Common Runtime dependencies (aws-crt-cpp, aws-c-*, s2n-tls, aws-lc)