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}
8 Group: Development/Libraries
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 BuildRequires: crossmingw32-gcc
17 Requires: crossmingw32-runtime
18 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20 %define no_install_post_strip 1
22 %define target i386-mingw32
23 %define target_platform i386-pc-mingw32
24 %define arch %{_prefix}/%{target}
26 %define _sysprefix /usr
27 %define _prefix %{_sysprefix}/%{target}
28 %define _dlldir /usr/share/wine/windows/system
29 %define __cc %{target}-gcc
30 %define __cxx %{target}-g++
32 %ifarch alpha sparc sparc64 sparcv9
37 The libjpeg package contains a library of functions for manipulating
40 This package contains the cross version for Win32.
42 %description -l pl.UTF-8
43 Ten pakiet zawiera bibliotekę funkcji do manipulacji plikami jpeg.
45 Ten pakiet zawiera wersję skrośną dla Win32.
48 Summary: Static libjpeg library (cross mingw32 version)
49 Summary(pl.UTF-8): Statyczna biblioteka libjpeg (wersja skrośna mingw32)
50 Group: Development/Libraries
51 Requires: %{name} = %{version}-%{release}
54 Static libjpeg library (cross mingw32 version).
56 %description static -l pl.UTF-8
57 Statyczna biblioteka libjpeg (wersja skrośna mingw32).
60 Summary: libjpeg - DLL library for Windows
61 Summary(pl.UTF-8): libjpeg - biblioteka DLL dla Windows
62 Group: Applications/Emulators
66 libjpeg - DLL library for Windows.
68 %description dll -l pl.UTF-8
69 libjpeg - biblioteka DLL dla Windows.
72 %setup -q -n jpeg-%{version}
79 CC=%{target}-gcc ; export CC
80 CXX=%{target}-g++ ; export CXX
81 LD=%{target}-ld ; export LD
82 AR=%{target}-ar ; export AR
83 AS=%{target}-as ; export AS
84 CROSS_COMPILE=1 ; export CROSS_COMPILE
85 CPPFLAGS="-I%{arch}/include" ; export CPPFLAGS
86 RANLIB=%{target}-ranlib ; export RANLIB
87 LDSHARED="%{target}-gcc -shared" ; export LDSHARED
88 TARGET="%{target}" ; export TARGET
99 cat << "EOF" >> libjpeg.la
100 # libjpeg.la - a libtool library file
101 # Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06)
102 # ^^^^ This line needs to stay
103 # Made by czarny czarny at pld-linux.org
105 # The name that we can dlopen(3).
106 dlname='../bin/libjpeg.dll'
108 # Names of this library.
109 library_names='libjpeg.dll.a'
111 # The name of the static archive.
112 old_library='libjpeg.a'
114 # Libraries that this one depends upon.
117 # Version information for libjpeg.
122 # Is this an already installed library?
125 # Should we warn about portability when linking against -modules?
128 # Files to dlopen/dlpreopen
132 # Directory that this library needs to be installed in:
137 %{target}-strip jpeg.dll
138 %{target}-strip -g -R.comment -R.note *.a
142 rm -rf $RPM_BUILD_ROOT
143 install -d $RPM_BUILD_ROOT{%{_includedir},%{_libdir},%{_dlldir}}
145 install jconfig.h jerror.h jmorecfg.h jpeglib.h jversion.h $RPM_BUILD_ROOT%{_includedir}
146 install *.a $RPM_BUILD_ROOT%{_libdir}
147 install jpeg.dll $RPM_BUILD_ROOT%{_dlldir}/libjpeg.dll
148 install libjpeg.la $RPM_BUILD_ROOT%{_libdir}
151 rm -rf $RPM_BUILD_ROOT
154 %defattr(644,root,root,755)
155 %{_libdir}/libjpeg.dll.a
156 %{_libdir}/libjpeg.la
160 %defattr(644,root,root,755)
164 %defattr(644,root,root,755)
165 %{_dlldir}/libjpeg.dll