]> git.pld-linux.org Git - packages/crossmingw32-libjpeg.git/blob - crossmingw32-libjpeg.spec
a2d956b4e580eb22ab7d058df31ae6bad9b0cd24
[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:        2
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 %ifarch alpha sparc sparc64 sparcv9
33 %define         optflags        -O2
34 %endif
35
36 %description
37 The libjpeg package contains a library of functions for manipulating
38 JPEG images.
39
40 %description -l pl
41 Ten pakiet zawiera bibliotekê funkcji do manipulacji plikami jpeg.
42
43 %package dll
44 Summary:        libjpeg - DLL library for Windows
45 Summary(pl):    libjpeg - biblioteka DLL dla Windows
46 Group:          Applications/Emulators
47
48 %description dll
49 libjpeg - DLL library for Windows.
50
51 %description dll -l pl
52 libjpeg - biblioteka DLL dla Windows.
53
54 %prep
55 %setup -q -n jpeg-%{version}
56 %patch0 -p1
57 %patch1 -p1
58 %patch2 -p1
59 %patch3 -p1
60
61 %build
62 CC=%{target}-gcc ; export CC
63 CXX=%{target}-g++ ; export CXX
64 LD=%{target}-ld ; export LD
65 AR=%{target}-ar ; export AR
66 AS=%{target}-as ; export AS
67 CROSS_COMPILE=1 ; export CROSS_COMPILE
68 CPPFLAGS="-I%{arch}/include" ; export CPPFLAGS
69 RANLIB=%{target}-ranlib ; export RANLIB
70 LDSHARED="%{target}-gcc -shared" ; export LDSHARED
71 TARGET="%{target}" ; export TARGET
72
73 %configure \
74         --target=%{target} \
75         --host=%{target} \
76         --build=i386-linux \
77         --prefix=%{arch}
78
79 %{__make}
80 %{__make} jpeg.dll
81
82 %{target}-strip jpeg.dll
83 %{target}-strip -g -R.comment -R.note *.a
84
85 %install
86 rm -rf $RPM_BUILD_ROOT
87 install -d $RPM_BUILD_ROOT%{arch}/{include,lib}
88 install -d $RPM_BUILD_ROOT%{_datadir}/wine/windows/system
89
90 install jconfig.h jerror.h jmorecfg.h jpeglib.h jversion.h $RPM_BUILD_ROOT%{arch}/include
91 install *.a $RPM_BUILD_ROOT%{arch}/lib
92 install jpeg.dll $RPM_BUILD_ROOT%{_datadir}/wine/windows/system
93
94 %clean
95 rm -rf $RPM_BUILD_ROOT
96
97 %files
98 %defattr(644,root,root,755)
99 %{arch}/include/*
100 %{arch}/lib/*
101
102 %files dll
103 %defattr(644,root,root,755)
104 %{_datadir}/wine/windows/system/*
This page took 0.05407 seconds and 2 git commands to generate.