- updated to 9d
[packages/crossmingw32-libjpeg.git] / crossmingw32-libjpeg.spec
CommitLineData
18578b4b 1%define realname libjpeg
b5a53fde
JB
2Summary: Library for handling different jpeg files - MinGW32 cross version
3Summary(pl.UTF-8): Biblioteka do manipulacji plikami w formacie jpeg - wersja skrośna dla MinGW32
18578b4b 4Name: crossmingw32-%{realname}
d9e0d7c2 5Version: 9d
5d20461a 6Release: 1
18578b4b 7License: distributable
0599bc26 8Group: Development/Libraries
6df73332 9Source0: http://www.ijg.org/files/jpegsrc.v%{version}.tar.gz
d9e0d7c2 10# Source0-md5: 693a4e10906e66467ca21f045547fe15
6df73332 11Patch0: %{realname}-maxmem-sysconf.patch
18578b4b 12URL: http://www.ijg.org/
8a111c55
JB
13BuildRequires: autoconf >= 2.50
14BuildRequires: automake
18578b4b 15BuildRequires: crossmingw32-gcc
8a111c55 16BuildRequires: libtool
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
d6a8eeef 24
25%define _sysprefix /usr
26%define _prefix %{_sysprefix}/%{target}
04555392 27%define _libdir %{_prefix}/lib
2c83f50e 28%define _pkgconfigdir %{_prefix}/lib/pkgconfig
0599bc26 29%define _dlldir /usr/share/wine/windows/system
d6a8eeef 30%define __cc %{target}-gcc
31%define __cxx %{target}-g++
18578b4b 32
8a111c55
JB
33%ifnarch %{ix86}
34# arch-specific flags (like alpha's -mieee) are not valid for i386 gcc
0e391455 35%define optflags -O2
36%endif
6c0f9c6d
JB
37
38# -z options are invalid for mingw linker, most of -f options are Linux-specific
6df73332 39%define filterout_ld -Wl,-z,.*
6c0f9c6d 40%define filterout_c -f[-a-z0-9=]*
0e391455 41
18578b4b 42%description
43The libjpeg package contains a library of functions for manipulating
44JPEG images.
45
0599bc26
JB
46This package contains the cross version for Win32.
47
b1b4f4e2
JR
48%description -l pl.UTF-8
49Ten pakiet zawiera bibliotekę funkcji do manipulacji plikami jpeg.
18578b4b 50
0599bc26
JB
51Ten pakiet zawiera wersję skrośną dla Win32.
52
53%package static
b5a53fde
JB
54Summary: Static libjpeg library (cross MinGW32 version)
55Summary(pl.UTF-8): Statyczna biblioteka libjpeg (wersja skrośna MinGW32)
0599bc26
JB
56Group: Development/Libraries
57Requires: %{name} = %{version}-%{release}
58
59%description static
b5a53fde 60Static libjpeg library (cross MinGW32 version).
0599bc26
JB
61
62%description static -l pl.UTF-8
b5a53fde 63Statyczna biblioteka libjpeg (wersja skrośna MinGW32).
0599bc26 64
120dba18 65%package dll
66Summary: libjpeg - DLL library for Windows
908fb225 67Summary(pl.UTF-8): libjpeg - biblioteka DLL dla Windows
120dba18 68Group: Applications/Emulators
0599bc26 69Requires: wine
120dba18 70
71%description dll
72libjpeg - DLL library for Windows.
73
b1b4f4e2 74%description dll -l pl.UTF-8
120dba18 75libjpeg - biblioteka DLL dla Windows.
76
18578b4b 77%prep
78%setup -q -n jpeg-%{version}
79%patch0 -p1
8a111c55 80
18578b4b 81%build
18578b4b 82%configure \
83 --target=%{target} \
84 --host=%{target} \
6df73332 85 --disable-silent-rules
d6a8eeef 86
8a111c55 87%{__make}
d6a8eeef 88
8a111c55
JB
89%install
90rm -rf $RPM_BUILD_ROOT
d6a8eeef 91
6df73332 92%{__make} install \
8a111c55 93 DESTDIR=$RPM_BUILD_ROOT
d6a8eeef 94
6df73332
JB
95install jversion.h $RPM_BUILD_ROOT%{_includedir}
96
97# remove HAVE_STD{DEF,LIB}_H
98# (not necessary but may generate warnings confusing autoconf)
99sed -i -e 's#.*HAVE_STD..._H.*##g' $RPM_BUILD_ROOT%{_includedir}/jconfig.h
100
8a111c55 101install -d $RPM_BUILD_ROOT%{_dlldir}
2c83f50e
JB
102%{__mv} $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir}
103
104# drop binaries
105%{__rm} $RPM_BUILD_ROOT%{_bindir}/* \
106 $RPM_BUILD_ROOT%{_mandir}/man1/*.1
d6a8eeef 107
9e9be21b 108%if 0%{!?debug:1}
8a111c55
JB
109%{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll
110%{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a
9e9be21b 111%endif
18578b4b 112
18578b4b 113%clean
114rm -rf $RPM_BUILD_ROOT
115
116%files
117%defattr(644,root,root,755)
8a111c55 118%doc README change.log
0599bc26
JB
119%{_libdir}/libjpeg.dll.a
120%{_libdir}/libjpeg.la
8a111c55
JB
121%{_includedir}/jconfig.h
122%{_includedir}/jerror.h
123%{_includedir}/jmorecfg.h
124%{_includedir}/jpeglib.h
6df73332 125%{_includedir}/jversion.h
2c83f50e 126%{_pkgconfigdir}/libjpeg.pc
0599bc26
JB
127
128%files static
129%defattr(644,root,root,755)
130%{_libdir}/libjpeg.a
120dba18 131
132%files dll
133%defattr(644,root,root,755)
6c0f9c6d 134%{_dlldir}/libjpeg-9.dll
This page took 0.109333 seconds and 5 git commands to generate.