File mingw32-openjpeg.spec of Package mingw32-openjpeg

#
# spec file for package mingw32-openjpeg
#
# Copyright (c) 2014 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/
#


Name:           mingw32-openjpeg
Version:        1.5.0
Release:        0
Summary:        An open-source JPEG 2000 codec
License:        BSD-2-Clause
Group:          Development/Libraries
Url:            http://www.openjpeg.org
Source:         http://openjpeg.googlecode.com/files/openjpeg-%{version}.tar.gz
Patch1:         openjpeg-1.5.0-CANONICAL.patch
Patch2:         0002-Install-jpwl-man-pages-only-if-jpwl-is-enabled.patch
Patch3:         0003-Improve-check-for-standard-libs.patch
# For patch openjpeg-1.5.0-CANONICAL.patch
# For patch 0002-Install-jpwl-man-pages-only-if-jpwl-is-enabled.patch
# For patch 0003-Improve-check-for-standard-libs.patch
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  libtool
#!BuildIgnore: post-build-checks
BuildRequires:  mingw32-cross-binutils
BuildRequires:  mingw32-cross-gcc
BuildRequires:  mingw32-cross-pkg-config
BuildRequires:  mingw32-filesystem
BuildRequires:  mingw32-liblcms2-devel
BuildRequires:  mingw32-libpng-devel
BuildRequires:  mingw32-libtiff-devel
BuildRequires:  mingw32-zlib-devel
%_mingw32_package_header_debug
BuildArch:      noarch

%description
OpenJPEG library is an open-source JPEG 2000 codec written in C. It has been
developed in order to promote the use of JPEG 2000, the new still-image
compression standard from the Joint Photographic Experts Group (JPEG).

%package -n mingw32-libopenjpeg-devel
Summary:        Development files for the OpenJPEG library
Group:          Development/Libraries

%description -n mingw32-libopenjpeg-devel
This package contains header files and libraries needed for developing programs
using the OpenJPEG library.

%package -n mingw32-libopenjpeg1
Summary:        An open-source JPEG 2000 codec
Group:          Development/Libraries

%description -n mingw32-libopenjpeg1
OpenJPEG library is an open-source JPEG 2000 codec written in C. It has been
developed in order to promote the use of JPEG 2000, the new still-image
compression standard from the Joint Photographic Experts Group (JPEG).

%_mingw32_debug_package

%prep
%setup -q -n openjpeg-%{version}
%patch -P 1 -p1
%patch -P 2 -p1
%patch -P 3 -p1

%build
# For patch openjpeg-1.5.0-CANONICAL.patch
# For patch 0002-Install-jpwl-man-pages-only-if-jpwl-is-enabled.patch
# For patch 0003-Improve-check-for-standard-libs.patch
autoreconf

echo "lt_cv_deplibs_check_method='pass_all'" >>%{_mingw32_cache}

# Only build shared libraries.
configure_args="--enable-shared --disable-static"

# Configure
%{_mingw32_configure} ${configure_args}

# Make
%{_mingw32_make} %{?_smp_mflags} || %{_mingw32_make}

%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}

%files
%defattr(-,root,root)
%{_mingw32_docdir}/openjpeg-1.5/CHANGES
%{_mingw32_docdir}/openjpeg-1.5/LICENSE
%{_mingw32_bindir}/image_to_j2k.exe
%{_mingw32_bindir}/j2k_dump.exe
%{_mingw32_bindir}/j2k_to_image.exe
%{_mingw32_mandir}/man1/image_to_j2k.1.*
%{_mingw32_mandir}/man1/j2k_dump.1.*
%{_mingw32_mandir}/man1/j2k_to_image.1.*

%files -n mingw32-libopenjpeg-devel
%defattr(-,root,root)
%{_mingw32_includedir}/openjpeg-1.5/openjpeg.h
%{_mingw32_includedir}/openjpeg.h
%{_mingw32_libdir}/pkgconfig/libopenjpeg.pc
%{_mingw32_libdir}/pkgconfig/libopenjpeg1.pc
%{_mingw32_libdir}/libopenjpeg.dll.a
%{_mingw32_mandir}/man3/libopenjpeg.3.*

%files -n mingw32-libopenjpeg1
%defattr(-,root,root)
%{_mingw32_bindir}/libopenjpeg-1.dll

%changelog
openSUSE Build Service is sponsored by