From f25eb833b9b15567d8d5a0ed2088c5046d69a07a Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Wed, 23 Sep 2026 14:10:11 +0000 Subject: automatic import of libnanopb-dev --- .gitignore | 1 + libnanopb-dev.spec | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 75 insertions(+) create mode 100644 libnanopb-dev.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..489c5cc 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/libnanopb-dev-0.4.9.2.tar.gz diff --git a/libnanopb-dev.spec b/libnanopb-dev.spec new file mode 100644 index 0000000..77903d6 --- /dev/null +++ b/libnanopb-dev.spec @@ -0,0 +1,73 @@ +# 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: 1%{?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 +%cmake_build + +%install +%cmake_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-1 +- Initial package for openEuler diff --git a/sources b/sources new file mode 100644 index 0000000..67044c4 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +1f510192222702be8cebe46555ec2427 libnanopb-dev-0.4.9.2.tar.gz -- cgit v1.2.3