]>
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} |
79afd38c | 5 | Version: 9e |
5d20461a | 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 |
79afd38c | 10 | # Source0-md5: 2489f1597b046425f5fcd3cf2df7d85f |
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 | |
79afd38c | 21 | %define _enable_debug_packages 0 |
18578b4b | 22 | |
d6a8eeef | 23 | %define target i386-mingw32 |
24 | %define target_platform i386-pc-mingw32 | |
d6a8eeef | 25 | |
26 | %define _sysprefix /usr | |
27 | %define _prefix %{_sysprefix}/%{target} | |
04555392 | 28 | %define _libdir %{_prefix}/lib |
2c83f50e | 29 | %define _pkgconfigdir %{_prefix}/lib/pkgconfig |
0599bc26 | 30 | %define _dlldir /usr/share/wine/windows/system |
d6a8eeef | 31 | %define __cc %{target}-gcc |
32 | %define __cxx %{target}-g++ | |
18578b4b | 33 | |
8a111c55 JB |
34 | %ifnarch %{ix86} |
35 | # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc | |
0e391455 | 36 | %define optflags -O2 |
37 | %endif | |
6c0f9c6d JB |
38 | |
39 | # -z options are invalid for mingw linker, most of -f options are Linux-specific | |
6df73332 | 40 | %define filterout_ld -Wl,-z,.* |
6c0f9c6d | 41 | %define filterout_c -f[-a-z0-9=]* |
0e391455 | 42 | |
18578b4b | 43 | %description |
44 | The libjpeg package contains a library of functions for manipulating | |
45 | JPEG images. | |
46 | ||
0599bc26 JB |
47 | This package contains the cross version for Win32. |
48 | ||
b1b4f4e2 JR |
49 | %description -l pl.UTF-8 |
50 | Ten pakiet zawiera bibliotekę funkcji do manipulacji plikami jpeg. | |
18578b4b | 51 | |
0599bc26 JB |
52 | Ten pakiet zawiera wersję skrośną dla Win32. |
53 | ||
54 | %package static | |
b5a53fde JB |
55 | Summary: Static libjpeg library (cross MinGW32 version) |
56 | Summary(pl.UTF-8): Statyczna biblioteka libjpeg (wersja skrośna MinGW32) | |
0599bc26 JB |
57 | Group: Development/Libraries |
58 | Requires: %{name} = %{version}-%{release} | |
59 | ||
60 | %description static | |
b5a53fde | 61 | Static libjpeg library (cross MinGW32 version). |
0599bc26 JB |
62 | |
63 | %description static -l pl.UTF-8 | |
b5a53fde | 64 | Statyczna biblioteka libjpeg (wersja skrośna MinGW32). |
0599bc26 | 65 | |
120dba18 | 66 | %package dll |
67 | Summary: libjpeg - DLL library for Windows | |
908fb225 | 68 | Summary(pl.UTF-8): libjpeg - biblioteka DLL dla Windows |
120dba18 | 69 | Group: Applications/Emulators |
0599bc26 | 70 | Requires: wine |
120dba18 | 71 | |
72 | %description dll | |
73 | libjpeg - DLL library for Windows. | |
74 | ||
b1b4f4e2 | 75 | %description dll -l pl.UTF-8 |
120dba18 | 76 | libjpeg - biblioteka DLL dla Windows. |
77 | ||
18578b4b | 78 | %prep |
79 | %setup -q -n jpeg-%{version} | |
80 | %patch0 -p1 | |
8a111c55 | 81 | |
18578b4b | 82 | %build |
18578b4b | 83 | %configure \ |
84 | --target=%{target} \ | |
85 | --host=%{target} \ | |
6df73332 | 86 | --disable-silent-rules |
d6a8eeef | 87 | |
8a111c55 | 88 | %{__make} |
d6a8eeef | 89 | |
8a111c55 JB |
90 | %install |
91 | rm -rf $RPM_BUILD_ROOT | |
d6a8eeef | 92 | |
6df73332 | 93 | %{__make} install \ |
8a111c55 | 94 | DESTDIR=$RPM_BUILD_ROOT |
d6a8eeef | 95 | |
6df73332 JB |
96 | install jversion.h $RPM_BUILD_ROOT%{_includedir} |
97 | ||
98 | # remove HAVE_STD{DEF,LIB}_H | |
99 | # (not necessary but may generate warnings confusing autoconf) | |
100 | sed -i -e 's#.*HAVE_STD..._H.*##g' $RPM_BUILD_ROOT%{_includedir}/jconfig.h | |
101 | ||
8a111c55 | 102 | install -d $RPM_BUILD_ROOT%{_dlldir} |
2c83f50e JB |
103 | %{__mv} $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir} |
104 | ||
105 | # drop binaries | |
106 | %{__rm} $RPM_BUILD_ROOT%{_bindir}/* \ | |
107 | $RPM_BUILD_ROOT%{_mandir}/man1/*.1 | |
d6a8eeef | 108 | |
9e9be21b | 109 | %if 0%{!?debug:1} |
8a111c55 JB |
110 | %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll |
111 | %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a | |
9e9be21b | 112 | %endif |
18578b4b | 113 | |
18578b4b | 114 | %clean |
115 | rm -rf $RPM_BUILD_ROOT | |
116 | ||
117 | %files | |
118 | %defattr(644,root,root,755) | |
8a111c55 | 119 | %doc README change.log |
0599bc26 JB |
120 | %{_libdir}/libjpeg.dll.a |
121 | %{_libdir}/libjpeg.la | |
8a111c55 JB |
122 | %{_includedir}/jconfig.h |
123 | %{_includedir}/jerror.h | |
124 | %{_includedir}/jmorecfg.h | |
125 | %{_includedir}/jpeglib.h | |
6df73332 | 126 | %{_includedir}/jversion.h |
2c83f50e | 127 | %{_pkgconfigdir}/libjpeg.pc |
0599bc26 JB |
128 | |
129 | %files static | |
130 | %defattr(644,root,root,755) | |
131 | %{_libdir}/libjpeg.a | |
120dba18 | 132 | |
133 | %files dll | |
134 | %defattr(644,root,root,755) | |
6c0f9c6d | 135 | %{_dlldir}/libjpeg-9.dll |