1 %define __strip %{_mingw32_strip}
2 %define __objdump %{_mingw32_objdump}
3 %define _use_internal_dependency_generator 0
4 %define __find_requires %{_mingw32_findrequires}
5 %define __find_provides %{_mingw32_findprovides}
10 Summary: MinGW Windows Libjpeg library
13 URL: http://www.ijg.org/
14 Group: Development/Libraries
15 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
16 Source0: ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v%{version}.tar.gz
19 Patch1: jpeg-c++.patch
20 Patch4: libjpeg-cflags.patch
21 Patch5: libjpeg-buf-oflo.patch
22 Patch6: libjpeg-autoconf.patch
24 Patch100: jpeg-mingw32.patch
28 BuildRequires: mingw32-filesystem >= 23
29 BuildRequires: mingw32-gcc
30 BuildRequires: mingw32-binutils
31 BuildRequires: mingw32-libpng
32 BuildRequires: mingw32-zlib
33 BuildRequires: autoconf, libtool
36 MinGW Windows Libjpeg library.
43 %patch4 -p1 -b .cflags
49 # For long-obsolete reasons, libjpeg 6b doesn't ship with a configure.in.
50 # We need to re-autoconf though, in order to update libtool support,
51 # so supply configure.in.
52 cp %{SOURCE1} configure.in
54 # libjpeg 6b includes a horribly obsolete version of libtool.
55 # Blow it away and replace with build system's version.
56 rm -f config.guess config.sub ltmain.sh ltconfig aclocal.m4
57 cp /usr/share/aclocal/libtool.m4 aclocal.m4
62 %{_mingw32_configure} --enable-shared --enable-static
63 make libdir=%{_mingw32_libdir}
67 rm -rf $RPM_BUILD_ROOT
69 mkdir -p $RPM_BUILD_ROOT%{_mingw32_bindir}
70 mkdir -p $RPM_BUILD_ROOT%{_mingw32_includedir}
71 mkdir -p $RPM_BUILD_ROOT%{_mingw32_libdir}
72 mkdir -p $RPM_BUILD_ROOT%{_mingw32_prefix}/man/man1
74 make prefix=$RPM_BUILD_ROOT%{_mingw32_prefix} install
76 # Remove static library.
77 rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libjpeg.a
79 # Remove manual pages which duplicate Fedora native.
80 rm -rf $RPM_BUILD_ROOT%{_mingw32_prefix}/man
84 rm -rf $RPM_BUILD_ROOT
89 %{_mingw32_bindir}/cjpeg
90 %{_mingw32_bindir}/djpeg
91 %{_mingw32_bindir}/jpegtran
92 %{_mingw32_bindir}/rdjpgcom
93 %{_mingw32_bindir}/wrjpgcom
94 %{_mingw32_bindir}/libjpeg-62.dll
95 %{_mingw32_includedir}/jconfig.h
96 %{_mingw32_includedir}/jerror.h
97 %{_mingw32_includedir}/jmorecfg.h
98 %{_mingw32_includedir}/jpeglib.h
99 %{_mingw32_libdir}/libjpeg.dll.a
100 %{_mingw32_libdir}/libjpeg.la
104 * Wed Sep 24 2008 Richard W.M. Jones <rjones@redhat.com> - 6b-5
105 - Rename mingw -> mingw32.
107 * Mon Sep 22 2008 Daniel P. Berrange <berrange@redhat.com> - 6b-4
108 - Switch to tar.bz2 source, and rename configure.in
110 * Sun Sep 21 2008 Daniel P. Berrange <berrange@redhat.com> - 6b-3
112 - Remove manpages which duplicate Fedora native.
114 * Wed Sep 10 2008 Daniel P. Berrange <berrange@redhat.com> - 6b-2
115 - Rename configure.in with a prefix.
116 - Remove static library.
118 * Tue Sep 9 2008 Daniel P. Berrange <berrange@redhat.com> - 6b-1
119 - Initial RPM release