Needed to bump the version again in order to get rid of the %preun.
[fedora-mingw.git] / libjpeg / mingw32-libjpeg.spec
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}
6
7 Name:           mingw32-libjpeg
8 Version:        6b
9 Release:        5%{?dist}
10 Summary:        MinGW Windows Libjpeg library
11
12 License:        IJG
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
17 Source1:        configure.in
18
19 Patch1:         jpeg-c++.patch
20 Patch4:         libjpeg-cflags.patch
21 Patch5:         libjpeg-buf-oflo.patch
22 Patch6:         libjpeg-autoconf.patch
23
24 Patch100:       jpeg-mingw32.patch
25
26 BuildArch:      noarch
27
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
34
35 %description
36 MinGW Windows Libjpeg library.
37
38
39 %prep
40 %setup -q -n jpeg-6b
41
42 %patch1 -p1 -b .c++
43 %patch4 -p1 -b .cflags
44 %patch5 -p1 -b .oflo
45 %patch6 -p1
46
47 %patch100 -p1
48
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
53
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
58 libtoolize
59 autoconf
60
61 %build
62 %{_mingw32_configure} --enable-shared --enable-static
63 make libdir=%{_mingw32_libdir}
64
65
66 %install
67 rm -rf $RPM_BUILD_ROOT
68
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
73
74 make prefix=$RPM_BUILD_ROOT%{_mingw32_prefix} install
75
76 # Remove static library.
77 rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libjpeg.a
78
79 # Remove manual pages which duplicate Fedora native.
80 rm -rf $RPM_BUILD_ROOT%{_mingw32_prefix}/man
81
82
83 %clean
84 rm -rf $RPM_BUILD_ROOT
85
86
87 %files
88 %defattr(-,root,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
101
102
103 %changelog
104 * Wed Sep 24 2008 Richard W.M. Jones <rjones@redhat.com> - 6b-5
105 - Rename mingw -> mingw32.
106
107 * Mon Sep 22 2008 Daniel P. Berrange <berrange@redhat.com> - 6b-4
108 - Switch to tar.bz2 source, and rename configure.in
109
110 * Sun Sep 21 2008 Daniel P. Berrange <berrange@redhat.com> - 6b-3
111 - Fix URL.
112 - Remove manpages which duplicate Fedora native.
113
114 * Wed Sep 10 2008 Daniel P. Berrange <berrange@redhat.com> - 6b-2
115 - Rename configure.in with a prefix.
116 - Remove static library.
117
118 * Tue Sep  9 2008 Daniel P. Berrange <berrange@redhat.com> - 6b-1
119 - Initial RPM release