libjpeg-turbo/libjpeg-turbo.spec

203 lines
6.1 KiB
RPMSpec
Raw Normal View History

2015-01-11 00:06:04 +10:00
%define major 8
%define libname %mklibname jpeg %{major}
%define devname %mklibname jpeg -d
%define sdevname %mklibname jpeg -d -s
2012-02-01 14:45:42 +04:00
2015-01-11 00:06:04 +10:00
%define majorturbo 0
%define libturbo %mklibname turbojpeg %{majorturbo}
%define major62 62
%define libname62 %mklibname jpeg %{major62}
2012-02-01 14:45:42 +04:00
Summary: A MMX/SSE2 accelerated library for manipulating JPEG image files
Name: libjpeg-turbo
2024-09-16 21:28:14 +00:00
#Epoch: 1
Version: 3.0.4
Release: 1
2012-02-01 14:45:42 +04:00
License: wxWidgets Library License
Group: System/Libraries
2024-09-16 21:28:14 +00:00
URL: https://www.libjpeg-turbo.org
#Source0: https://sourceforge.net/projects/libjpeg-turbo/files/%{version}/%{name}-%{version}.tar.gz
Source0: https://github.com/libjpeg-turbo/libjpeg-turbo/archive/%{version}/%{name}-%{version}.tar.gz
2012-02-01 14:45:42 +04:00
# 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: jpeg-6b-c++fixes.patch
2024-09-16 21:33:55 +00:00
BuildRequires: cmake
BuildRequires: libtool >= 1.4
2012-02-01 14:45:42 +04:00
%ifarch %{ix86} x86_64
BuildRequires: nasm
%endif
%description
This package contains a library of functions for manipulating JPEG images.
It is a high-speed, libjpeg-compatible version for x86 and x86-64
processors which uses SIMD instructions (MMX, SSE2, etc.) to accelerate
baseline JPEG compression and decompression. It is generally 2-4x as fast
as the unmodified version of libjpeg, all else being equal.
2015-01-11 00:06:04 +10:00
#----------------------------------------------------------------------------
%package -n %{libname}
2012-02-01 14:45:42 +04:00
Summary: A library for manipulating JPEG image format files
Group: System/Libraries
%description -n %{libname}
This package contains the library needed to run programs dynamically
2012-08-03 03:38:33 +02:00
linked with libjpeg.
2012-02-01 14:45:42 +04:00
2015-01-11 00:06:04 +10:00
%files -n %{libname}
2016-06-08 14:56:09 +03:00
%doc change.log
2015-01-11 00:06:04 +10:00
%{_libdir}/libjpeg.so.%{major}*
#----------------------------------------------------------------------------
%package -n %{libname62}
2012-02-01 14:45:42 +04:00
Summary: A library for manipulating JPEG image format files
Group: System/Libraries
%description -n %{libname62}
2015-01-11 00:06:04 +10:00
This package contains the library needed to run programs dynamically linked
with libjpeg.
2012-08-03 03:38:33 +02:00
2015-01-11 00:06:04 +10:00
%files -n %{libname62}
%{_libdir}/libjpeg.so.%{major62}*
#----------------------------------------------------------------------------
%package -n %{libturbo}
2012-08-03 03:38:33 +02:00
Summary: TurboJPEG library
Group: System/Libraries
2015-01-11 00:06:04 +10:00
%description -n %{libturbo}
This package contains the library needed to run programs dynamically linked
with libturbojpeg.
2012-02-01 14:45:42 +04:00
2015-01-11 00:06:04 +10:00
%files -n %{libturbo}
%{_libdir}/libturbojpeg.so.%{majorturbo}*
#----------------------------------------------------------------------------
%package -n %{devname}
2012-08-03 03:38:33 +02:00
Summary: Development tools for programs which will use the libjpeg library
2012-02-01 14:45:42 +04:00
Group: Development/C
Requires: %{libname} = %{EVRD}
2015-01-11 00:06:04 +10:00
Requires: %{libturbo} = %{EVRD}
2012-02-01 14:45:42 +04:00
Provides: jpeg-devel = %{EVRD}
Conflicts: jpeg6-devel
Conflicts: %{_lib}turbojpeg < 1:1.3.0
Obsoletes: %{_lib}turbojpeg < 1:1.3.0
2012-02-01 14:45:42 +04:00
Obsoletes: %{mklibname jpeg 62 -d} < 6b-45
2015-01-11 00:06:04 +10:00
%description -n %{devname}
The libjpeg-turbo devel package includes the header files necessary for
developing programs which will manipulate JPEG files using the libjpeg
library.
2012-02-01 14:45:42 +04:00
2015-01-11 00:06:04 +10:00
%files -n %{devname}
%doc coderules.txt example.c jconfig.txt libjpeg.txt structure.txt
%{_libdir}/libjpeg.so
%{_libdir}/libturbojpeg.so
%{_includedir}/*.h
2016-06-08 14:56:09 +03:00
%{_libdir}/pkgconfig/libjpeg.pc
%{_libdir}/pkgconfig/libturbojpeg.pc
2024-09-16 21:28:14 +00:00
%{_libdir}/cmake/libjpeg-turbo/*.cmake
2015-01-11 00:06:04 +10:00
#----------------------------------------------------------------------------
%package -n %{sdevname}
2012-08-03 03:38:33 +02:00
Summary: Static libraries for programs which will use the libjpeg library
2012-02-01 14:45:42 +04:00
Group: Development/C
Requires: %{devname} = %{EVRD}
Provides: jpeg-static-devel = %{EVRD}
Conflicts: jpeg6-static-devel
Obsoletes: %{mklibname jpeg 62 -d -s} < 6b-45
Obsoletes: %{mklibname jpeg 7 -d -s} < 7-3
2015-01-11 00:06:04 +10:00
%description -n %{sdevname}
The libjpeg static devel package includes the static libraries necessary
for developing programs which will manipulate JPEG files using the libjpeg
library.
%files -n %{sdevname}
%{_libdir}/libjpeg.a
%{_libdir}/libturbojpeg.a
#----------------------------------------------------------------------------
%package -n jpeg-progs
2012-02-01 14:45:42 +04:00
Summary: Programs for manipulating JPEG format image files
Group: Graphics
%rename libjpeg-progs
%rename jpeg6-progs
2015-01-11 00:06:04 +10:00
%description -n jpeg-progs
2012-02-01 14:45:42 +04:00
This package contains simple client programs for accessing the
2012-08-03 03:38:33 +02:00
libjpeg functions. The library client programs include cjpeg, djpeg,
2012-02-01 14:45:42 +04:00
jpegtran, rdjpgcom, wrjpgcom and jpegexiforient, coupled with the script
exifautotran. 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: it can make lossless
cropping of JPEG files and lossless pasting of one JPEG into another
(dropping). Rdjpgcom displays any text comments included in a JPEG file.
Wrjpgcom inserts text comments into a JPEG file. Jpegexiforient allow
automatic lossless rotation of JPEG images from a digital camera which
have orientation markings in the EXIF data.
2015-01-11 00:06:04 +10:00
%files -n jpeg-progs
%doc usage.txt wizard.txt
%{_bindir}/*
%{_mandir}/man1/*
#----------------------------------------------------------------------------
2012-02-01 14:45:42 +04:00
%prep
%setup -q
%patch0 -p0
cp %{SOURCE2} jpegexiforient.c
cp %{SOURCE3} exifautotran
%build
2024-09-16 21:28:14 +00:00
# Prepare build dirs
2012-02-01 14:45:42 +04:00
mkdir -p jpeg8
2024-09-16 21:28:14 +00:00
mkdir -p jpeg62
# Build jpeg v8 API
2012-02-01 14:45:42 +04:00
pushd jpeg8
CFLAGS="%{optflags} -Ofast -funroll-loops" \
2024-09-16 21:28:14 +00:00
%cmake ../.. -DWITH_JPEG8="True"
%make_build -s
2012-02-01 14:45:42 +04:00
popd
2024-09-16 21:28:14 +00:00
# Build jpeg v6.2 API
2012-02-01 14:45:42 +04:00
pushd jpeg62
CFLAGS="%{optflags} -Ofast -funroll-loops" \
2024-09-16 21:28:14 +00:00
%cmake ../.. \
-DWITH_ARITH_DEC="True" \
-DWITH_ARITH_ENC="True"
%make_build -s
2012-02-01 14:45:42 +04:00
popd
2024-09-16 21:28:14 +00:00
# Build jpegexiforient binary
%__cc %{optflags} %{ldflags} -o jpegexiforient jpegexiforient.c
2012-02-01 14:45:42 +04:00
2024-09-16 21:28:14 +00:00
2012-02-01 14:45:42 +04:00
%install
2024-09-16 21:28:14 +00:00
%make_install -C jpeg8/build
%make_install -C jpeg62/build
2012-02-01 14:45:42 +04:00
install -m755 jpegexiforient -D %{buildroot}%{_bindir}/jpegexiforient
install -m755 exifautotran -D %{buildroot}%{_bindir}/exifautotran
#(neoclust) Provide jpegint.h because it is needed by certain software
install -m644 jpegint.h -D %{buildroot}%{_includedir}/jpegint.h
2024-09-16 21:28:14 +00:00
# Cleanup
2016-06-08 14:56:09 +03:00
rm -rf %{buildroot}%{_docdir}/*