File mingw64-libjpeg-turbo.spec of Package mingw64-libjpeg-turbo

#
# spec file for package mingw64-libjpeg-turbo
#
# Copyright (c) 2025 SUSE LLC and contributors
#
# 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/
#


%{_mingw64_package_header_debug}
Name:           mingw64-libjpeg-turbo
Version:        3.1.2
Release:        0
Summary:        A SIMD-accelerated library for manipulating JPEG image files
License:        BSD-3-Clause
URL:            https://libjpeg-turbo.org/
Source:         https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/%{version}/libjpeg-turbo-%{version}.tar.gz
Patch1:         libjpeg-turbo-1.3.0-tiff-ojpeg.patch
BuildRequires:  libtool
BuildRequires:  mingw64-cross-cmake
BuildRequires:  mingw64-cross-gcc-c++
BuildRequires:  mingw64-cross-pkg-config
BuildRequires:  yasm
Obsoletes:      mingw64-jpeg = 6b
Obsoletes:      mingw64-jpeg = 8.0.1
Obsoletes:      mingw64-jpeg = 8.0.2
Provides:       mingw64-jpeg = %{version}
Obsoletes:      mingw64-jpeg < %{version}
BuildArch:      noarch
BuildSystem:    mingw64cmake
BuildOption:    -DCMAKE_SYSTEM_PROCESSOR=%{_arch}
BuildOption:    -DENABLE_STATIC=ON
BuildOption:    -DENABLE_SHARED=OFF
BuildOption:    -DWITH_JPEG8=ON

%description
The libjpeg-turbo package contains a library of functions for manipulating
JPEG images.

%{_mingw64_debug_package}

%prep
%autosetup -p1 -n libjpeg-turbo-%{version}

%install -a
# Remove docs, we'll select docs manually
rm -rf "%{buildroot}/%{_mingw64_datadir}/doc/"

%files
%doc README.md ChangeLog.md
%{_mingw64_bindir}/*.exe
%doc %{_mingw64_mandir}/man1/*

%{_mingw64_includedir}/*.h
%{_mingw64_libdir}/libjpeg.a
%{_mingw64_libdir}/libturbojpeg.a
%{_mingw64_libdir}/cmake/libjpeg-turbo/
%{_mingw64_libdir}/pkgconfig/libjpeg.pc
%{_mingw64_libdir}/pkgconfig/libturbojpeg.pc

%changelog
openSUSE Build Service is sponsored by