# topdir: libnanopb-dev-0.4.9.2 (set by --transform in build driver) # Self-provision note: cmake(Nanopb)/cmake(nanopb) is PROVIDED by this package # (via extra/nanopb-config.cmake installed to %%{_libdir}/cmake/nanopb/), NOT required. # The find_package(Nanopb) calls in source exist only in extra/FindNanopb.cmake # (the find-module this package ships for consumers), build-tests/ and examples/ # (not built with -DBUILD_TESTING=OFF). Root CMakeLists.txt never calls it. # Disable debuginfo subpackage: this package ships only a static library # (libprotobuf-nanopb.a), header files, CMake config files and Python scripts. # There are no ELF executables or shared libraries, so find-debuginfo produces # an empty debugfiles.list and rpmbuild fails with "Empty %files file". %global debug_package %{nil} Name: libnanopb-dev Version: 0.4.9.2 Release: 3%{?dist} Summary: Protocol Buffers library for embedded systems - development files License: Zlib URL: https://github.com/nanopb/nanopb Source0: https://github.com/nanopb/nanopb/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz Group: Development/Libraries Packager: openEuler Builder BuildRequires: cmake BuildRequires: gcc BuildRequires: make BuildRequires: protobuf-compiler BuildRequires: python3 Requires: protobuf-compiler Requires: python3-protobuf # This package provides the CMake package 'nanopb' (config-mode) and the # legacy find-module, so advertise them to satisfy cmake(Nanopb) consumers. Provides: cmake(Nanopb) = %{version}-%{release} Provides: cmake(nanopb) = %{version}-%{release} %description Nanopb is a small code-size Protocol Buffers implementation in ANSI C. It is especially suitable for use in microcontrollers, but fits any memory restricted system. This package provides the C runtime static library (libprotobuf-nanopb.a), header files, CMake integration files, and the Python-based code generator (protoc plugin) used to compile .proto definitions into nanopb C source. %prep %autosetup -n %{name}-%{version} -p1 %build %cmake \ -DBUILD_SHARED_LIBS=OFF \ -DBUILD_STATIC_LIBS=ON \ -DBUILD_TESTING=OFF \ -Dnanopb_BUILD_RUNTIME=ON \ -Dnanopb_BUILD_GENERATOR=ON \ -Dnanopb_PYTHON_INSTDIR_OVERRIDE=%{python3_sitelib} %make_build %install %make_install %files %license LICENSE.txt %doc README.md AUTHORS.txt CHANGELOG.txt %{_includedir}/nanopb/ %{_libdir}/libprotobuf-nanopb.a %{_libdir}/cmake/nanopb/ %{_bindir}/nanopb_generator %{_bindir}/nanopb_generator.py %{_bindir}/protoc-gen-nanopb %{python3_sitelib}/nanopb/ %changelog * Mon Sep 28 2026 openEuler Builder - 0.4.9.2-3 - Disable debuginfo subpackage via %%global debug_package %%{nil} (package ships only static lib + Python scripts + headers, no ELF binaries => find-debuginfo produces empty debugfiles.list => "Empty %%files file") * Mon Sep 28 2026 openEuler Builder - 0.4.9.2-2 - Fix %build: replace %cmake_build/%cmake_install with %make_build/%make_install (%cmake macro runs in-place but %cmake_build expects %{_target_platform} dir) - Add %{_bindir}/nanopb_generator.py to %files (installed by cmake, was missing) * Mon Sep 28 2026 openEuler Builder - 0.4.9.2-1 - Initial package