~ubuntu-branches/ubuntu/saucy/libjpeg-turbo/saucy-security

« back to all changes in this revision

Viewing changes to release/libjpeg-turbo.spec.in

  • Committer: Package Import Robot
  • Author(s): Fathi Boudra
  • Date: 2013-07-28 16:52:51 UTC
  • mfrom: (1.1.3) (9.1.1 saucy-proposed)
  • Revision ID: package-import@ubuntu.com-20130728165251-7vg6wszhm941kdej
Tags: 1.3.0-0ubuntu1
* New upstream release.
  - drop debian/patches/branch-updates.diff
  - refresh tjunittest.patch (now renamed to install-tjunittest.patch)
* Update debian/control:
  - add myself to Uploaders.
* Update debian/copyright:
  - add RSA Data Security copyright (md5).
* Update debian/libturbojpeg.install:
  - install libturbojpeg.so.0* (needed by tjunittest and tjbench).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Path under which libjpeg-turbo should be installed
 
2
%define _prefix %{__prefix}
 
3
 
 
4
# Path under which executables should be installed
 
5
%define _bindir %{__bindir}
 
6
 
 
7
# Path under which Java classes and man pages should be installed
 
8
%define _datadir %{__datadir}
 
9
 
 
10
# Path under which docs should be installed
 
11
%define _docdir %{_defaultdocdir}/%{name}-%{version}
 
12
 
 
13
# Path under which headers should be installed
 
14
%define _includedir %{__includedir}
 
15
 
 
16
# _libdir is set to %{_prefix}/%{_lib} by default
1
17
%ifarch x86_64
2
 
%define __lib lib64
 
18
%define _lib lib64
3
19
%else
4
 
%define __lib lib
5
 
%endif
 
20
%if "%{_prefix}" == "/opt/libjpeg-turbo"
 
21
%define _lib lib32
 
22
%endif
 
23
%endif
 
24
 
 
25
# Path under which man pages should be installed
 
26
%define _mandir %{__mandir}
6
27
 
7
28
Summary: A SIMD-accelerated JPEG codec that provides both the libjpeg and TurboJPEG APIs
8
 
Name: @PACKAGE_NAME@
 
29
Name: @PKGNAME@
9
30
Version: @VERSION@
10
31
Vendor: The libjpeg-turbo Project
11
32
URL: http://www.libjpeg-turbo.org
15
36
License: BSD-style
16
37
BuildRoot: %{_blddir}/%{name}-buildroot-%{version}-%{release}
17
38
Prereq: /sbin/ldconfig
18
 
Provides: %{name} = %{version}-%{release}, turbojpeg = 2.00
19
 
Obsoletes: turbojpeg
 
39
%ifarch x86_64
 
40
Provides: %{name} = %{version}-%{release}, @PACKAGE_NAME@ = %{version}-%{release}, libturbojpeg.so()(64bit)
 
41
%else
 
42
Provides: %{name} = %{version}-%{release}, @PACKAGE_NAME@ = %{version}-%{release}, libturbojpeg.so
 
43
%endif
20
44
 
21
45
%description
22
 
libjpeg-turbo is a derivative of libjpeg that uses SIMD instructions (MMX,
23
 
SSE2, NEON) to accelerate baseline JPEG compression and decompression on x86,
24
 
x86-64, and ARM systems.  On such systems, libjpeg-turbo is generally 2-4x as
25
 
fast as the unmodified version of libjpeg, all else being equal.
26
 
 
27
 
libjpeg-turbo was originally based on libjpeg/SIMD by Miyasaka Masaru, but
28
 
the TigerVNC and VirtualGL projects made numerous enhancements to the codec in
29
 
2009, including improved support for Mac OS X, 64-bit support, support for
30
 
32-bit and big-endian pixel formats (RGBX, XBGR, etc.), accelerated Huffman
31
 
encoding/decoding, and various bug fixes.  The goal was to produce a fully
32
 
open-source codec that could replace the partially closed-source TurboJPEG/IPP
33
 
codec used by VirtualGL and TurboVNC.  libjpeg-turbo generally achieves 80-120%
34
 
of the performance of TurboJPEG/IPP.  It is faster in some areas but slower in
35
 
others.
36
 
 
37
 
In early 2010, libjpeg-turbo spun off into its own independent project, with
38
 
the goal of making high-speed JPEG compression/decompression technology
39
 
available to a broader range of users and developers.
 
46
libjpeg-turbo is a JPEG image codec that uses SIMD instructions (MMX, SSE2,
 
47
NEON) to accelerate baseline JPEG compression and decompression on x86, x86-64,
 
48
and ARM systems.  On such systems, libjpeg-turbo is generally 2-4x as fast as
 
49
libjpeg, all else being equal.  On other types of systems, libjpeg-turbo can
 
50
still outperform libjpeg by a significant amount, by virtue of its
 
51
highly-optimized Huffman coding routines.  In many cases, the performance of
 
52
libjpeg-turbo rivals that of proprietary high-speed JPEG codecs.
 
53
 
 
54
libjpeg-turbo implements both the traditional libjpeg API as well as the less
 
55
powerful but more straightforward TurboJPEG API.  libjpeg-turbo also features
 
56
colorspace extensions that allow it to compress from/decompress to 32-bit and
 
57
big-endian pixel buffers (RGBX, XBGR, etc.), as well as a full-featured Java
 
58
interface.
 
59
 
 
60
libjpeg-turbo was originally based on libjpeg/SIMD, an MMX-accelerated
 
61
derivative of libjpeg v6b developed by Miyasaka Masaru.  The TigerVNC and
 
62
VirtualGL projects made numerous enhancements to the codec in 2009, and in
 
63
early 2010, libjpeg-turbo spun off into an independent project, with the goal
 
64
of making high-speed JPEG compression/decompression technology available to a
 
65
broader range of users and developers.
40
66
 
41
67
#-->%prep
42
 
#-->%setup -q
 
68
#-->%setup -q -n libjpeg-turbo-%{version}
43
69
 
44
70
#-->%build
45
 
#-->./configure libdir=/opt/%{name}/%{__lib} mandir=/opt/%{name}/man JPEG_LIB_VERSION=@JPEG_LIB_VERSION@ SO_MAJOR_VERSION=@SO_MAJOR_VERSION@ SO_MINOR_VERSION=@SO_MINOR_VERSION@ --with-pic @RPM_CONFIG_ARGS@
46
 
#-->make DESTDIR=$RPM_BUILD_ROOT libdir=/opt/%{name}/%{__lib} mandir=/opt/%{name}/man
 
71
#-->./configure prefix=%{_prefix} bindir=%{_bindir} datadir=%{_datadir} \
 
72
#-->    docdir=%{_docdir} includedir=%{_includedir} libdir=%{_libdir} \
 
73
#-->    mandir=%{_mandir} JPEG_LIB_VERSION=@JPEG_LIB_VERSION@ \
 
74
#-->    SO_MAJOR_VERSION=@SO_MAJOR_VERSION@ SO_MINOR_VERSION=@SO_MINOR_VERSION@ \
 
75
#-->    --with-pic @RPM_CONFIG_ARGS@
 
76
#-->make DESTDIR=$RPM_BUILD_ROOT
47
77
 
48
78
%install
49
79
 
50
80
rm -rf $RPM_BUILD_ROOT
51
 
make install DESTDIR=$RPM_BUILD_ROOT libdir=/opt/%{name}/%{__lib} mandir=/opt/%{name}/man docdir=/opt/%{name}/doc exampledir=/opt/%{name}/doc
52
 
rm -f $RPM_BUILD_ROOT/opt/%{name}/%{__lib}/*.la
53
 
mkdir -p $RPM_BUILD_ROOT/usr/%{__lib}
54
 
mv $RPM_BUILD_ROOT/opt/%{name}/%{__lib}/libturbojpeg.* $RPM_BUILD_ROOT/usr/%{__lib}
55
 
/sbin/ldconfig -n $RPM_BUILD_ROOT/opt/%{name}/%{__lib}
56
 
/sbin/ldconfig -n $RPM_BUILD_ROOT/usr/%{__lib}
57
 
mkdir -p $RPM_BUILD_ROOT/usr/include
58
 
mv $RPM_BUILD_ROOT/opt/%{name}/include/turbojpeg.h $RPM_BUILD_ROOT/usr/include
59
 
ln -fs /usr/include/turbojpeg.h $RPM_BUILD_ROOT/opt/%{name}/include/
60
 
ln -fs /usr/%{__lib}/libturbojpeg.a $RPM_BUILD_ROOT/opt/%{name}/%{__lib}/
61
 
mkdir -p $RPM_BUILD_ROOT%{_defaultdocdir}
62
 
mv $RPM_BUILD_ROOT/opt/%{name}/doc $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}-%{version}
 
81
make install DESTDIR=$RPM_BUILD_ROOT docdir=%{_docdir} exampledir=%{_docdir}
 
82
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
 
83
/sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir}
 
84
 
 
85
#-->%if 0
 
86
 
 
87
LJT_LIBDIR=%{__libdir}
 
88
if [ ! "$LJT_LIBDIR" = "%{_libdir}" ]; then
 
89
        echo ERROR: libjpeg-turbo must be configured with libdir=%{_prefix}/%{_lib} when generating an in-tree RPM for this architecture.
 
90
        exit 1
 
91
fi
 
92
 
 
93
#-->%endif
 
94
 
 
95
LJT_DOCDIR=%{__docdir}
 
96
if [ "%{_prefix}" = "/opt/libjpeg-turbo" -a "$LJT_DOCDIR" = "/opt/libjpeg-turbo/doc" ]; then
 
97
        ln -fs %{_docdir} $RPM_BUILD_ROOT/$LJT_DOCDIR
 
98
fi
63
99
 
64
100
%post -p /sbin/ldconfig
65
101
 
70
106
 
71
107
%files
72
108
%defattr(-,root,root)
73
 
%dir %{_defaultdocdir}/%{name}-%{version}
74
 
%doc %{_defaultdocdir}/%{name}-%{version}/*
75
 
%dir /opt/%{name}
76
 
%dir /opt/%{name}/bin
77
 
/opt/%{name}/bin/cjpeg
78
 
/opt/%{name}/bin/djpeg
79
 
/opt/%{name}/bin/jpegtran
80
 
/opt/%{name}/bin/tjbench
81
 
/opt/%{name}/bin/rdjpgcom
82
 
/opt/%{name}/bin/wrjpgcom
83
 
%dir /opt/%{name}/%{__lib}
84
 
%ifarch x86_64
85
 
%else
86
 
/opt/%{name}/lib32
87
 
%endif
88
 
/opt/%{name}/%{__lib}/libjpeg.so.@SO_MAJOR_VERSION@.0.@SO_MINOR_VERSION@
89
 
/opt/%{name}/%{__lib}/libjpeg.so.@SO_MAJOR_VERSION@
90
 
/opt/%{name}/%{__lib}/libjpeg.so
91
 
/opt/%{name}/%{__lib}/libjpeg.a
92
 
/opt/%{name}/%{__lib}/libturbojpeg.a
93
 
/usr/%{__lib}/libturbojpeg.so
94
 
/usr/%{__lib}/libturbojpeg.a
95
 
/usr/include/turbojpeg.h
96
 
%dir /opt/%{name}/include
97
 
/opt/%{name}/include/jconfig.h
98
 
/opt/%{name}/include/jerror.h
99
 
/opt/%{name}/include/jmorecfg.h
100
 
/opt/%{name}/include/jpeglib.h
101
 
/opt/%{name}/include/turbojpeg.h
102
 
%dir /opt/%{name}/man
103
 
%dir /opt/%{name}/man/man1
104
 
/opt/%{name}/man/man1/cjpeg.1*
105
 
/opt/%{name}/man/man1/djpeg.1*
106
 
/opt/%{name}/man/man1/jpegtran.1*
107
 
/opt/%{name}/man/man1/rdjpgcom.1*
108
 
/opt/%{name}/man/man1/wrjpgcom.1*
 
109
%dir %{_docdir}
 
110
%doc %{_docdir}/*
 
111
%dir %{_prefix}
 
112
%if "%{_prefix}" == "/opt/libjpeg-turbo" && "%{_docdir}" != "%{_prefix}/doc"
 
113
 %{_prefix}/doc
 
114
%endif
 
115
%dir %{_bindir}
 
116
%{_bindir}/cjpeg
 
117
%{_bindir}/djpeg
 
118
%{_bindir}/jpegtran
 
119
%{_bindir}/tjbench
 
120
%{_bindir}/rdjpgcom
 
121
%{_bindir}/wrjpgcom
 
122
%dir %{_libdir}
 
123
%{_libdir}/libjpeg.so.@SO_MAJOR_VERSION@.@SO_AGE@.@SO_MINOR_VERSION@
 
124
%{_libdir}/libjpeg.so.@SO_MAJOR_VERSION@
 
125
%{_libdir}/libjpeg.so
 
126
%{_libdir}/libjpeg.a
 
127
%{_libdir}/libturbojpeg.so.0.0.0
 
128
%{_libdir}/libturbojpeg.so.0
 
129
%{_libdir}/libturbojpeg.so
 
130
%{_libdir}/libturbojpeg.a
 
131
%dir %{_includedir}
 
132
%{_includedir}/jconfig.h
 
133
%{_includedir}/jerror.h
 
134
%{_includedir}/jmorecfg.h
 
135
%{_includedir}/jpeglib.h
 
136
%{_includedir}/turbojpeg.h
 
137
%dir %{_mandir}
 
138
%dir %{_mandir}/man1
 
139
%{_mandir}/man1/cjpeg.1*
 
140
%{_mandir}/man1/djpeg.1*
 
141
%{_mandir}/man1/jpegtran.1*
 
142
%{_mandir}/man1/rdjpgcom.1*
 
143
%{_mandir}/man1/wrjpgcom.1*
 
144
%if "%{_prefix}" != "%{_datadir}"
 
145
 %dir %{_datadir}
 
146
%endif
109
147
@JAVA_RPM_CONTENTS_1@
110
148
@JAVA_RPM_CONTENTS_2@
111
149