summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2026-09-21 09:20:28 +0000
committerCoprDistGit <infra@openeuler.org>2026-09-21 09:20:28 +0000
commit6da05666629979f136c6dfdf2fe400b71e0f3797 (patch)
treecfc68c132f6927d58c40a66dfe7461495629f1df
parente7b2184552ac35b4ef578c07b60a2f31bdf150fd (diff)
automatic import of libmodbus-developeneuler24.03_LTS_SP3
-rw-r--r--.gitignore1
-rw-r--r--libmodbus-devel.spec74
-rw-r--r--sources1
3 files changed, 76 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..e2254ef 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/libmodbus-devel-3.2.0.tar.gz
diff --git a/libmodbus-devel.spec b/libmodbus-devel.spec
new file mode 100644
index 0000000..a7e87d1
--- /dev/null
+++ b/libmodbus-devel.spec
@@ -0,0 +1,74 @@
+# ---------------------------------------------------------------------------
+# 上游项目:libmodbus (https://github.com/stephane/libmodbus)
+#
+# 包名说明:libmodbus-devel 是 rosdep key "libmodbus-dev" 在 RHEL/openEuler 系的
+# 正确二进制名(rosdep base.yaml: fedora/rhel -> libmodbus-devel),由 ROS 包
+# at-sonde-ros-driver 声明(BuildRequires/Requires: libmodbus-devel)。
+# 上游项目自身名为 libmodbus(AC_INIT([libmodbus]),pkg-config 名 "modbus")。
+# 为使依赖名 libmodbus-devel 在 openEuler 官方源/ROS SIG/COPR 中有真实
+# provider,本 SRPM 以该名字构建:运行时共享库 + 开发文件同包交付,
+# 并额外 Provides: libmodbus 供运行期依赖方解析。
+#
+# topdir(源码解压后顶层目录;构建驱动 --transform 已统一为 <name>-<version>):
+# libmodbus-devel-3.2.0
+# ---------------------------------------------------------------------------
+
+Name: libmodbus-devel
+Version: 3.2.0
+Release: 1%{?dist}
+Summary: Modbus protocol library (runtime and development files)
+
+License: LGPL-2.1-or-later
+URL: https://github.com/stephane/libmodbus
+Source0: https://github.com/stephane/libmodbus/archive/refs/tags/v%{version}.tar.gz#/libmodbus-devel-%{version}.tar.gz
+
+BuildRequires: gcc
+BuildRequires: gcc-c++
+BuildRequires: make
+BuildRequires: autoconf
+BuildRequires: automake
+BuildRequires: libtool
+
+Provides: libmodbus = %{version}-%{release}
+
+%description
+libmodbus is a free software library to send/receive data with a device which
+respects the Modbus protocol. This library can use a serial port or an Ethernet
+connection.
+
+This package ships both the shared library (libmodbus.so.5) and the development
+files (C headers, pkg-config file and linker symlink) needed to build software
+against libmodbus. It provides the rosdep dependency "libmodbus-devel"
+(rosdep key libmodbus-dev) used by ROS packages such as at-sonde-ros-driver.
+
+%prep
+%autosetup -n %{name}-%{version}
+
+%build
+# 上游 git 归档不含生成的 configure 脚本,需先 autogen(等价于 ./autogen.sh)
+autoreconf -fiv
+%configure --disable-static --disable-tests
+%make_build
+
+%install
+%make_install
+# libtool 归档不属于本包
+find %{buildroot} -type f -name '*.la' -delete
+# 上游 dist_doc_DATA 安装到 %{_docdir}/libmodbus(取自 AC_INIT 包名),
+# 改由 %doc 宏按本包名安装,避免游离未打包文件
+rm -rf %{buildroot}%{_docdir}/libmodbus
+
+%ldconfig_scriptlets
+
+%files
+%license COPYING.LESSER
+%doc AUTHORS NEWS.md README.md
+%{_libdir}/libmodbus.so.*
+%{_libdir}/libmodbus.so
+%dir %{_includedir}/modbus
+%{_includedir}/modbus/*.h
+%{_libdir}/pkgconfig/libmodbus.pc
+
+%changelog
+* Mon Sep 21 2026 AI Importer <ai-importer@openeuler.org> - 3.2.0-1
+- Initial package for openEuler, built from upstream libmodbus v3.2.0
diff --git a/sources b/sources
new file mode 100644
index 0000000..b3dd137
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+8989929363a7209adb9c1ee2c5823284 libmodbus-devel-3.2.0.tar.gz