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

#
# spec file for package libjpeg-turbo
#
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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 srcver   3.0.2
%define major    8
%define minor    0
%define micro    2
%define libver   %major.%minor.%micro
%define tmajor   0
%define tminor   1
%define tmicro   0
%define tlibver  %tmajor.%tminor.%tmicro

Name:           mingw32-libjpeg-turbo
Version:        %srcver
Release:        0
Summary:        A MMX/SSE2 accelerated library for manipulating JPEG image files
License:        BSD-3-Clause
Group:          Productivity/Graphics/Convertors
URL:            https://libjpeg-turbo.org/
Source:         https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/%version/libjpeg-turbo-%srcver.tar.gz
Patch1:         libjpeg-turbo-1.3.0-tiff-ojpeg.patch
BuildRequires:  mingw32-cross-cmake
BuildRequires:  mingw32-cross-gcc-c++
BuildRequires:  mingw32-cross-pkg-config
BuildRequires:  libtool
BuildRequires:  yasm
Obsoletes:      mingw32-jpeg = 6b
Obsoletes:      mingw32-jpeg = 8.0.1
Obsoletes:      mingw32-jpeg = 8.0.2
Provides:       mingw32-jpeg = %version
Obsoletes:      mingw32-jpeg < %version
Conflicts:      mingw32-jpeg%major
%_mingw32_package_header_debug
BuildArch:      noarch
#!BuildIgnore:	post-build-checks

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

%package -n mingw32-libjpeg%major
Version:        %libver
Release:        0
Summary:        The MMX/SSE accelerated JPEG compression/decompression library
Group:          System/Libraries

%description -n mingw32-libjpeg%major
This library contains MMX/SSE accelerated functions for manipulating
JPEG images.

%package -n mingw32-libturbojpeg%tmajor
Version:        %version
Release:        0
Summary:        The MMX/SSE accelerated JPEG compression/decompression library
Group:          System/Libraries

%description -n mingw32-libturbojpeg%tmajor
This library contains MMX/SSE accelerated functions for manipulating
JPEG images.

%package -n mingw32-libjpeg%major-devel
Version:        %libver
Release:        0
Summary:        Development Tools for applications which will use the Libjpeg Library
Group:          Development/Libraries/C and C++
Conflicts:      otherproviders(mingw32-libjpeg-devel)

%description -n mingw32-libjpeg%major-devel
The libjpeg-devel package includes the header files and libraries
necessary for compiling and linking programs which will manipulate JPEG
files using the libjpeg library.

%_mingw32_debug_package

%prep
%setup -qn libjpeg-turbo-%srcver
%patch -P 1

%build
%_mingw32_cmake \
    -DCMAKE_SYSTEM_PROCESSOR=%_arch \
    -DENABLE_STATIC=OFF \
    -DWITH_JPEG8=ON
%_mingw32_cmake_build

%install
%_mingw32_cmake_install
# Remove docs, we'll select docs manually
rm -rf "%buildroot/%_mingw32_datadir/doc/"

%files
%doc README.md change.log ChangeLog.md
%doc usage.txt wizard.txt
%_mingw32_bindir/*.exe
%doc %_mingw32_mandir/man1/*

%files -n mingw32-libjpeg%major
%_mingw32_bindir/libjpeg-%major.dll

%files -n mingw32-libturbojpeg%tmajor
%_mingw32_bindir/libturbojpeg.dll

%files -n mingw32-libjpeg%major-devel
%_mingw32_includedir/*.h
%_mingw32_libdir/libjpeg.dll.a
%_mingw32_libdir/libturbojpeg.dll.a
%_mingw32_libdir/cmake/libjpeg-turbo/
%_mingw32_libdir/pkgconfig/libjpeg.pc
%_mingw32_libdir/pkgconfig/libturbojpeg.pc
%doc coderules.txt jconfig.txt libjpeg.txt structure.txt tjexample.c

%changelog
openSUSE Build Service is sponsored by