]>
Commit | Line | Data |
---|---|---|
18578b4b | 1 | %define realname libjpeg |
dbea029a | 2 | Summary: Library for handling different jpeg files - Mingw32 cross version |
908fb225 | 3 | Summary(pl.UTF-8): Biblioteka do manipulacji plikami w formacie jpeg - wersja skrośna dla Mingw32 |
18578b4b | 4 | Name: crossmingw32-%{realname} |
5 | Version: 6b | |
9b8c3476 | 6 | Release: 5 |
18578b4b | 7 | License: distributable |
8 | Group: 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 | |
120dba18 | 14 | Patch3: %{name}-shared.patch |
18578b4b | 15 | URL: http://www.ijg.org/ |
d54af035 | 16 | Requires: crossmingw32-runtime |
18578b4b | 17 | BuildRequires: crossmingw32-gcc |
18 | BuildRequires: crossmingw32-w32api | |
19 | BuildRequires: libtool | |
20 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
21 | ||
22 | %define no_install_post_strip 1 | |
23 | ||
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} | |
29 | ||
30 | %define __cc %{target}-gcc | |
31 | %define __cxx %{target}-g++ | |
32 | ||
0e391455 | 33 | %ifarch alpha sparc sparc64 sparcv9 |
34 | %define optflags -O2 | |
35 | %endif | |
36 | ||
18578b4b | 37 | %description |
38 | The libjpeg package contains a library of functions for manipulating | |
39 | JPEG images. | |
40 | ||
b1b4f4e2 JR |
41 | %description -l pl.UTF-8 |
42 | Ten pakiet zawiera bibliotekę funkcji do manipulacji plikami jpeg. | |
18578b4b | 43 | |
120dba18 | 44 | %package dll |
45 | Summary: libjpeg - DLL library for Windows | |
908fb225 | 46 | Summary(pl.UTF-8): libjpeg - biblioteka DLL dla Windows |
120dba18 | 47 | Group: Applications/Emulators |
48 | ||
49 | %description dll | |
50 | libjpeg - DLL library for Windows. | |
51 | ||
b1b4f4e2 | 52 | %description dll -l pl.UTF-8 |
120dba18 | 53 | libjpeg - biblioteka DLL dla Windows. |
54 | ||
18578b4b | 55 | %prep |
56 | %setup -q -n jpeg-%{version} | |
57 | %patch0 -p1 | |
58 | %patch1 -p1 | |
59 | %patch2 -p1 | |
120dba18 | 60 | %patch3 -p1 |
18578b4b | 61 | |
62 | %build | |
63 | CC=%{target}-gcc ; export CC | |
64 | CXX=%{target}-g++ ; export CXX | |
65 | LD=%{target}-ld ; export LD | |
66 | AR=%{target}-ar ; export AR | |
67 | AS=%{target}-as ; export AS | |
68 | CROSS_COMPILE=1 ; export CROSS_COMPILE | |
69 | CPPFLAGS="-I%{arch}/include" ; export CPPFLAGS | |
70 | RANLIB=%{target}-ranlib ; export RANLIB | |
71 | LDSHARED="%{target}-gcc -shared" ; export LDSHARED | |
72 | TARGET="%{target}" ; export TARGET | |
73 | ||
74 | %configure \ | |
75 | --target=%{target} \ | |
76 | --host=%{target} \ | |
77 | --build=i386-linux \ | |
78 | --prefix=%{arch} | |
79 | ||
80 | %{__make} | |
120dba18 | 81 | %{__make} jpeg.dll |
82 | ||
83 | %{target}-strip jpeg.dll | |
84 | %{target}-strip -g -R.comment -R.note *.a | |
18578b4b | 85 | |
86 | %install | |
87 | rm -rf $RPM_BUILD_ROOT | |
88 | install -d $RPM_BUILD_ROOT%{arch}/{include,lib} | |
120dba18 | 89 | install -d $RPM_BUILD_ROOT%{_datadir}/wine/windows/system |
18578b4b | 90 | |
18578b4b | 91 | install jconfig.h jerror.h jmorecfg.h jpeglib.h jversion.h $RPM_BUILD_ROOT%{arch}/include |
120dba18 | 92 | install *.a $RPM_BUILD_ROOT%{arch}/lib |
93 | install jpeg.dll $RPM_BUILD_ROOT%{_datadir}/wine/windows/system | |
18578b4b | 94 | |
95 | %clean | |
96 | rm -rf $RPM_BUILD_ROOT | |
97 | ||
98 | %files | |
99 | %defattr(644,root,root,755) | |
100 | %{arch}/include/* | |
101 | %{arch}/lib/* | |
120dba18 | 102 | |
103 | %files dll | |
104 | %defattr(644,root,root,755) | |
105 | %{_datadir}/wine/windows/system/* |