]>
Commit | Line | Data |
---|---|---|
18578b4b | 1 | %define realname libjpeg |
dbea029a | 2 | Summary: Library for handling different jpeg files - Mingw32 cross version |
908fb225 | 3 | Summary(pl.UTF-8): Biblioteka do manipulacji plikami w formacie jpeg - wersja skrośna dla Mingw32 |
18578b4b | 4 | Name: crossmingw32-%{realname} |
5 | Version: 6b | |
9b8c3476 | 6 | Release: 5 |
18578b4b | 7 | License: distributable |
8 | Group: Libraries | |
9 | Source0: ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v%{version}.tar.gz | |
10 | # Source0-md5: dbd5f3b47ed13132f04c685d608a7547 | |
11 | Patch0: %{realname}-DESTDIR.patch | |
12 | Patch1: %{realname}-include.patch | |
13 | Patch2: %{realname}-c++.patch | |
120dba18 | 14 | Patch3: %{name}-shared.patch |
18578b4b | 15 | URL: http://www.ijg.org/ |
d54af035 | 16 | Requires: crossmingw32-runtime |
18578b4b | 17 | BuildRequires: crossmingw32-gcc |
18 | BuildRequires: crossmingw32-w32api | |
19 | BuildRequires: libtool | |
20 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
21 | ||
22 | %define no_install_post_strip 1 | |
23 | ||
d6a8eeef | 24 | %define target i386-mingw32 |
25 | %define target_platform i386-pc-mingw32 | |
26 | %define arch %{_prefix}/%{target} | |
27 | %define gccarch %{_prefix}/lib/gcc-lib/%{target} | |
28 | %define gcclib %{_prefix}/lib/gcc-lib/%{target}/%{version} | |
29 | ||
30 | %define _sysprefix /usr | |
31 | %define _prefix %{_sysprefix}/%{target} | |
32 | %define _pkgconfigdir %{_prefix}/lib/pkgconfig | |
33 | %define __cc %{target}-gcc | |
34 | %define __cxx %{target}-g++ | |
18578b4b | 35 | |
0e391455 | 36 | %ifarch alpha sparc sparc64 sparcv9 |
37 | %define optflags -O2 | |
38 | %endif | |
39 | ||
18578b4b | 40 | %description |
41 | The libjpeg package contains a library of functions for manipulating | |
42 | JPEG images. | |
43 | ||
b1b4f4e2 JR |
44 | %description -l pl.UTF-8 |
45 | Ten pakiet zawiera bibliotekę funkcji do manipulacji plikami jpeg. | |
18578b4b | 46 | |
120dba18 | 47 | %package dll |
48 | Summary: libjpeg - DLL library for Windows | |
908fb225 | 49 | Summary(pl.UTF-8): libjpeg - biblioteka DLL dla Windows |
120dba18 | 50 | Group: Applications/Emulators |
51 | ||
52 | %description dll | |
53 | libjpeg - DLL library for Windows. | |
54 | ||
b1b4f4e2 | 55 | %description dll -l pl.UTF-8 |
120dba18 | 56 | libjpeg - biblioteka DLL dla Windows. |
57 | ||
18578b4b | 58 | %prep |
59 | %setup -q -n jpeg-%{version} | |
60 | %patch0 -p1 | |
61 | %patch1 -p1 | |
62 | %patch2 -p1 | |
120dba18 | 63 | %patch3 -p1 |
18578b4b | 64 | |
65 | %build | |
66 | CC=%{target}-gcc ; export CC | |
67 | CXX=%{target}-g++ ; export CXX | |
68 | LD=%{target}-ld ; export LD | |
69 | AR=%{target}-ar ; export AR | |
70 | AS=%{target}-as ; export AS | |
71 | CROSS_COMPILE=1 ; export CROSS_COMPILE | |
72 | CPPFLAGS="-I%{arch}/include" ; export CPPFLAGS | |
73 | RANLIB=%{target}-ranlib ; export RANLIB | |
74 | LDSHARED="%{target}-gcc -shared" ; export LDSHARED | |
75 | TARGET="%{target}" ; export TARGET | |
76 | ||
77 | %configure \ | |
78 | --target=%{target} \ | |
79 | --host=%{target} \ | |
80 | --build=i386-linux \ | |
81 | --prefix=%{arch} | |
82 | ||
83 | %{__make} | |
120dba18 | 84 | %{__make} jpeg.dll |
85 | ||
d6a8eeef | 86 | cat << "EOF" >> libjpeg.la |
87 | # libjpeg.la - a libtool library file | |
88 | # Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) | |
89 | # ^^^^ This line needs to stay | |
90 | # Made by czarny czarny at pld-linux.org | |
91 | ||
92 | # The name that we can dlopen(3). | |
93 | dlname='../bin/libjpeg.dll' | |
94 | ||
95 | # Names of this library. | |
96 | library_names='libjpeg.dll.a' | |
97 | ||
98 | # The name of the static archive. | |
99 | old_library='libjpeg.a' | |
100 | ||
101 | # Libraries that this one depends upon. | |
102 | dependency_libs='' | |
103 | ||
104 | # Version information for libz. | |
105 | current=0 | |
106 | age=0 | |
107 | revision=0 | |
108 | ||
109 | # Is this an already installed library? | |
110 | installed=yes | |
111 | ||
112 | # Should we warn about portability when linking against -modules? | |
113 | shouldnotlink=no | |
114 | ||
115 | # Files to dlopen/dlpreopen | |
116 | dlopen='' | |
117 | dlpreopen='' | |
118 | ||
119 | # Directory that this library needs to be installed in: | |
120 | libdir='%{_libdir}' | |
121 | EOF | |
122 | ||
120dba18 | 123 | %{target}-strip jpeg.dll |
124 | %{target}-strip -g -R.comment -R.note *.a | |
18578b4b | 125 | |
126 | %install | |
127 | rm -rf $RPM_BUILD_ROOT | |
d6a8eeef | 128 | install -d $RPM_BUILD_ROOT%{_prefix}/{include,lib,bin} |
18578b4b | 129 | |
d6a8eeef | 130 | install jconfig.h jerror.h jmorecfg.h jpeglib.h jversion.h $RPM_BUILD_ROOT%{_includedir} |
131 | install *.a $RPM_BUILD_ROOT%{_libdir} | |
132 | install jpeg.dll $RPM_BUILD_ROOT%{_bindir}/libjpeg.dll | |
133 | install libjpeg.la $RPM_BUILD_ROOT%{_libdir} | |
18578b4b | 134 | |
135 | %clean | |
136 | rm -rf $RPM_BUILD_ROOT | |
137 | ||
138 | %files | |
139 | %defattr(644,root,root,755) | |
d6a8eeef | 140 | %{_includedir}/*.h |
141 | %{_libdir}/*.la | |
142 | %{_libdir}/*.a | |
120dba18 | 143 | |
144 | %files dll | |
145 | %defattr(644,root,root,755) | |
d6a8eeef | 146 | %{_bindir}/*.dll |