- updated shared patch, replaced one pseudo-libtool hack with another using real...
[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/
8a111c55
JB
16BuildRequires: autoconf >= 2.50
17BuildRequires: automake
18578b4b 18BuildRequires: crossmingw32-gcc
8a111c55 19BuildRequires: libtool
0599bc26 20Requires: crossmingw32-runtime
18578b4b 21BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23%define no_install_post_strip 1
24
d6a8eeef 25%define target i386-mingw32
26%define target_platform i386-pc-mingw32
d6a8eeef 27
28%define _sysprefix /usr
29%define _prefix %{_sysprefix}/%{target}
04555392 30%define _libdir %{_prefix}/lib
0599bc26 31%define _dlldir /usr/share/wine/windows/system
d6a8eeef 32%define __cc %{target}-gcc
33%define __cxx %{target}-g++
18578b4b 34
8a111c55
JB
35%ifnarch %{ix86}
36# arch-specific flags (like alpha's -mieee) are not valid for i386 gcc
0e391455 37%define optflags -O2
38%endif
39
18578b4b 40%description
41The libjpeg package contains a library of functions for manipulating
42JPEG images.
43
0599bc26
JB
44This package contains the cross version for Win32.
45
b1b4f4e2
JR
46%description -l pl.UTF-8
47Ten pakiet zawiera bibliotekę funkcji do manipulacji plikami jpeg.
18578b4b 48
0599bc26
JB
49Ten pakiet zawiera wersję skrośną dla Win32.
50
51%package static
52Summary: Static libjpeg library (cross mingw32 version)
53Summary(pl.UTF-8): Statyczna biblioteka libjpeg (wersja skrośna mingw32)
54Group: Development/Libraries
55Requires: %{name} = %{version}-%{release}
56
57%description static
58Static libjpeg library (cross mingw32 version).
59
60%description static -l pl.UTF-8
61Statyczna biblioteka libjpeg (wersja skrośna mingw32).
62
120dba18 63%package dll
64Summary: libjpeg - DLL library for Windows
908fb225 65Summary(pl.UTF-8): libjpeg - biblioteka DLL dla Windows
120dba18 66Group: Applications/Emulators
0599bc26 67Requires: wine
120dba18 68
69%description dll
70libjpeg - DLL library for Windows.
71
b1b4f4e2 72%description dll -l pl.UTF-8
120dba18 73libjpeg - biblioteka DLL dla Windows.
74
18578b4b 75%prep
76%setup -q -n jpeg-%{version}
77%patch0 -p1
78%patch1 -p1
79%patch2 -p1
120dba18 80%patch3 -p1
18578b4b 81
8a111c55
JB
82cp /usr/share/automake/config.* .
83
84# hack: use recent libtool by configuring for mingw32 in separate dir
85# (cannot regenerate main ac/lt because of missing configure.in)
86mkdir lthack
87cd lthack
88cat >configure.ac <<EOF
89AC_INIT(lthack, 0)
90AC_CONFIG_AUX_DIR(..)
91AC_PROG_LIBTOOL
92EOF
93
18578b4b 94%build
8a111c55
JB
95cd lthack
96%{__libtoolize}
97%{__aclocal}
98%{__autoconf}
99%configure \
100 --target=%{target} \
101 --host=%{target}
102cd ..
18578b4b 103
104%configure \
105 --target=%{target} \
106 --host=%{target} \
8a111c55
JB
107 --enable-shared \
108 --enable-static
d6a8eeef 109
8a111c55 110cp -f lthack/libtool .
d6a8eeef 111
8a111c55 112%{__make}
d6a8eeef 113
8a111c55
JB
114%install
115rm -rf $RPM_BUILD_ROOT
116install -d $RPM_BUILD_ROOT{%{_includedir},%{_libdir},%{_dlldir}}
d6a8eeef 117
8a111c55
JB
118%{__make} install-headers install-lib \
119 libdir=%{_libdir} \
120 DESTDIR=$RPM_BUILD_ROOT
d6a8eeef 121
8a111c55
JB
122install -d $RPM_BUILD_ROOT%{_dlldir}
123mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir}
d6a8eeef 124
9e9be21b 125%if 0%{!?debug:1}
8a111c55
JB
126%{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll
127%{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a
9e9be21b 128%endif
18578b4b 129
18578b4b 130%clean
131rm -rf $RPM_BUILD_ROOT
132
133%files
134%defattr(644,root,root,755)
8a111c55 135%doc README change.log
0599bc26
JB
136%{_libdir}/libjpeg.dll.a
137%{_libdir}/libjpeg.la
8a111c55
JB
138%{_includedir}/jconfig.h
139%{_includedir}/jerror.h
140%{_includedir}/jmorecfg.h
141%{_includedir}/jpeglib.h
0599bc26
JB
142
143%files static
144%defattr(644,root,root,755)
145%{_libdir}/libjpeg.a
120dba18 146
147%files dll
148%defattr(644,root,root,755)
8a111c55 149%{_dlldir}/libjpeg-*.dll
This page took 0.054961 seconds and 4 git commands to generate.