blob: 0c4db218bc99b8ab4c120c8e485a0b1661242ab2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
Name: libserial-devel
Version: 1.0.0
Release: 2%{?dist}
Summary: 用于在 POSIX 系统上编程串口的 C++ 库(开发文件)
License: BSD-3-Clause
URL: https://github.com/crayzeewulf/libserial
Source0: https://github.com/crayzeewulf/libserial/archive/50e0f443666d48d7c7e181dc73a6b35700517fae.tar.gz#/libserial-devel-%{version}.tar.gz
Group: Development/Libraries
Packager: openEuler Builder <builder@openeuler.org>
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: gcc
BuildRequires: make
Requires: libserial = %{version}-%{release}
%description
LibSerial 提供了一种方便的、面向对象的方式来访问 Linux 操作系统上的串口。
核心库使用 C++ 编写,提供了可将 POSIX 系统上的串口像 iostream 对象一样访问的类。
本包包含使用 LibSerial 开发应用程序所需的头文件和开发库文件。
# Runtime library subpackage (openEuler uses standard lib naming, no %mklibname macro)
%package -n libserial
Summary: 用于在 POSIX 系统上编程串口的 C++ 库
%description -n libserial
LibSerial 提供了一种方便的、面向对象的方式来访问 Linux 操作系统上的串口。
核心库使用 C++ 编写,提供了可将 POSIX 系统上的串口像 iostream 对象一样访问的类。
本包包含 LibSerial 的运行时共享库。
%prep
%autosetup -n %{name}-%{version}
%build
# topdir: libserial-devel-1.0.0
# 禁用可选功能以最小化构建依赖:
# testing(需要 Boost 和 GTest)、examples、Python SIP 绑定
# (需要 PythonLibs 和 SIP)、docs(需要 Doxygen)
%cmake -B _build \
-DLIBSERIAL_ENABLE_TESTING=OFF \
-DLIBSERIAL_BUILD_EXAMPLES=OFF \
-DLIBSERIAL_PYTHON_ENABLE=OFF \
-DLIBSERIAL_BUILD_DOCS=OFF
%__cmake --build _build %{?_smp_mflags}
%install
DESTDIR=%{buildroot} %__cmake --install _build
%files -n libserial
%license LICENSE.txt
%{_libdir}/libserial.so.1
%{_libdir}/libserial.so.1.0.0
%files
%license LICENSE.txt
%doc README.md
%{_includedir}/libserial/
%{_libdir}/libserial.so
%{_libdir}/libserial.a
%{_libdir}/pkgconfig/libserial.pc
%changelog
* Mon Sep 28 2026 openEuler Builder <builder@openeuler.org> - 1.0.0-2
- 添加 libserial 运行时子包,捕获版本化共享库文件
* Mon Sep 28 2026 openEuler Builder <builder@openeuler.org> - 1.0.0-1
- 初始打包
|