- shared + static build
[packages/crossmingw32-libjpeg.git] / crossmingw32-libjpeg.spec
CommitLineData
18578b4b 1%define realname libjpeg
dbea029a 2Summary: Library for handling different jpeg files - Mingw32 cross version
908fb225 3Summary(pl.UTF-8): Biblioteka do manipulacji plikami w formacie jpeg - wersja skrośna dla Mingw32
18578b4b 4Name: crossmingw32-%{realname}
5Version: 6b
9b8c3476 6Release: 5
18578b4b 7License: distributable
8Group: Libraries
9Source0: ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v%{version}.tar.gz
10# Source0-md5: dbd5f3b47ed13132f04c685d608a7547
11Patch0: %{realname}-DESTDIR.patch
12Patch1: %{realname}-include.patch
13Patch2: %{realname}-c++.patch
120dba18 14Patch3: %{name}-shared.patch
18578b4b 15URL: http://www.ijg.org/
d54af035 16Requires: crossmingw32-runtime
18578b4b 17BuildRequires: crossmingw32-gcc
18BuildRequires: crossmingw32-w32api
19BuildRequires: libtool
20BuildRoot: %{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
41The libjpeg package contains a library of functions for manipulating
42JPEG images.
43
b1b4f4e2
JR
44%description -l pl.UTF-8
45Ten pakiet zawiera bibliotekę funkcji do manipulacji plikami jpeg.
18578b4b 46
120dba18 47%package dll
48Summary: libjpeg - DLL library for Windows
908fb225 49Summary(pl.UTF-8): libjpeg - biblioteka DLL dla Windows
120dba18 50Group: Applications/Emulators
51
52%description dll
53libjpeg - DLL library for Windows.
54
b1b4f4e2 55%description dll -l pl.UTF-8
120dba18 56libjpeg - 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
66CC=%{target}-gcc ; export CC
67CXX=%{target}-g++ ; export CXX
68LD=%{target}-ld ; export LD
69AR=%{target}-ar ; export AR
70AS=%{target}-as ; export AS
71CROSS_COMPILE=1 ; export CROSS_COMPILE
72CPPFLAGS="-I%{arch}/include" ; export CPPFLAGS
73RANLIB=%{target}-ranlib ; export RANLIB
74LDSHARED="%{target}-gcc -shared" ; export LDSHARED
75TARGET="%{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 86cat << "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).
93dlname='../bin/libjpeg.dll'
94
95# Names of this library.
96library_names='libjpeg.dll.a'
97
98# The name of the static archive.
99old_library='libjpeg.a'
100
101# Libraries that this one depends upon.
102dependency_libs=''
103
104# Version information for libz.
105current=0
106age=0
107revision=0
108
109# Is this an already installed library?
110installed=yes
111
112# Should we warn about portability when linking against -modules?
113shouldnotlink=no
114
115# Files to dlopen/dlpreopen
116dlopen=''
117dlpreopen=''
118
119# Directory that this library needs to be installed in:
120libdir='%{_libdir}'
121EOF
122
120dba18 123%{target}-strip jpeg.dll
124%{target}-strip -g -R.comment -R.note *.a
18578b4b 125
126%install
127rm -rf $RPM_BUILD_ROOT
d6a8eeef 128install -d $RPM_BUILD_ROOT%{_prefix}/{include,lib,bin}
18578b4b 129
d6a8eeef 130install jconfig.h jerror.h jmorecfg.h jpeglib.h jversion.h $RPM_BUILD_ROOT%{_includedir}
131install *.a $RPM_BUILD_ROOT%{_libdir}
132install jpeg.dll $RPM_BUILD_ROOT%{_bindir}/libjpeg.dll
133install libjpeg.la $RPM_BUILD_ROOT%{_libdir}
18578b4b 134
135%clean
136rm -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
This page took 0.050192 seconds and 4 git commands to generate.