]>
Commit | Line | Data |
---|---|---|
18578b4b | 1 | %define realname libjpeg |
b5a53fde JB |
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 | |
18578b4b | 4 | Name: crossmingw32-%{realname} |
be755873 | 5 | Version: 8b |
6df73332 | 6 | Release: 1 |
18578b4b | 7 | License: distributable |
0599bc26 | 8 | Group: Development/Libraries |
6df73332 | 9 | Source0: http://www.ijg.org/files/jpegsrc.v%{version}.tar.gz |
be755873 | 10 | # Source0-md5: e022acbc5b36cd2cb70785f5b575661e |
6df73332 | 11 | Patch0: %{realname}-maxmem-sysconf.patch |
18578b4b | 12 | URL: http://www.ijg.org/ |
8a111c55 JB |
13 | BuildRequires: autoconf >= 2.50 |
14 | BuildRequires: automake | |
18578b4b | 15 | BuildRequires: crossmingw32-gcc |
8a111c55 | 16 | BuildRequires: libtool |
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 | |
8a111c55 JB |
32 | %ifnarch %{ix86} |
33 | # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc | |
0e391455 | 34 | %define optflags -O2 |
35 | %endif | |
6df73332 JB |
36 | # -z options are invalid for mingw linker |
37 | %define filterout_ld -Wl,-z,.* | |
0e391455 | 38 | |
18578b4b | 39 | %description |
40 | The libjpeg package contains a library of functions for manipulating | |
41 | JPEG images. | |
42 | ||
0599bc26 JB |
43 | This package contains the cross version for Win32. |
44 | ||
b1b4f4e2 JR |
45 | %description -l pl.UTF-8 |
46 | Ten pakiet zawiera bibliotekę funkcji do manipulacji plikami jpeg. | |
18578b4b | 47 | |
0599bc26 JB |
48 | Ten pakiet zawiera wersję skrośną dla Win32. |
49 | ||
50 | %package static | |
b5a53fde JB |
51 | Summary: Static libjpeg library (cross MinGW32 version) |
52 | Summary(pl.UTF-8): Statyczna biblioteka libjpeg (wersja skrośna MinGW32) | |
0599bc26 JB |
53 | Group: Development/Libraries |
54 | Requires: %{name} = %{version}-%{release} | |
55 | ||
56 | %description static | |
b5a53fde | 57 | Static libjpeg library (cross MinGW32 version). |
0599bc26 JB |
58 | |
59 | %description static -l pl.UTF-8 | |
b5a53fde | 60 | Statyczna biblioteka libjpeg (wersja skrośna MinGW32). |
0599bc26 | 61 | |
120dba18 | 62 | %package dll |
63 | Summary: libjpeg - DLL library for Windows | |
908fb225 | 64 | Summary(pl.UTF-8): libjpeg - biblioteka DLL dla Windows |
120dba18 | 65 | Group: Applications/Emulators |
0599bc26 | 66 | Requires: wine |
120dba18 | 67 | |
68 | %description dll | |
69 | libjpeg - DLL library for Windows. | |
70 | ||
b1b4f4e2 | 71 | %description dll -l pl.UTF-8 |
120dba18 | 72 | libjpeg - biblioteka DLL dla Windows. |
73 | ||
18578b4b | 74 | %prep |
75 | %setup -q -n jpeg-%{version} | |
76 | %patch0 -p1 | |
8a111c55 | 77 | |
18578b4b | 78 | %build |
18578b4b | 79 | %configure \ |
80 | --target=%{target} \ | |
81 | --host=%{target} \ | |
6df73332 | 82 | --disable-silent-rules |
d6a8eeef | 83 | |
8a111c55 | 84 | %{__make} |
d6a8eeef | 85 | |
8a111c55 JB |
86 | %install |
87 | rm -rf $RPM_BUILD_ROOT | |
d6a8eeef | 88 | |
6df73332 | 89 | %{__make} install \ |
8a111c55 | 90 | DESTDIR=$RPM_BUILD_ROOT |
d6a8eeef | 91 | |
6df73332 JB |
92 | install jversion.h $RPM_BUILD_ROOT%{_includedir} |
93 | ||
94 | # remove HAVE_STD{DEF,LIB}_H | |
95 | # (not necessary but may generate warnings confusing autoconf) | |
96 | sed -i -e 's#.*HAVE_STD..._H.*##g' $RPM_BUILD_ROOT%{_includedir}/jconfig.h | |
97 | ||
8a111c55 JB |
98 | install -d $RPM_BUILD_ROOT%{_dlldir} |
99 | mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir} | |
d6a8eeef | 100 | |
9e9be21b | 101 | %if 0%{!?debug:1} |
8a111c55 JB |
102 | %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll |
103 | %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a | |
9e9be21b | 104 | %endif |
18578b4b | 105 | |
18578b4b | 106 | %clean |
107 | rm -rf $RPM_BUILD_ROOT | |
108 | ||
109 | %files | |
110 | %defattr(644,root,root,755) | |
8a111c55 | 111 | %doc README change.log |
0599bc26 JB |
112 | %{_libdir}/libjpeg.dll.a |
113 | %{_libdir}/libjpeg.la | |
8a111c55 JB |
114 | %{_includedir}/jconfig.h |
115 | %{_includedir}/jerror.h | |
116 | %{_includedir}/jmorecfg.h | |
117 | %{_includedir}/jpeglib.h | |
6df73332 | 118 | %{_includedir}/jversion.h |
0599bc26 JB |
119 | |
120 | %files static | |
121 | %defattr(644,root,root,755) | |
122 | %{_libdir}/libjpeg.a | |
120dba18 | 123 | |
124 | %files dll | |
125 | %defattr(644,root,root,755) | |
8a111c55 | 126 | %{_dlldir}/libjpeg-*.dll |