]>
Commit | Line | Data |
---|---|---|
1 | %define realname libjpeg | |
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 | |
4 | Name: crossmingw32-%{realname} | |
5 | Version: 8a | |
6 | Release: 1 | |
7 | License: distributable | |
8 | Group: Development/Libraries | |
9 | Source0: http://www.ijg.org/files/jpegsrc.v%{version}.tar.gz | |
10 | # Source0-md5: 5146e68be3633c597b0d14d3ed8fa2ea | |
11 | Patch0: %{realname}-maxmem-sysconf.patch | |
12 | URL: http://www.ijg.org/ | |
13 | BuildRequires: autoconf >= 2.50 | |
14 | BuildRequires: automake | |
15 | BuildRequires: crossmingw32-gcc | |
16 | BuildRequires: libtool | |
17 | Requires: crossmingw32-runtime | |
18 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
19 | ||
20 | %define no_install_post_strip 1 | |
21 | ||
22 | %define target i386-mingw32 | |
23 | %define target_platform i386-pc-mingw32 | |
24 | ||
25 | %define _sysprefix /usr | |
26 | %define _prefix %{_sysprefix}/%{target} | |
27 | %define _libdir %{_prefix}/lib | |
28 | %define _dlldir /usr/share/wine/windows/system | |
29 | %define __cc %{target}-gcc | |
30 | %define __cxx %{target}-g++ | |
31 | ||
32 | %ifnarch %{ix86} | |
33 | # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc | |
34 | %define optflags -O2 | |
35 | %endif | |
36 | # -z options are invalid for mingw linker | |
37 | %define filterout_ld -Wl,-z,.* | |
38 | ||
39 | %description | |
40 | The libjpeg package contains a library of functions for manipulating | |
41 | JPEG images. | |
42 | ||
43 | This package contains the cross version for Win32. | |
44 | ||
45 | %description -l pl.UTF-8 | |
46 | Ten pakiet zawiera bibliotekę funkcji do manipulacji plikami jpeg. | |
47 | ||
48 | Ten pakiet zawiera wersję skrośną dla Win32. | |
49 | ||
50 | %package static | |
51 | Summary: Static libjpeg library (cross mingw32 version) | |
52 | Summary(pl.UTF-8): Statyczna biblioteka libjpeg (wersja skrośna mingw32) | |
53 | Group: Development/Libraries | |
54 | Requires: %{name} = %{version}-%{release} | |
55 | ||
56 | %description static | |
57 | Static libjpeg library (cross mingw32 version). | |
58 | ||
59 | %description static -l pl.UTF-8 | |
60 | Statyczna biblioteka libjpeg (wersja skrośna mingw32). | |
61 | ||
62 | %package dll | |
63 | Summary: libjpeg - DLL library for Windows | |
64 | Summary(pl.UTF-8): libjpeg - biblioteka DLL dla Windows | |
65 | Group: Applications/Emulators | |
66 | Requires: wine | |
67 | ||
68 | %description dll | |
69 | libjpeg - DLL library for Windows. | |
70 | ||
71 | %description dll -l pl.UTF-8 | |
72 | libjpeg - biblioteka DLL dla Windows. | |
73 | ||
74 | %prep | |
75 | %setup -q -n jpeg-%{version} | |
76 | %patch0 -p1 | |
77 | ||
78 | %build | |
79 | %configure \ | |
80 | --target=%{target} \ | |
81 | --host=%{target} \ | |
82 | --disable-silent-rules | |
83 | ||
84 | %{__make} | |
85 | ||
86 | %install | |
87 | rm -rf $RPM_BUILD_ROOT | |
88 | ||
89 | %{__make} install \ | |
90 | DESTDIR=$RPM_BUILD_ROOT | |
91 | ||
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 | ||
98 | install -d $RPM_BUILD_ROOT%{_dlldir} | |
99 | mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir} | |
100 | ||
101 | %if 0%{!?debug:1} | |
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 | |
104 | %endif | |
105 | ||
106 | %clean | |
107 | rm -rf $RPM_BUILD_ROOT | |
108 | ||
109 | %files | |
110 | %defattr(644,root,root,755) | |
111 | %doc README change.log | |
112 | %{_libdir}/libjpeg.dll.a | |
113 | %{_libdir}/libjpeg.la | |
114 | %{_includedir}/jconfig.h | |
115 | %{_includedir}/jerror.h | |
116 | %{_includedir}/jmorecfg.h | |
117 | %{_includedir}/jpeglib.h | |
118 | %{_includedir}/jversion.h | |
119 | ||
120 | %files static | |
121 | %defattr(644,root,root,755) | |
122 | %{_libdir}/libjpeg.a | |
123 | ||
124 | %files dll | |
125 | %defattr(644,root,root,755) | |
126 | %{_dlldir}/libjpeg-*.dll |