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