- cleanup, separated -static
[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
0599bc26 8Group: Development/Libraries
18578b4b 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/
16BuildRequires: crossmingw32-gcc
0599bc26 17Requires: crossmingw32-runtime
18578b4b 18BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
20%define no_install_post_strip 1
21
d6a8eeef 22%define target i386-mingw32
23%define target_platform i386-pc-mingw32
24%define arch %{_prefix}/%{target}
d6a8eeef 25
26%define _sysprefix /usr
27%define _prefix %{_sysprefix}/%{target}
0599bc26 28%define _dlldir /usr/share/wine/windows/system
d6a8eeef 29%define __cc %{target}-gcc
30%define __cxx %{target}-g++
18578b4b 31
0e391455 32%ifarch alpha sparc sparc64 sparcv9
33%define optflags -O2
34%endif
35
18578b4b 36%description
37The libjpeg package contains a library of functions for manipulating
38JPEG images.
39
0599bc26
JB
40This package contains the cross version for Win32.
41
b1b4f4e2
JR
42%description -l pl.UTF-8
43Ten pakiet zawiera bibliotekę funkcji do manipulacji plikami jpeg.
18578b4b 44
0599bc26
JB
45Ten pakiet zawiera wersję skrośną dla Win32.
46
47%package static
48Summary: Static libjpeg library (cross mingw32 version)
49Summary(pl.UTF-8): Statyczna biblioteka libjpeg (wersja skrośna mingw32)
50Group: Development/Libraries
51Requires: %{name} = %{version}-%{release}
52
53%description static
54Static libjpeg library (cross mingw32 version).
55
56%description static -l pl.UTF-8
57Statyczna biblioteka libjpeg (wersja skrośna mingw32).
58
120dba18 59%package dll
60Summary: libjpeg - DLL library for Windows
908fb225 61Summary(pl.UTF-8): libjpeg - biblioteka DLL dla Windows
120dba18 62Group: Applications/Emulators
0599bc26 63Requires: wine
120dba18 64
65%description dll
66libjpeg - DLL library for Windows.
67
b1b4f4e2 68%description dll -l pl.UTF-8
120dba18 69libjpeg - biblioteka DLL dla Windows.
70
18578b4b 71%prep
72%setup -q -n jpeg-%{version}
73%patch0 -p1
74%patch1 -p1
75%patch2 -p1
120dba18 76%patch3 -p1
18578b4b 77
78%build
79CC=%{target}-gcc ; export CC
80CXX=%{target}-g++ ; export CXX
81LD=%{target}-ld ; export LD
82AR=%{target}-ar ; export AR
83AS=%{target}-as ; export AS
84CROSS_COMPILE=1 ; export CROSS_COMPILE
85CPPFLAGS="-I%{arch}/include" ; export CPPFLAGS
86RANLIB=%{target}-ranlib ; export RANLIB
87LDSHARED="%{target}-gcc -shared" ; export LDSHARED
88TARGET="%{target}" ; export TARGET
89
90%configure \
91 --target=%{target} \
92 --host=%{target} \
93 --build=i386-linux \
94 --prefix=%{arch}
95
96%{__make}
120dba18 97%{__make} jpeg.dll
98
d6a8eeef 99cat << "EOF" >> libjpeg.la
100# libjpeg.la - a libtool library file
101# Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06)
102# ^^^^ This line needs to stay
103# Made by czarny czarny at pld-linux.org
104
105# The name that we can dlopen(3).
106dlname='../bin/libjpeg.dll'
107
108# Names of this library.
109library_names='libjpeg.dll.a'
110
111# The name of the static archive.
112old_library='libjpeg.a'
113
114# Libraries that this one depends upon.
115dependency_libs=''
116
117# Version information for libz.
118current=0
119age=0
120revision=0
121
122# Is this an already installed library?
123installed=yes
124
125# Should we warn about portability when linking against -modules?
126shouldnotlink=no
127
128# Files to dlopen/dlpreopen
129dlopen=''
130dlpreopen=''
131
132# Directory that this library needs to be installed in:
133libdir='%{_libdir}'
134EOF
135
120dba18 136%{target}-strip jpeg.dll
137%{target}-strip -g -R.comment -R.note *.a
18578b4b 138
139%install
140rm -rf $RPM_BUILD_ROOT
d6a8eeef 141install -d $RPM_BUILD_ROOT%{_prefix}/{include,lib,bin}
18578b4b 142
d6a8eeef 143install jconfig.h jerror.h jmorecfg.h jpeglib.h jversion.h $RPM_BUILD_ROOT%{_includedir}
144install *.a $RPM_BUILD_ROOT%{_libdir}
145install jpeg.dll $RPM_BUILD_ROOT%{_bindir}/libjpeg.dll
146install libjpeg.la $RPM_BUILD_ROOT%{_libdir}
18578b4b 147
148%clean
149rm -rf $RPM_BUILD_ROOT
150
151%files
152%defattr(644,root,root,755)
0599bc26
JB
153%{_libdir}/libjpeg.dll.a
154%{_libdir}/libjpeg.la
d6a8eeef 155%{_includedir}/*.h
0599bc26
JB
156
157%files static
158%defattr(644,root,root,755)
159%{_libdir}/libjpeg.a
120dba18 160
161%files dll
162%defattr(644,root,root,755)
0599bc26 163%{_bindir}/libjpeg.dll
This page took 0.074888 seconds and 4 git commands to generate.