diff options
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | libnanopb-dev.spec | 70 | ||||
| -rw-r--r-- | sources | 1 |
3 files changed, 72 insertions, 0 deletions
@@ -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..8088df2 --- /dev/null +++ b/libnanopb-dev.spec @@ -0,0 +1,70 @@ +# 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. + +Name: libnanopb-dev +Version: 0.4.9.2 +Release: 1%{?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 <builder@openeuler.org> + +BuildRequires: cmake +BuildRequires: gcc +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} +%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}/protoc-gen-nanopb +%{python3_sitelib}/nanopb/ + +%changelog +* Mon Sep 28 2026 openEuler Builder <builder@openeuler.org> - 0.4.9.2-1 +- Initial package @@ -0,0 +1 @@ +9bfd8866832bf9fa4fb7535c9a484e05 libnanopb-dev-0.4.9.2.tar.gz |
