Merge heads
[fedora-mingw.git] / libjpeg / mingw-libjpeg.spec
1 %include /usr/lib/rpm/mingw-defs
2
3 Name:           mingw-libjpeg
4 Version:        6b
5 Release:        1%{?dist}
6 Summary:        MinGW Windows Libjpeg library
7
8 License: IJG
9 URL: http://www.ijg.org/
10 Group:          Development/Libraries
11 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
12 Source0: ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.bz2
13 Source1: configure.in
14
15 Patch1: jpeg-c++.patch
16 Patch4: libjpeg-cflags.patch
17 Patch5: libjpeg-buf-oflo.patch
18 Patch6: libjpeg-autoconf.patch
19
20 Patch100: jpeg-mingw.patch
21
22 BuildArch:      noarch
23
24 BuildRequires:  mingw-filesystem >= 19
25 BuildRequires:  mingw-gcc
26 BuildRequires:  mingw-binutils
27 BuildRequires: mingw-libpng
28 BuildRequires: mingw-zlib
29 BuildRequires: autoconf, libtool
30
31 %description
32 MinGW Windows Libjpeg library.
33
34
35 %prep
36 %setup -q -n jpeg-6b
37
38 %patch1 -p1 -b .c++
39 %patch4 -p1 -b .cflags
40 %patch5 -p1 -b .oflo
41 %patch6 -p1
42
43 %patch100 -p1
44
45 # For long-obsolete reasons, libjpeg 6b doesn't ship with a configure.in.
46 # We need to re-autoconf though, in order to update libtool support,
47 # so supply configure.in.
48 cp %{SOURCE1} configure.in
49
50 # libjpeg 6b includes a horribly obsolete version of libtool.
51 # Blow it away and replace with build system's version.
52 rm -f config.guess config.sub ltmain.sh ltconfig aclocal.m4
53 cp /usr/share/aclocal/libtool.m4 aclocal.m4
54 libtoolize
55 autoconf
56
57 %build
58 %{_mingw_configure} --enable-shared --enable-static
59 make libdir=%{_mingw_libdir}
60
61
62 %install
63 rm -rf $RPM_BUILD_ROOT
64
65 mkdir -p $RPM_BUILD_ROOT%{_mingw_bindir}
66 mkdir -p $RPM_BUILD_ROOT%{_mingw_includedir}
67 mkdir -p $RPM_BUILD_ROOT%{_mingw_libdir}
68 mkdir -p $RPM_BUILD_ROOT%{_mingw_mandir}/man1
69 mkdir -p $RPM_BUILD_ROOT%{_mingw_prefix}/man/man1
70
71 make prefix=$RPM_BUILD_ROOT%{_mingw_prefix} install
72
73 # Work around the broken makefiles...
74 mv $RPM_BUILD_ROOT%{_mingw_prefix}/man/man1/*.1 $RPM_BUILD_ROOT%{_mingw_mandir}/man1
75
76
77 %clean
78 rm -rf $RPM_BUILD_ROOT
79
80
81 %files
82 %defattr(-,root,root)
83 %{_mingw_bindir}/cjpeg
84 %{_mingw_bindir}/djpeg
85 %{_mingw_bindir}/jpegtran
86 %{_mingw_bindir}/rdjpgcom
87 %{_mingw_bindir}/wrjpgcom
88 %{_mingw_bindir}/libjpeg-62.dll
89 %{_mingw_includedir}/jconfig.h
90 %{_mingw_includedir}/jerror.h
91 %{_mingw_includedir}/jmorecfg.h
92 %{_mingw_includedir}/jpeglib.h
93 %{_mingw_libdir}/libjpeg.a
94 %{_mingw_libdir}/libjpeg.dll.a
95 %{_mingw_libdir}/libjpeg.la
96 %{_mingw_mandir}/man1/cjpeg.1*
97 %{_mingw_mandir}/man1/djpeg.1*
98 %{_mingw_mandir}/man1/jpegtran.1*
99 %{_mingw_mandir}/man1/rdjpgcom.1*
100 %{_mingw_mandir}/man1/wrjpgcom.1*
101
102 %changelog
103 * Tue Sep  9 2008 Daniel P. Berrange <berrange@redhat.com> - 2.18.0-1
104 - Initial RPM release