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