summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2026-09-28 02:30:38 +0000
committerCoprDistGit <infra@openeuler.org>2026-09-28 02:30:38 +0000
commitf1523c02ca72074c71101df485d205a2493e0751 (patch)
treef86e95e633ea85e2e1eb9d60251eef22650f172f
parent9049a1cb9c99cdb99eea14e1f9a5c9df26ffe1e2 (diff)
automatic import of libserialopeneuler24.03_LTS_SP3
-rw-r--r--.gitignore1
-rw-r--r--libserial.spec65
-rw-r--r--sources1
3 files changed, 67 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..756fc1a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/libserial-1.0.0.tar.gz
diff --git a/libserial.spec b/libserial.spec
new file mode 100644
index 0000000..f1ccf74
--- /dev/null
+++ b/libserial.spec
@@ -0,0 +1,65 @@
+Name: libserial
+Version: 1.0.0
+Release: 1%{?dist}
+Summary: C++ library for programming serial ports on POSIX systems
+
+License: BSD-3-Clause
+URL: https://github.com/crayzeewulf/libserial
+Source0: https://github.com/crayzeewulf/libserial/archive/50e0f443666d48d7c7e181dc73a6b35700517fae.tar.gz#/libserial-%{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 system. The core library is written in
+C++ and provides classes which allow the serial port on POSIX systems to
+be accessed like an iostream object. Special functions are provided for
+setting various parameters of the serial port such as the baud rate,
+character size, flow control and others.
+
+%package devel
+Summary: Development files for %{name}
+Group: Development/Libraries
+Packager: openEuler Builder <builder@openeuler.org>
+Requires: %{name} = %{version}-%{release}
+
+%description devel
+Header files and development libraries for %{name}.
+
+%prep
+%autosetup -n %{name}-%{version}
+
+%build
+# topdir: libserial-1.0.0
+# Disable optional features to minimize build dependencies:
+# testing (needs Boost and GTest), examples, Python SIP bindings
+# (needs PythonLibs and SIP), docs (needs 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
+%license LICENSE.txt
+%doc README.md
+%{_libdir}/libserial.so.1
+%{_libdir}/libserial.so.1.0.0
+
+%files devel
+%{_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-1
+- Initial package
diff --git a/sources b/sources
new file mode 100644
index 0000000..f4565ab
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+e4e26b4f79024e8bcbec872508fd0a37 libserial-1.0.0.tar.gz