diff --git a/baselibs.conf b/baselibs.conf index 9490d6d..47865d7 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -1,4 +1,2 @@ -libjpeg62 -libjpeg62-devel libjpeg8 -libturbojpeg +libjpeg8-devel diff --git a/libjpeg-turbo.changes b/libjpeg-turbo.changes index 6ad1df0..de0c73b 100644 --- a/libjpeg-turbo.changes +++ b/libjpeg-turbo.changes @@ -1,17 +1,3 @@ -------------------------------------------------------------------- -Sun Sep 30 00:19:41 UTC 2012 - reddwarf@opensuse.org - -- Provide both libjpeg62 and libjpeg8 -- Provide libjpeg62-devel. libjpeg8-devel is better being provided - by the reference implementation from IJG -- Remove libtool BuildRequires and autoreconf call -- Remove superfluous Provides/Obsoletes -- Provide libturbojpeg. Upstream policy is that they are never going - to break the ABI. And libturbojpeg.so is as a valid name as - libturbojpeg.so.0 -- Move licenses to library packages, otherwise the library could be - distributed without a copy of the license - ------------------------------------------------------------------- Mon Aug 13 17:05:35 UTC 2012 - dmueller@suse.com diff --git a/libjpeg-turbo.spec b/libjpeg-turbo.spec index 321e1d0..a8f5e52 100644 --- a/libjpeg-turbo.spec +++ b/libjpeg-turbo.spec @@ -16,14 +16,16 @@ # -%define _configure ../configure - -%define major 62 -# major number of library from IJG +%define major 8 +%define minor 0 +%define micro 2 +%define srcver 1.2.1 +%define libver %{major}.%{minor}.%{micro} +# major number of library from jpeg8 %define cmajor 8 Name: libjpeg-turbo -Version: 1.2.1 +Version: %{srcver} Release: 0 Summary: A MMX/SSE2 accelerated library for manipulating JPEG image files License: BSD-3-Clause @@ -31,22 +33,31 @@ Group: Productivity/Graphics/Convertors Url: http://sourceforge.net/projects/libjpeg-turbo Source0: http://downloads.sourceforge.net/project/%{name}/%{version}/%{name}-%{version}.tar.gz Source1: baselibs.conf -Patch0: libjpeg-turbo-1.2.1-int32.patch -Patch1: libjpeg-turbo-1.2.1-tiff-ojpeg.patch +Patch0: %{name}-%{version}-int32.patch +Patch1: %{name}-%{version}-tiff-ojpeg.patch Patch2: libjpeg-ocloexec.patch BuildRequires: gcc-c++ +BuildRequires: libtool BuildRequires: yasm Provides: jpeg = %{version} -Conflicts: jpeg%{cmajor} +Obsoletes: jpeg < %{version} +BuildRoot: %{_tmppath}/%{name}-%{version}-build +Conflicts: jpeg%{major} %description The libjpeg-turbo package contains a library of functions for manipulating JPEG images. %package -n libjpeg%{major} + +Version: %{libver} +Release: 0 Summary: The MMX/SSE accelerated JPEG compression/decompression library Group: System/Libraries -# bug437293 (the access is restricted, could somebody document here WTF is this for?) + +Provides: libjpeg%{major} = %{version} +Obsoletes: libjpeg%{major} < %{version} +# bug437293 %ifarch ppc64 Obsoletes: libjpeg-64bit < %{version} %endif @@ -57,14 +68,18 @@ This library contains MMX/SSE accelerated functions for manipulating JPEG images. %package -n libjpeg%{major}-devel +Version: %{libver} +Release: 0 Summary: Development Tools for applications which will use the Libjpeg Library Group: Development/Libraries/C and C++ + Requires: libjpeg%{major} = %{version} -Requires: libturbojpeg = %{version} Provides: libjpeg-devel = %{version} Obsoletes: libjpeg-devel < %{version} +%if "%{major}" != "%{cmajor}" Conflicts: libjpeg%{cmajor}-devel -# bug437293 (the access is restricted, could somebody document here WTF is this for?) +%endif +# bug437293 %ifarch ppc64 Obsoletes: libjpeg-devel-64bit < %{version} %endif @@ -75,57 +90,23 @@ The libjpeg-devel package includes the header files and libraries necessary for compiling and linking programs which will manipulate JPEG files using the libjpeg library. -%package -n libjpeg%{cmajor} -Summary: The MMX/SSE accelerated JPEG compression/decompression library -Group: System/Libraries - -%description -n libjpeg%{cmajor} -This library contains MMX/SSE accelerated functions for manipulating -JPEG images. - -%package -n libturbojpeg -Summary: The MMX/SSE accelerated JPEG compression/decompression library -Group: System/Libraries - -%description -n libturbojpeg -This library contains MMX/SSE accelerated functions for manipulating -JPEG images. - %prep %setup -q %patch0 %patch1 %patch2 -mkdir default_version -mkdir %{cmajor}_version %build -cd default_version -%configure --disable-static -make %{?_smp_mflags} -cd .. - -cd %{cmajor}_version +autoreconf -fiv %configure --disable-static \ --with-jpeg8 +make %{?_smp_mflags} %check -cd default_version -make test libdir=%{_libdir} -cd .. - -cd %{cmajor}_version make test libdir=%{_libdir} %install -cd default_version -%make_install -cd .. - -cd %{cmajor}_version -%make_install DESTDIR=%{_builddir}/%{cmajor}_tmpinstall -cp -pP %{_builddir}/%{cmajor}_tmpinstall/%{_libdir}/libjpeg.so.%{cmajor}* %{buildroot}%{_libdir}/ -cd .. +%makeinstall # Fix perms chmod -x README-turbo.txt release/copyright @@ -133,6 +114,11 @@ chmod -x README-turbo.txt release/copyright # Remove unwanted files rm -f %{buildroot}%{_libdir}/lib{,turbo}jpeg.la +# Don't distribute libjpegturbo because it is unversioned +rm %{buildroot}%{_includedir}/turbojpeg.h +rm %{buildroot}%{_libdir}/libturbojpeg.so +rm %{buildroot}%{_bindir}/tjbench + # Remove docs, we'll select docs manually rm -rf %{buildroot}%{_datadir}/doc/ @@ -140,24 +126,17 @@ rm -rf %{buildroot}%{_datadir}/doc/ %postun -n libjpeg%{major} -p /sbin/ldconfig -%post -n libjpeg%{cmajor} -p /sbin/ldconfig - -%postun -n libjpeg%{cmajor} -p /sbin/ldconfig - -%post -n libturbojpeg -p /sbin/ldconfig - -%postun -n libturbojpeg -p /sbin/ldconfig - %files %defattr(-,root,root) -%doc usage.txt wizard.txt +%doc README README-turbo.txt change.log ChangeLog.txt +%doc release/copyright usage.txt wizard.txt %{_bindir}/* -%{_mandir}/man1/* +%doc %{_mandir}/man1/* %files -n libjpeg%{major} %defattr(-,root,root) -%doc README README-turbo.txt change.log ChangeLog.txt release/copyright -%{_libdir}/libjpeg.so.%{major}* +%{_libdir}/libjpeg.so.%{libver} +%{_libdir}/libjpeg.so.%{major} %files -n libjpeg%{major}-devel %defattr(-,root,root) @@ -165,14 +144,4 @@ rm -rf %{buildroot}%{_datadir}/doc/ %{_libdir}/libjpeg.so %doc coderules.txt jconfig.txt libjpeg.txt structure.txt example.c -%files -n libjpeg%{cmajor} -%defattr(-,root,root) -%doc README README-turbo.txt change.log ChangeLog.txt release/copyright -%{_libdir}/libjpeg.so.%{cmajor}* - -%files -n libturbojpeg -%defattr(-,root,root) -%doc README README-turbo.txt change.log ChangeLog.txt release/copyright -%{_libdir}/libturbojpeg.so - %changelog