Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-updates-src > by-pkgid > 89436e07a32b12e9209ba0466cde1823 > files > 8

libjpeg-1.3.1-4.1.mga5.src.rpm

%define major 8
%define libname %mklibname jpeg %{major}
%define lib6name %mklibname jpeg 62
%define turbomajor 0
%define libturbo %mklibname turbojpeg %{turbomajor}
%define develname %mklibname -d jpeg
%define staticname %mklibname -s -d jpeg

Summary:	A MMX/SSE2 accelerated library for manipulating JPEG image files
Name:		libjpeg
Epoch:		1
Version:	1.3.1
%define subrel	1
Release:	%mkrel 4
License:	wxWidgets
Group:		System/Libraries
URL:		http://sourceforge.net/projects/libjpeg-turbo
Source0:	http://downloads.sourceforge.net/libjpeg-turbo/libjpeg-turbo-%{version}.tar.gz
# These two allow automatic lossless rotation of JPEG images from a digital
# camera which have orientation markings in the EXIF data. After rotation
# the orientation markings are reset to avoid duplicate rotation when
# applying these programs again.
Source2:	http://jpegclub.org/jpegexiforient.c
Source3:	http://jpegclub.org/exifautotran.txt
Patch0:		libjpeg-turbo-CVE-2014-9092.patch
Patch1:		libjpeg-1.4.2-overread.patch
Patch2:		libjpeg-1.3.1-alloc-wrap.patch
Patch3:		libjpeg-1.4.2-dangling-pointers.patch
BuildRequires:	nasm

%description
The libjpeg package contains a shared library of functions for loading,
manipulating and saving JPEG format image files.

Install the libjpeg package if you need to manipulate JPEG files. You
should also install the jpeg-progs package.

%package -n	%{libname}
Summary:	A MMX/SSE2 accelerated library for manipulating JPEG image files
Group:		System/Libraries
Provides:	%{name} = %{epoch}:%{version}-%{release}

%description -n %{libname}
This package contains the library needed to run programs dynamically
linked with libjpeg-turbo.

%package -n     %{lib6name}
Summary:	A MMX/SSE2 accelerated library for manipulating JPEG image files
Group:		System/Libraries

%description -n %{lib6name}
This package contains the library needed to run programs dynamically
linked with libjpeg-turbo.

%package -n	%{libturbo}
Summary:	A MMX/SSE2 accelerated library for manipulating JPEG image files
Group:		System/Libraries
Obsoletes:	%{_lib}turbojpeg < 1:1.3.0
Conflicts:	%{_lib}jpeg-devel < 1:1.2.1-2

%description -n %{libturbo}
This package contains the library needed to run programs dynamically
linked with libjpeg-turbo.

%package -n	%{develname}
Summary:	Development tools for programs which will use the libjpeg library
Group:		Development/C
Requires:	%{libname} = %{epoch}:%{version}
Requires:	%{libturbo} = %{epoch}:%{version}
Provides:	jpeg-devel = %{epoch}:%{version}-%{release}
Provides:	jpeg%{major}-devel = %{epoch}:%{version}-%{release}
Provides:	%{name}-devel = %{epoch}:%{version}-%{release}
Obsoletes:	%{name}-devel < %{epoch}:%{version}-%{release}
Conflicts:	jpeg6-devel
Conflicts:	%{_lib}turbojpeg < 1:1.3.0
Obsoletes:	%{mklibname jpeg 62 -d} < 6b-45

%description -n	%{develname}
The libjpeg-devel package includes the header files necessary for 
developing programs which will manipulate JPEG files using
the libjpeg library.

If you are going to develop programs which will manipulate JPEG images,
you should install libjpeg-devel.  You'll also need to have the libjpeg
package installed.

%package -n	%{staticname}
Summary:	Static libraries for programs which will use the libjpeg library
Group:		Development/C
Requires:	%{develname} = %{epoch}:%{version}-%{release}
Provides:	%{name}-static-devel = %{epoch}:%{version}-%{release}
Provides:	jpeg-static-devel = %{epoch}:%{version}-%{release}
Provides:	jpeg%{major}-static-devel = %{epoch}:%{version}-%{release}
Conflicts:	jpeg6-static-devel
Obsoletes:	%{mklibname jpeg 62 -d -s} < 6b-45
Obsoletes:	%{mklibname jpeg 7 -d -s} < 7-3

%description -n	%{staticname}
The libjpeg-devel package includes the static librariesnecessary for 
developing programs which will manipulate JPEG files using
the libjpeg library.

If you are going to develop programs which will manipulate JPEG images,
you should install libjpeg-devel.  You'll also need to have the libjpeg
package installed.

%package -n	jpeg-progs
Summary:	Programs for manipulating JPEG format image files
Group:		Graphics/Utilities
Requires:	%{libname} = %{epoch}:%{version}-%{release}
Provides:	jpeg-progs = %{epoch}:%{version}-%{release}
Provides:	libjpeg-progs = %{epoch}:%{version}-%{release}

%description -n	jpeg-progs
The jpeg-progs package contains simple client programs for accessing 
the libjpeg functions.  Libjpeg client programs include cjpeg, djpeg, 
jpegtran, rdjpgcom and wrjpgcom.  Cjpeg compresses an image file into JPEG
format. Djpeg decompresses a JPEG file into a regular image file.  Jpegtran
can perform various useful transformations on JPEG files.  Rdjpgcom displays
any text comments included in a JPEG file.  Wrjpgcom inserts text
comments into a JPEG file.

%prep
%setup -qn libjpeg-turbo-%{version}
%patch0 -p0 -b .CVE-2014-9092
%patch1 -p1
%patch2 -p1
%patch3 -p1

%build
export CONFIGURE_TOP=`pwd`
mkdir 8
pushd 8
%configure2_5x \
    --with-jpeg8 \
    --disable-silent-rules \
    --enable-shared \
    --enable-static
%make
gcc %{optflags} -o jpegexiforient %{SOURCE2}
popd

mkdir 6
pushd 6
%configure2_5x \
    --enable-shared
%make
popd

%check
pushd 8
LD_PRELOAD=$PWD/.libs/%{name}.so make test
popd

%install
%makeinstall_std -C 8

rm -fr %{buildroot}%{_libdir}/*.la %{buildroot}%{_datadir}/doc

install -m 755 8/jpegexiforient %{buildroot}%{_bindir}
install -m 755 %{SOURCE3} %{buildroot}%{_bindir}
cp -fP 6/.libs/libjpeg.so.* %{buildroot}%{_libdir}

%files -n %{libname}
%doc README ChangeLog.txt coderules.txt jconfig.txt libjpeg.txt structure.txt usage.txt wizard.txt
%{_libdir}/libjpeg.so.%{major}*

%files -n %{lib6name}
%{_libdir}/libjpeg.so.62
%{_libdir}/libjpeg.so.62.*

%files -n %{libturbo}
%{_libdir}/libturbojpeg.so.%{turbomajor}
%{_libdir}/libturbojpeg.so.%{turbomajor}.*

%files -n %{develname}
%doc example.c
%{_libdir}/libjpeg.so
%{_libdir}/libturbojpeg.so
%{_includedir}/*.h

%files -n %{staticname}
%{_libdir}/*.a

%files -n jpeg-progs
%{_bindir}/*
%{_mandir}/man1/*


%changelog
* Fri Jun 10 2016 luigiwalser <luigiwalser> 1:1.3.1-4.1.mga5
+ Revision: 1021019
- add upstream patches to fix security issues found by Mozilla

* Mon Dec 15 2014 luigiwalser <luigiwalser> 1:1.3.1-4.mga5
+ Revision: 803252
- add patch from opensuse to fix CVE-2014-9092

* Wed Oct 15 2014 umeabot <umeabot> 1:1.3.1-3.mga5
+ Revision: 748384
- Second Mageia 5 Mass Rebuild

* Tue Sep 16 2014 umeabot <umeabot> 1:1.3.1-2.mga5
+ Revision: 681547
- Mageia 5 Mass Rebuild

* Wed Jul 23 2014 fwang <fwang> 1:1.3.1-1.mga5
+ Revision: 655868
- 1.3.1

* Tue Nov 12 2013 luigiwalser <luigiwalser> 1:1.3.0-3.mga4
+ Revision: 550821
- add patch from google to fix CVE-2013-6629 and CVE-2013-6630

* Sat Oct 19 2013 umeabot <umeabot> 1:1.3.0-2.mga4
+ Revision: 524145
- Mageia 4 Mass Rebuild

* Wed May 29 2013 fwang <fwang> 1:1.3.0-1.mga4
+ Revision: 430376
- update file list
- update file list
- update file list
- new version 1.3.0

* Sat Jan 12 2013 umeabot <umeabot> 1:1.2.1-4.mga3
+ Revision: 357540
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

  + boklm <boklm>
    - Update group: Graphics/Other -> Graphics/Utilities

* Fri Nov 30 2012 ovitters <ovitters> 1:1.2.1-3.mga3
+ Revision: 323386
- clean spec
- update rpm group

* Tue Jul 10 2012 fwang <fwang> 1:1.2.1-2.mga3
+ Revision: 269180
- split libturbo

* Tue Jul 10 2012 fwang <fwang> 1:1.2.1-1.mga3
+ Revision: 269175
- new version 1.2.1

  + mitya <mitya>
    - Revert Provides: on libjpeg62
    - Fix Provides: for libjpeg62

* Mon Apr 23 2012 mitya <mitya> 1:1.2.0-4.mga2
+ Revision: 233122
- Provide libjpeg62 for all architectures

* Sat Feb 18 2012 zezinho <zezinho> 1:1.2.0-3.mga2
+ Revision: 210374
+ rebuild (emptylog)

* Sun Feb 12 2012 fwang <fwang> 1:1.2.0-2.mga2
+ Revision: 207971
- produce jpeg 6 also

* Sun Feb 12 2012 fwang <fwang> 1:1.2.0-1.mga2
+ Revision: 207937
- new version 1.2.0

* Sat Oct 29 2011 fwang <fwang> 1:1.1.90-1.mga2
+ Revision: 159559
- new version 1.1.90 (aka 1.2 beta1)

* Fri Sep 02 2011 fwang <fwang> 1:1.1.1-1.mga2
+ Revision: 138028
- switched to libjpeg-turbo flavour, syched with fedora

* Wed Mar 09 2011 dmorgan <dmorgan> 8b-5.mga1
+ Revision: 67225
- Bump release to allow to submit

  + eandry <eandry>
    - resubmit, obsoleted by mistake

* Sat Jan 08 2011 blino <blino> 8b-2.mga1
+ Revision: 912
- remove old ldconfig scriptlet
- imported package libjpeg