summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2026-09-28 08:42:41 +0000
committerCoprDistGit <infra@openeuler.org>2026-09-28 08:42:41 +0000
commit1a1742ec185f63ac424475018970280242b62ae4 (patch)
tree89be5ca545654104945ff3923bad83cae2afa40b
parent259858c638d55f741717fd894b7dc12d50427f1e (diff)
automatic import of libnanopb-dev
-rw-r--r--.gitignore1
-rw-r--r--libnanopb-dev.spec70
-rw-r--r--sources1
3 files changed, 72 insertions, 0 deletions
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..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
diff --git a/sources b/sources
new file mode 100644
index 0000000..6cf27a3
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+9bfd8866832bf9fa4fb7535c9a484e05 libnanopb-dev-0.4.9.2.tar.gz