Just whitespace changes.
[fedora-mingw.git] / libjpeg / mingw-libjpeg.spec
1 %define __strip %{_mingw_strip}
2 %define __objdump %{_mingw_objdump}
3 %define _use_internal_dependency_generator 0
4 %define __find_requires %{_mingw_findrequires}
5 %define __find_provides %{_mingw_findprovides}
6
7 Name:           mingw-libjpeg
8 Version:        6b
9 Release:        2%{?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.bz2
17 Source1:        libjpeg-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-mingw.patch
25
26 BuildArch:      noarch
27
28 BuildRequires:  mingw-filesystem >= 23
29 BuildRequires:  mingw-gcc
30 BuildRequires:  mingw-binutils
31 BuildRequires:  mingw-libpng
32 BuildRequires:  mingw-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 %{_mingw_configure} --enable-shared --enable-static
63 make libdir=%{_mingw_libdir}
64
65
66 %install
67 rm -rf $RPM_BUILD_ROOT
68
69 mkdir -p $RPM_BUILD_ROOT%{_mingw_bindir}
70 mkdir -p $RPM_BUILD_ROOT%{_mingw_includedir}
71 mkdir -p $RPM_BUILD_ROOT%{_mingw_libdir}
72 mkdir -p $RPM_BUILD_ROOT%{_mingw_mandir}/man1
73 mkdir -p $RPM_BUILD_ROOT%{_mingw_prefix}/man/man1
74
75 make prefix=$RPM_BUILD_ROOT%{_mingw_prefix} install
76
77 # Work around the broken makefiles...
78 mv $RPM_BUILD_ROOT%{_mingw_prefix}/man/man1/*.1 $RPM_BUILD_ROOT%{_mingw_mandir}/man1
79
80 # Remove static library.
81 rm $RPM_BUILD_ROOT%{_mingw_libdir}/libjpeg.a
82
83
84 %clean
85 rm -rf $RPM_BUILD_ROOT
86
87
88 %files
89 %defattr(-,root,root)
90 %{_mingw_bindir}/cjpeg
91 %{_mingw_bindir}/djpeg
92 %{_mingw_bindir}/jpegtran
93 %{_mingw_bindir}/rdjpgcom
94 %{_mingw_bindir}/wrjpgcom
95 %{_mingw_bindir}/libjpeg-62.dll
96 %{_mingw_includedir}/jconfig.h
97 %{_mingw_includedir}/jerror.h
98 %{_mingw_includedir}/jmorecfg.h
99 %{_mingw_includedir}/jpeglib.h
100 %{_mingw_libdir}/libjpeg.dll.a
101 %{_mingw_libdir}/libjpeg.la
102 %{_mingw_mandir}/man1/cjpeg.1*
103 %{_mingw_mandir}/man1/djpeg.1*
104 %{_mingw_mandir}/man1/jpegtran.1*
105 %{_mingw_mandir}/man1/rdjpgcom.1*
106 %{_mingw_mandir}/man1/wrjpgcom.1*
107
108 %changelog
109 * Wed Sep 10 2008 Daniel P. Berrange <berrange@redhat.com> - 6b-2
110 - Rename configure.in with a prefix.
111 - Remove static library.
112
113 * Tue Sep  9 2008 Daniel P. Berrange <berrange@redhat.com> - 6b-1
114 - Initial RPM release