mingw-libjpeg-turbo/mingw-libjpeg-turbo.spec

152 lines
4.7 KiB
RPMSpec

%global __strip %{_mingw32_strip}
%global __objdump %{_mingw32_objdump}
%define __debug_install_post %{_mingw32_debug_install_post}
# Build the programs like cjpeg, etc.
# https://bugzilla.redhat.com/show_bug.cgi?id=467401#c7
%global build_programs 0
Name: mingw-libjpeg-turbo
Version: 1.1.1
Release: 6%{?dist}
Summary: MinGW Windows Libjpeg-turbo library
License: wxWidgets
URL: http://libjpeg-turbo.virtualgl.org/
Group: Development/Libraries
Source0: http://downloads.sourceforge.net/libjpeg-turbo/libjpeg-turbo-%{version}.tar.gz
# There's a conflict between basetsd.h (w32api) and jmorecfg.h
# Both contain a definition for the data type INT32, but they're
# different from each other (signed int vs. long)
# This patch makes the library use the data type signed int for INT32
Patch0: libjpeg-turbo-dont-conflict-with-basetsd-h.diff
BuildArch: noarch
BuildRequires: mingw32-filesystem >= 68
BuildRequires: mingw32-gcc
BuildRequires: mingw32-gcc-c++
BuildRequires: mingw32-binutils
BuildRequires: mingw32-libpng
BuildRequires: mingw32-zlib
BuildRequires: nasm
BuildRequires: cmake
%description
MinGW Windows cross compiled Libjpeg-turbo library.
%package -n %{_mingw32_pkg_name}
Summary: MinGW Windows Libjpeg-turbo library
Obsoletes: mingw32-libjpeg < 7-4
Provides: mingw32-libjpeg = 7-4
%description -n %{_mingw32_pkg_name}
MinGW Windows cross compiled Libjpeg-turbo library.
%package -n %{_mingw32_pkg_name}-static
Summary: Static version of the MinGW Windows Libjpeg-turbo library
Requires: mingw32-libjpeg-turbo = %{version}-%{release}
Obsoletes: mingw32-libjpeg-static < 7-4
Provides: mingw32-libjpeg-static = 7-4
%description -n %{_mingw32_pkg_name}-static
Static version of the MinGW Windows cross compiled Libjpeg-turbo library.
%{?_mingw32_debug_package}
%prep
%setup -q -n libjpeg-turbo-%{version}
%patch0 -p0
%build
%{_mingw32_cmake}
make %{?_smp_mflags}
%install
make install DESTDIR=$RPM_BUILD_ROOT
# Remove manual pages which duplicate Fedora native.
rm -rf $RPM_BUILD_ROOT%{_mingw32_mandir}
# The CMake build system also installed some docs
rm -rf $RPM_BUILD_ROOT%{_mingw32_prefix}/doc
# Remove win32 native binaries if wanted
%if %build_programs == 0
rm -f $RPM_BUILD_ROOT%{_mingw32_bindir}/*.exe
%endif
# Fix perms
chmod -x README-turbo.txt
%files -n %{_mingw32_pkg_name}
%doc README README-turbo.txt change.log ChangeLog.txt LGPL.txt LICENSE.txt
%if %build_programs
%{_mingw32_bindir}/*.exe
%endif
%{_mingw32_bindir}/libjpeg-62.dll
%{_mingw32_bindir}/libturbojpeg.dll
%{_mingw32_includedir}/jconfig.h
%{_mingw32_includedir}/jerror.h
%{_mingw32_includedir}/jmorecfg.h
%{_mingw32_includedir}/jpeglib.h
%{_mingw32_includedir}/turbojpeg.h
%{_mingw32_libdir}/libjpeg.dll.a
%{_mingw32_libdir}/libturbojpeg.dll.a
%files -n %{_mingw32_pkg_name}-static
%{_mingw32_libdir}/libjpeg.a
%{_mingw32_libdir}/libturbojpeg.a
%changelog
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Fri Jun 3 2011 Erik van Pienbroek <epienbro@fedoraproject.org> - 1.1.1-5
- Updated the INT32 patch so that both the mingw.org and the mingw-w64
toolchains are supported
* Fri Jun 3 2011 Erik van Pienbroek <epienbro@fedoraproject.org> - 1.1.1-4
- Fix a conflict between w32api's basetsd.h and jmorecfg.h (conflicting
declarations for INT32)
* Thu Jun 2 2011 Erik van Pienbroek <epienbro@fedoraproject.org> - 1.1.1-3
- Moved the obsoletes/provides to the right location
- Bundle the licence and other %%doc's
- Fixed a small rpmlint warning
* Thu Jun 2 2011 Erik van Pienbroek <epienbro@fedoraproject.org> - 1.1.1-2
- Use CMake to build this package as it creates a more mingw-friendly
version of the library
* Thu Jun 2 2011 Erik van Pienbroek <epienbro@fedoraproject.org> - 1.1.1-1
- Update to 1.1.1
- Temporary made the package compliant to the old guidelines as the new
mingw-w64 based toolchain isn't approved for inclusion in Fedora yet
* Fri Apr 15 2011 Erik van Pienbroek <epienbro@fedoraproject.org> - 1.1.0-1
- Update to 1.1.0
- Made the package compliant with the new approved packaging guidelines
* Tue Feb 15 2011 Erik van Pienbroek <epienbro@fedoraproject.org> - 1.0.1-3
- Bumped the obsoletes mingw32-libjpeg
* Wed Jan 19 2011 Erik van Pienbroek <epienbro@fedoraproject.org> - 1.0.1-2
- Generate per-target RPMs
* Sun Oct 3 2010 Erik van Pienbroek <epienbro@fedoraproject.org> - 1.0.1-1
- Initial release (based on mingw32-libjpeg)
- Dropped the BR: mingw32-dlfcn
- Obsoletes/provides mingw32-libjpeg and mingw32-libjpeg-static
- Disable SIMD support for now because libtool doesn't recognize nasm