]>
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 |
0599bc26 | 8 | Group: Development/Libraries |
18578b4b | 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/ |
16 | BuildRequires: crossmingw32-gcc | |
0599bc26 | 17 | Requires: crossmingw32-runtime |
18578b4b | 18 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
19 | ||
20 | %define no_install_post_strip 1 | |
21 | ||
d6a8eeef | 22 | %define target i386-mingw32 |
23 | %define target_platform i386-pc-mingw32 | |
d6a8eeef | 24 | |
25 | %define _sysprefix /usr | |
26 | %define _prefix %{_sysprefix}/%{target} | |
04555392 | 27 | %define _libdir %{_prefix}/lib |
0599bc26 | 28 | %define _dlldir /usr/share/wine/windows/system |
d6a8eeef | 29 | %define __cc %{target}-gcc |
30 | %define __cxx %{target}-g++ | |
18578b4b | 31 | |
0e391455 | 32 | %ifarch alpha sparc sparc64 sparcv9 |
33 | %define optflags -O2 | |
34 | %endif | |
35 | ||
18578b4b | 36 | %description |
37 | The libjpeg package contains a library of functions for manipulating | |
38 | JPEG images. | |
39 | ||
0599bc26 JB |
40 | This package contains the cross version for Win32. |
41 | ||
b1b4f4e2 JR |
42 | %description -l pl.UTF-8 |
43 | Ten pakiet zawiera bibliotekę funkcji do manipulacji plikami jpeg. | |
18578b4b | 44 | |
0599bc26 JB |
45 | Ten pakiet zawiera wersję skrośną dla Win32. |
46 | ||
47 | %package static | |
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} | |
52 | ||
53 | %description static | |
54 | Static libjpeg library (cross mingw32 version). | |
55 | ||
56 | %description static -l pl.UTF-8 | |
57 | Statyczna biblioteka libjpeg (wersja skrośna mingw32). | |
58 | ||
120dba18 | 59 | %package dll |
60 | Summary: libjpeg - DLL library for Windows | |
908fb225 | 61 | Summary(pl.UTF-8): libjpeg - biblioteka DLL dla Windows |
120dba18 | 62 | Group: Applications/Emulators |
0599bc26 | 63 | Requires: wine |
120dba18 | 64 | |
65 | %description dll | |
66 | libjpeg - DLL library for Windows. | |
67 | ||
b1b4f4e2 | 68 | %description dll -l pl.UTF-8 |
120dba18 | 69 | libjpeg - biblioteka DLL dla Windows. |
70 | ||
18578b4b | 71 | %prep |
72 | %setup -q -n jpeg-%{version} | |
73 | %patch0 -p1 | |
74 | %patch1 -p1 | |
75 | %patch2 -p1 | |
120dba18 | 76 | %patch3 -p1 |
18578b4b | 77 | |
78 | %build | |
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 | |
04555392 | 85 | CPPFLAGS="-I%{_includedir}" ; export CPPFLAGS |
18578b4b | 86 | RANLIB=%{target}-ranlib ; export RANLIB |
87 | LDSHARED="%{target}-gcc -shared" ; export LDSHARED | |
88 | TARGET="%{target}" ; export TARGET | |
89 | ||
90 | %configure \ | |
91 | --target=%{target} \ | |
92 | --host=%{target} \ | |
04555392 | 93 | --build=i386-linux |
18578b4b | 94 | |
95 | %{__make} | |
120dba18 | 96 | %{__make} jpeg.dll |
97 | ||
d6a8eeef | 98 | cat << "EOF" >> libjpeg.la |
99 | # libjpeg.la - a libtool library file | |
100 | # Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) | |
101 | # ^^^^ This line needs to stay | |
102 | # Made by czarny czarny at pld-linux.org | |
103 | ||
104 | # The name that we can dlopen(3). | |
105 | dlname='../bin/libjpeg.dll' | |
106 | ||
107 | # Names of this library. | |
108 | library_names='libjpeg.dll.a' | |
109 | ||
110 | # The name of the static archive. | |
111 | old_library='libjpeg.a' | |
112 | ||
113 | # Libraries that this one depends upon. | |
114 | dependency_libs='' | |
115 | ||
763f7f07 | 116 | # Version information for libjpeg. |
d6a8eeef | 117 | current=0 |
118 | age=0 | |
119 | revision=0 | |
120 | ||
121 | # Is this an already installed library? | |
122 | installed=yes | |
123 | ||
124 | # Should we warn about portability when linking against -modules? | |
125 | shouldnotlink=no | |
126 | ||
127 | # Files to dlopen/dlpreopen | |
128 | dlopen='' | |
129 | dlpreopen='' | |
130 | ||
131 | # Directory that this library needs to be installed in: | |
132 | libdir='%{_libdir}' | |
133 | EOF | |
134 | ||
9e9be21b | 135 | %if 0%{!?debug:1} |
120dba18 | 136 | %{target}-strip jpeg.dll |
137 | %{target}-strip -g -R.comment -R.note *.a | |
9e9be21b | 138 | %endif |
18578b4b | 139 | |
140 | %install | |
141 | rm -rf $RPM_BUILD_ROOT | |
9e9be21b | 142 | install -d $RPM_BUILD_ROOT{%{_includedir},%{_libdir},%{_dlldir}} |
18578b4b | 143 | |
d6a8eeef | 144 | install jconfig.h jerror.h jmorecfg.h jpeglib.h jversion.h $RPM_BUILD_ROOT%{_includedir} |
145 | install *.a $RPM_BUILD_ROOT%{_libdir} | |
9e9be21b | 146 | install jpeg.dll $RPM_BUILD_ROOT%{_dlldir}/libjpeg.dll |
d6a8eeef | 147 | install libjpeg.la $RPM_BUILD_ROOT%{_libdir} |
18578b4b | 148 | |
149 | %clean | |
150 | rm -rf $RPM_BUILD_ROOT | |
151 | ||
152 | %files | |
153 | %defattr(644,root,root,755) | |
0599bc26 JB |
154 | %{_libdir}/libjpeg.dll.a |
155 | %{_libdir}/libjpeg.la | |
d6a8eeef | 156 | %{_includedir}/*.h |
0599bc26 JB |
157 | |
158 | %files static | |
159 | %defattr(644,root,root,755) | |
160 | %{_libdir}/libjpeg.a | |
120dba18 | 161 | |
162 | %files dll | |
163 | %defattr(644,root,root,755) | |
9e9be21b | 164 | %{_dlldir}/libjpeg.dll |