- shared lib
[packages/crossmingw32-libjpeg.git] / crossmingw32-libjpeg.spec
1 %define         realname        libjpeg
2 Summary:        Library for handling different jpeg files - Mingw32 cross version
3 Summary(pl):    Biblioteka do manipulacji plikami w formacie jpeg - wersja skro¬∂na dla Mingw32
4 Name:           crossmingw32-%{realname}
5 Version:        6b
6 Release:        1
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
14 Patch3:         %{name}-shared.patch
15 URL:            http://www.ijg.org/
16 BuildRequires:  crossmingw32-gcc
17 BuildRequires:  crossmingw32-w32api
18 BuildRequires:  libtool
19 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20
21 %define         no_install_post_strip   1
22
23 %define         target          i386-mingw32
24 %define         target_platform i386-pc-mingw32
25 %define         arch            %{_prefix}/%{target}
26 %define         gccarch         %{_prefix}/lib/gcc-lib/%{target}
27 %define         gcclib          %{_prefix}/lib/gcc-lib/%{target}/%{version}
28
29 %define         __cc            %{target}-gcc
30 %define         __cxx           %{target}-g++
31
32 %description
33 The libjpeg package contains a library of functions for manipulating
34 JPEG images.
35
36 %description -l pl
37 Ten pakiet zawiera bibliotek√™ funkcji do manipulacji plikami jpeg.
38
39 %package dll
40 Summary:        libjpeg - DLL library for Windows
41 Summary(pl):    libjpeg - biblioteka DLL dla Windows
42 Group:          Applications/Emulators
43
44 %description dll
45 libjpeg - DLL library for Windows.
46
47 %description dll -l pl
48 libjpeg - biblioteka DLL dla Windows.
49
50 %prep
51 %setup -q -n jpeg-%{version}
52 %patch0 -p1
53 %patch1 -p1
54 %patch2 -p1
55 %patch3 -p1
56
57 %build
58 CC=%{target}-gcc ; export CC
59 CXX=%{target}-g++ ; export CXX
60 LD=%{target}-ld ; export LD
61 AR=%{target}-ar ; export AR
62 AS=%{target}-as ; export AS
63 CROSS_COMPILE=1 ; export CROSS_COMPILE
64 CPPFLAGS="-I%{arch}/include" ; export CPPFLAGS
65 RANLIB=%{target}-ranlib ; export RANLIB
66 LDSHARED="%{target}-gcc -shared" ; export LDSHARED
67 TARGET="%{target}" ; export TARGET
68
69 %configure \
70         --target=%{target} \
71         --host=%{target} \
72         --build=i386-linux \
73         --prefix=%{arch}
74
75 %{__make}
76 %{__make} jpeg.dll
77
78 %{target}-strip jpeg.dll
79 %{target}-strip -g -R.comment -R.note *.a
80
81 %install
82 rm -rf $RPM_BUILD_ROOT
83 install -d $RPM_BUILD_ROOT%{arch}/{include,lib}
84 install -d $RPM_BUILD_ROOT%{_datadir}/wine/windows/system
85
86 install jconfig.h jerror.h jmorecfg.h jpeglib.h jversion.h $RPM_BUILD_ROOT%{arch}/include
87 install *.a $RPM_BUILD_ROOT%{arch}/lib
88 install jpeg.dll $RPM_BUILD_ROOT%{_datadir}/wine/windows/system
89
90 %clean
91 rm -rf $RPM_BUILD_ROOT
92
93 %files
94 %defattr(644,root,root,755)
95 %{arch}/include/*
96 %{arch}/lib/*
97
98 %files dll
99 %defattr(644,root,root,755)
100 %{_datadir}/wine/windows/system/*
This page took 0.041264 seconds and 4 git commands to generate.