1 %define realname libjpeg
2 Summary: Library for handling different jpeg files - Mingw32 cross version
3 Summary(pl.UTF-8): Biblioteka do manipulacji plikami w formacie jpeg - wersja skrośna dla Mingw32
4 Name: crossmingw32-%{realname}
9 Source0: ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v%{version}.tar.gz
10 # Source0-md5: dbd5f3b47ed13132f04c685d608a7547
11 Patch0: %{realname}-DESTDIR.patch
12 Patch1: %{realname}-include.patch
13 Patch2: %{realname}-c++.patch
14 Patch3: %{name}-shared.patch
15 URL: http://www.ijg.org/
16 Requires: crossmingw32-runtime
17 BuildRequires: crossmingw32-gcc
18 BuildRequires: crossmingw32-w32api
19 BuildRequires: libtool
20 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22 %define no_install_post_strip 1
24 %define target i386-mingw32
25 %define target_platform i386-pc-mingw32
26 %define arch %{_prefix}/%{target}
27 %define gccarch %{_prefix}/lib/gcc-lib/%{target}
28 %define gcclib %{_prefix}/lib/gcc-lib/%{target}/%{version}
30 %define _sysprefix /usr
31 %define _prefix %{_sysprefix}/%{target}
32 %define _pkgconfigdir %{_prefix}/lib/pkgconfig
33 %define __cc %{target}-gcc
34 %define __cxx %{target}-g++
36 %ifarch alpha sparc sparc64 sparcv9
41 The libjpeg package contains a library of functions for manipulating
44 %description -l pl.UTF-8
45 Ten pakiet zawiera bibliotekę funkcji do manipulacji plikami jpeg.
48 Summary: libjpeg - DLL library for Windows
49 Summary(pl.UTF-8): libjpeg - biblioteka DLL dla Windows
50 Group: Applications/Emulators
53 libjpeg - DLL library for Windows.
55 %description dll -l pl.UTF-8
56 libjpeg - biblioteka DLL dla Windows.
59 %setup -q -n jpeg-%{version}
66 CC=%{target}-gcc ; export CC
67 CXX=%{target}-g++ ; export CXX
68 LD=%{target}-ld ; export LD
69 AR=%{target}-ar ; export AR
70 AS=%{target}-as ; export AS
71 CROSS_COMPILE=1 ; export CROSS_COMPILE
72 CPPFLAGS="-I%{arch}/include" ; export CPPFLAGS
73 RANLIB=%{target}-ranlib ; export RANLIB
74 LDSHARED="%{target}-gcc -shared" ; export LDSHARED
75 TARGET="%{target}" ; export TARGET
86 cat << "EOF" >> libjpeg.la
87 # libjpeg.la - a libtool library file
88 # Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06)
89 # ^^^^ This line needs to stay
90 # Made by czarny czarny at pld-linux.org
92 # The name that we can dlopen(3).
93 dlname='../bin/libjpeg.dll'
95 # Names of this library.
96 library_names='libjpeg.dll.a'
98 # The name of the static archive.
99 old_library='libjpeg.a'
101 # Libraries that this one depends upon.
104 # Version information for libz.
109 # Is this an already installed library?
112 # Should we warn about portability when linking against -modules?
115 # Files to dlopen/dlpreopen
119 # Directory that this library needs to be installed in:
123 %{target}-strip jpeg.dll
124 %{target}-strip -g -R.comment -R.note *.a
127 rm -rf $RPM_BUILD_ROOT
128 install -d $RPM_BUILD_ROOT%{_prefix}/{include,lib,bin}
130 install jconfig.h jerror.h jmorecfg.h jpeglib.h jversion.h $RPM_BUILD_ROOT%{_includedir}
131 install *.a $RPM_BUILD_ROOT%{_libdir}
132 install jpeg.dll $RPM_BUILD_ROOT%{_bindir}/libjpeg.dll
133 install libjpeg.la $RPM_BUILD_ROOT%{_libdir}
136 rm -rf $RPM_BUILD_ROOT
139 %defattr(644,root,root,755)
145 %defattr(644,root,root,755)