Files
libmodbus/libmodbus.spec
Stanislav Brabec 2e112331ca - Update to version 3.1.11
* RTU - Check CRC before filtering on slave ID.
  * HAVE_NETINET_IN_H as guard around header.
  * Use default port 502 in documentation.
  * Fix float endianness issue introduced in v3.1.8
  * Proper display of used CFLAGS.
  * Don't build with debug flag by default anymore.
  * Check request length in modbus_reply when used in memcpy.
  * Fix insecure data handling. CID 416366: INTEGER_OVERFLOW found
    with Coverity Scan.
  * Remove useless cast in setsockopt call.
  * Documentation improvements.
  * Revert TCP checks for recovery.
  * Don't use loop initial declaration.
  * Don't use gai_strerror if not available.
  * Add checks for netinet/ip.h and gai_strerror.
  * Log error in read input registers if debug.
  * Fix errno value on timeout with TCP connect.
  * Free addrinfo struct on getaddrinfo() gerrors.
  * Fix doc of modbus_mapping_new_start_address.

OBS-URL: https://build.opensuse.org/package/show/hardware/libmodbus?expand=0&rev=9
2024-10-24 21:25:33 +00:00

95 lines
2.9 KiB
RPMSpec

#
# spec file for package libmodbus
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: libmodbus
Version: 3.1.11
Release: 0
Summary: Modbus Library
License: LGPL-2.1-or-later
Group: Development/Libraries/C and C++
URL: https://www.libmodbus.org/
Source: https://github.com/stephane/libmodbus/releases/download/v%{version}/libmodbus-%{version}.tar.gz
BuildRequires: asciidoc
BuildRequires: pkgconfig
BuildRequires: xmlto
%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.
The functions included in the library have been derived from the Modicon Modbus
Protocol Reference Guide which can be obtained from Schneider.
%package -n libmodbus5
Summary: Modbus Library
Group: System/Libraries
%description -n libmodbus5
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.
The functions included in the library have been derived from the Modicon Modbus
Protocol Reference Guide which can be obtained from Schneider.
%package devel
Summary: Development Files for Modbus Library
Group: Development/Libraries/C and C++
Requires: glibc-devel
Requires: libmodbus5 = %{version}
%description devel
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.
The functions included in the library have been derived from the Modicon Modbus
Protocol Reference Guide which can be obtained from Schneider.
%prep
%setup -q
%build
export CFLAGS="%{optflags}"
%configure\
--docdir=%{_docdir}/%{name}\
--disable-static
%make_build
%install
%make_install
find %{buildroot} -type f -name "*.la" -delete -print
# Installed by %%doc
rm %{buildroot}%{_docdir}/%{name}/{AUTHORS,NEWS,README.md}
%post -n libmodbus5 -p /sbin/ldconfig
%postun -n libmodbus5 -p /sbin/ldconfig
%files -n libmodbus5
%license COPYING.LESSER
%doc AUTHORS NEWS README.md
%{_libdir}/*.so.5*
%files devel
%{_includedir}/modbus
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%changelog