summaryrefslogtreecommitdiff
path: root/ros-humble-libserial.spec
blob: 7f803762a1b5d902dd39247ed585ac431643f691 (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
# topdir: ros-humble-libserial-1.0.0 (created by --transform from local clone)
Name:           ros-humble-libserial
Version:        1.0.0
Release:        1%{?dist}
Summary:        C++ serial port programming library for Linux

License:        BSD-3-Clause
URL:            https://github.com/crayzeewulf/libserial
# No git tags in upstream repo; use commit archive URL with #/ to force tarball name
Source0:        https://github.com/crayzeewulf/libserial/archive/50e0f443666d48d7c7e181dc73a6b35700517fae.tar.gz#/%{name}-%{version}.tar.gz

Group:          Development/Libraries
Packager:       openEuler Builder <builder@openeuler.org>

BuildRequires:  cmake
BuildRequires:  gcc-c++

%description
LibSerial provides a convenient, object oriented approach to accessing
serial ports on Linux operating systems. It is a C++ library that
simplifies serial port communication with a clean and intuitive API.

%package devel
Summary:        Development files for %{name}
Group:          Development/Libraries
Packager:       openEuler Builder <builder@openeuler.org>
Requires:       %{name} = %{version}-%{release}

%description devel
Header files, static library, and pkg-config file for developing
applications with %{name}.

%prep
%autosetup -n %{name}-%{version}

%build
%cmake \
    -DLIBSERIAL_ENABLE_TESTING=OFF \
    -DLIBSERIAL_BUILD_EXAMPLES=OFF \
    -DLIBSERIAL_PYTHON_ENABLE=OFF \
    -DLIBSERIAL_BUILD_DOCS=OFF \
    -DINSTALL_STATIC=ON \
    -DINSTALL_SHARED=ON
%cmake_build

%install
%cmake_install

%files
%license LICENSE.txt
%doc README.md ChangeLog
%{_libdir}/libserial.so.*

%files devel
%{_includedir}/libserial/
%{_libdir}/libserial.so
%{_libdir}/libserial.a
%{_libdir}/pkgconfig/libserial.pc

%changelog
* Mon Oct 12 2026 openEuler Builder <builder@openeuler.org> - 1.0.0-1
- Initial package