# topdir: libnanopb-dev-0.4.9.2 # Self-provides cmake(Nanopb): the installed nanopb-config.cmake makes # find_package(Nanopb) work for downstream consumers. find_package(Nanopb) # seen by the dependency scanner only comes from examples/ and build-tests/ # (consumer CMakeLists), never from the library's own build. %global debug_package %{nil} Name: libnanopb-dev Version: 0.4.9.2 Release: 2%{?dist} Summary: Protocol Buffers for embedded systems - development files License: Zlib URL: https://github.com/nanopb/nanopb Source0: https://github.com/nanopb/nanopb/archive/0f6d088e777a33dd7b54297f137ef10d745c5da8.tar.gz#/libnanopb-dev-%{version}.tar.gz Group: Development/Libraries Packager: openEuler Builder BuildRequires: cmake BuildRequires: gcc BuildRequires: make BuildRequires: protobuf-compiler BuildRequires: python3-devel Requires: python3 Requires: python3-protobuf Requires: protobuf-compiler # This package installs nanopb-config.cmake, so it provides the cmake(Nanopb) # capability that downstream find_package(Nanopb) consumers look for. 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 contains the C runtime headers, the static library (libprotobuf-nanopb.a), the CMake integration files (nanopb-config.cmake) and the nanopb code generator, which converts .proto definitions into .pb.c/.pb.h source files. %prep %autosetup -n %{name}-%{version} %build %cmake \ -DBUILD_SHARED_LIBS=OFF \ -DBUILD_STATIC_LIBS=ON \ -Dnanopb_BUILD_RUNTIME=ON \ -Dnanopb_BUILD_GENERATOR=ON \ -DPython_EXECUTABLE=%{_bindir}/python3 # This chroot's %cmake performs an in-source build (writes Makefile into the # source tree) while %cmake_build expects an out-of-source dir named # %{_vpath_builddir} (aarch64-openEuler-linux-gnu) -> "is not a directory". # %make_build / %make_install run against the in-source Makefile that %cmake # actually generated, sidestepping the mismatched cmake-macros pair. %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 * Wed Sep 23 2026 openEuler Builder - 0.4.9.2-2 - Fix %build: use %make_build/%make_install against %cmake in-source Makefile (chroot's %cmake_build expects absent out-of-source dir) * Wed Sep 23 2026 openEuler Builder - 0.4.9.2-1 - Initial package for openEuler