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