]>
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/ |
8a111c55 JB |
16 | BuildRequires: autoconf >= 2.50 |
17 | BuildRequires: automake | |
18578b4b | 18 | BuildRequires: crossmingw32-gcc |
8a111c55 | 19 | BuildRequires: libtool |
0599bc26 | 20 | Requires: crossmingw32-runtime |
18578b4b | 21 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
22 | ||
23 | %define no_install_post_strip 1 | |
24 | ||
d6a8eeef | 25 | %define target i386-mingw32 |
26 | %define target_platform i386-pc-mingw32 | |
d6a8eeef | 27 | |
28 | %define _sysprefix /usr | |
29 | %define _prefix %{_sysprefix}/%{target} | |
04555392 | 30 | %define _libdir %{_prefix}/lib |
0599bc26 | 31 | %define _dlldir /usr/share/wine/windows/system |
d6a8eeef | 32 | %define __cc %{target}-gcc |
33 | %define __cxx %{target}-g++ | |
18578b4b | 34 | |
8a111c55 JB |
35 | %ifnarch %{ix86} |
36 | # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc | |
0e391455 | 37 | %define optflags -O2 |
38 | %endif | |
39 | ||
18578b4b | 40 | %description |
41 | The libjpeg package contains a library of functions for manipulating | |
42 | JPEG images. | |
43 | ||
0599bc26 JB |
44 | This package contains the cross version for Win32. |
45 | ||
b1b4f4e2 JR |
46 | %description -l pl.UTF-8 |
47 | Ten pakiet zawiera bibliotekę funkcji do manipulacji plikami jpeg. | |
18578b4b | 48 | |
0599bc26 JB |
49 | Ten pakiet zawiera wersję skrośną dla Win32. |
50 | ||
51 | %package static | |
52 | Summary: Static libjpeg library (cross mingw32 version) | |
53 | Summary(pl.UTF-8): Statyczna biblioteka libjpeg (wersja skrośna mingw32) | |
54 | Group: Development/Libraries | |
55 | Requires: %{name} = %{version}-%{release} | |
56 | ||
57 | %description static | |
58 | Static libjpeg library (cross mingw32 version). | |
59 | ||
60 | %description static -l pl.UTF-8 | |
61 | Statyczna biblioteka libjpeg (wersja skrośna mingw32). | |
62 | ||
120dba18 | 63 | %package dll |
64 | Summary: libjpeg - DLL library for Windows | |
908fb225 | 65 | Summary(pl.UTF-8): libjpeg - biblioteka DLL dla Windows |
120dba18 | 66 | Group: Applications/Emulators |
0599bc26 | 67 | Requires: wine |
120dba18 | 68 | |
69 | %description dll | |
70 | libjpeg - DLL library for Windows. | |
71 | ||
b1b4f4e2 | 72 | %description dll -l pl.UTF-8 |
120dba18 | 73 | libjpeg - biblioteka DLL dla Windows. |
74 | ||
18578b4b | 75 | %prep |
76 | %setup -q -n jpeg-%{version} | |
77 | %patch0 -p1 | |
78 | %patch1 -p1 | |
79 | %patch2 -p1 | |
120dba18 | 80 | %patch3 -p1 |
18578b4b | 81 | |
8a111c55 JB |
82 | cp /usr/share/automake/config.* . |
83 | ||
84 | # hack: use recent libtool by configuring for mingw32 in separate dir | |
85 | # (cannot regenerate main ac/lt because of missing configure.in) | |
86 | mkdir lthack | |
87 | cd lthack | |
88 | cat >configure.ac <<EOF | |
89 | AC_INIT(lthack, 0) | |
90 | AC_CONFIG_AUX_DIR(..) | |
91 | AC_PROG_LIBTOOL | |
92 | EOF | |
93 | ||
18578b4b | 94 | %build |
8a111c55 JB |
95 | cd lthack |
96 | %{__libtoolize} | |
97 | %{__aclocal} | |
98 | %{__autoconf} | |
99 | %configure \ | |
100 | --target=%{target} \ | |
101 | --host=%{target} | |
102 | cd .. | |
18578b4b | 103 | |
104 | %configure \ | |
105 | --target=%{target} \ | |
106 | --host=%{target} \ | |
8a111c55 JB |
107 | --enable-shared \ |
108 | --enable-static | |
d6a8eeef | 109 | |
8a111c55 | 110 | cp -f lthack/libtool . |
d6a8eeef | 111 | |
8a111c55 | 112 | %{__make} |
d6a8eeef | 113 | |
8a111c55 JB |
114 | %install |
115 | rm -rf $RPM_BUILD_ROOT | |
116 | install -d $RPM_BUILD_ROOT{%{_includedir},%{_libdir},%{_dlldir}} | |
d6a8eeef | 117 | |
8a111c55 JB |
118 | %{__make} install-headers install-lib \ |
119 | libdir=%{_libdir} \ | |
120 | DESTDIR=$RPM_BUILD_ROOT | |
d6a8eeef | 121 | |
8a111c55 JB |
122 | install -d $RPM_BUILD_ROOT%{_dlldir} |
123 | mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir} | |
d6a8eeef | 124 | |
9e9be21b | 125 | %if 0%{!?debug:1} |
8a111c55 JB |
126 | %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll |
127 | %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a | |
9e9be21b | 128 | %endif |
18578b4b | 129 | |
18578b4b | 130 | %clean |
131 | rm -rf $RPM_BUILD_ROOT | |
132 | ||
133 | %files | |
134 | %defattr(644,root,root,755) | |
8a111c55 | 135 | %doc README change.log |
0599bc26 JB |
136 | %{_libdir}/libjpeg.dll.a |
137 | %{_libdir}/libjpeg.la | |
8a111c55 JB |
138 | %{_includedir}/jconfig.h |
139 | %{_includedir}/jerror.h | |
140 | %{_includedir}/jmorecfg.h | |
141 | %{_includedir}/jpeglib.h | |
0599bc26 JB |
142 | |
143 | %files static | |
144 | %defattr(644,root,root,755) | |
145 | %{_libdir}/libjpeg.a | |
120dba18 | 146 | |
147 | %files dll | |
148 | %defattr(644,root,root,755) | |
8a111c55 | 149 | %{_dlldir}/libjpeg-*.dll |