File mingw64-lzo.spec of Package mingw64-lzo

#
# spec file for package mingw64-lzo
#
# Copyright (c) 2025, Martin Hauke <mardnh@gmx.de>
#
# 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 http://bugs.opensuse.org/
#


%define sover 2
%define realname lzo
%define libname mingw64-liblzo2-%{sover}
Name:           mingw64-%{realname}
Version:        2.10
Release:        0
Summary:        A Real-Time Data Compression Library
License:        GPL-2.0-or-later
Group:          Development/Libraries/C and C++
URL:            https://www.oberhumer.com/opensource/lzo/
Source:         https://www.oberhumer.com/opensource/%{realname}/download/%{realname}-%{version}.tar.gz
Patch1:         https://src.fedoraproject.org/rpms/lzo/raw/main/f/lzo-2.08-rhbz1309225.patch
BuildRequires:  mingw64-cross-gcc-c++
%_mingw64_package_header_debug
BuildArch:      noarch

%description
LZO is a portable lossless data compression library written in ANSI C.
Decompression requires no memory. LZO is suitable for data compression
and decompression in real-time. This means it favors speed over
compression ratio.

%package -n %{libname}
Summary:        A Real-Time Data Compression Library
Group:          System/Libraries

%description -n %{libname}
LZO is a portable lossless data compression library written in ANSI C.
Decompression requires no memory. LZO is suitable for data compression
and decompression in real-time. This means it favors speed over
compression ratio.

%package devel
Summary:        Development files for %{name}
Group:          Development/Languages/C and C++
Requires:       %{libname} = %{version}

%description devel
LZO is a portable lossless data compression library written in ANSI C.
Decompression requires no memory. LZO is suitable for data
de-/compression in real-time. This means it favours speed over
compression ratio.

%_mingw64_debug_package

%prep
%autosetup -p1 -n %{realname}-%{version}

%build
%{_mingw64_configure} \
  --enable-shared \
  --disable-static
%{_mingw64_make} V=1

%install
%{_mingw64_make_install}
rm -Rv %{buildroot}%{_mingw64_docdir}/lzo

%files -n %{libname}
%license COPYING
%{_mingw64_bindir}/liblzo2-%{sover}.dll

%files devel
%doc NEWS README
%{_mingw64_includedir}/lzo

%{_mingw64_libdir}/liblzo2.dll.a
%{_mingw64_libdir}/pkgconfig/lzo2.pc

%changelog
openSUSE Build Service is sponsored by