1 |
%define major 8 |
2 |
%define libname %mklibname jpeg %{major} |
3 |
%define lib6name %mklibname jpeg 62 |
4 |
%define develname %mklibname -d jpeg |
5 |
%define staticname %mklibname -s -d jpeg |
6 |
|
7 |
Summary: A MMX/SSE2 accelerated library for manipulating JPEG image files |
8 |
Name: libjpeg |
9 |
Epoch: 1 |
10 |
Version: 1.2.0 |
11 |
Release: %mkrel 5 |
12 |
License: wxWidgets |
13 |
Group: System/Libraries |
14 |
URL: http://sourceforge.net/projects/libjpeg-turbo |
15 |
Source0: http://downloads.sourceforge.net/libjpeg-turbo/libjpeg-turbo-%{version}.tar.gz |
16 |
# These two allow automatic lossless rotation of JPEG images from a digital |
17 |
# camera which have orientation markings in the EXIF data. After rotation |
18 |
# the orientation markings are reset to avoid duplicate rotation when |
19 |
# applying these programs again. |
20 |
Source2: http://jpegclub.org/jpegexiforient.c |
21 |
Source3: http://jpegclub.org/exifautotran.txt |
22 |
BuildRequires: nasm |
23 |
|
24 |
%description |
25 |
The libjpeg package contains a shared library of functions for loading, |
26 |
manipulating and saving JPEG format image files. |
27 |
|
28 |
Install the libjpeg package if you need to manipulate JPEG files. You |
29 |
should also install the jpeg-progs package. |
30 |
|
31 |
%package -n %{libname} |
32 |
Summary: A MMX/SSE2 accelerated library for manipulating JPEG image files |
33 |
Group: System/Libraries |
34 |
Provides: %{name} = %{epoch}:%{version}-%{release} |
35 |
|
36 |
%description -n %{libname} |
37 |
This package contains the library needed to run programs dynamically |
38 |
linked with libjpeg-turbo. |
39 |
|
40 |
%package -n %{lib6name} |
41 |
Summary: A MMX/SSE2 accelerated library for manipulating JPEG image files |
42 |
Group: System/Libraries |
43 |
|
44 |
%description -n %{lib6name} |
45 |
This package contains the library needed to run programs dynamically |
46 |
linked with libjpeg-turbo. |
47 |
|
48 |
%package -n %{develname} |
49 |
Summary: Development tools for programs which will use the libjpeg library |
50 |
Group: Development/C |
51 |
Requires: %{libname} = %{epoch}:%{version} |
52 |
Provides: jpeg-devel = %{epoch}:%{version}-%{release} |
53 |
Provides: jpeg%{major}-devel = %{epoch}:%{version}-%{release} |
54 |
Provides: %{name}-devel = %{epoch}:%{version}-%{release} |
55 |
Obsoletes: %{name}-devel < %{epoch}:%{version}-%{release} |
56 |
Conflicts: jpeg6-devel |
57 |
Obsoletes: %{mklibname jpeg 62 -d} < 6b-45 |
58 |
|
59 |
%description -n %{develname} |
60 |
The libjpeg-devel package includes the header files necessary for |
61 |
developing programs which will manipulate JPEG files using |
62 |
the libjpeg library. |
63 |
|
64 |
If you are going to develop programs which will manipulate JPEG images, |
65 |
you should install libjpeg-devel. You'll also need to have the libjpeg |
66 |
package installed. |
67 |
|
68 |
%package -n %{staticname} |
69 |
Summary: Static libraries for programs which will use the libjpeg library |
70 |
Group: Development/C |
71 |
Requires: %{develname} = %{epoch}:%{version}-%{release} |
72 |
Provides: %{name}-static-devel = %{epoch}:%{version}-%{release} |
73 |
Provides: jpeg-static-devel = %{epoch}:%{version}-%{release} |
74 |
Provides: jpeg%{major}-static-devel = %{epoch}:%{version}-%{release} |
75 |
Conflicts: jpeg6-static-devel |
76 |
Obsoletes: %{mklibname jpeg 62 -d -s} < 6b-45 |
77 |
Obsoletes: %{mklibname jpeg 7 -d -s} < 7-3 |
78 |
|
79 |
%description -n %{staticname} |
80 |
The libjpeg-devel package includes the static librariesnecessary for |
81 |
developing programs which will manipulate JPEG files using |
82 |
the libjpeg library. |
83 |
|
84 |
If you are going to develop programs which will manipulate JPEG images, |
85 |
you should install libjpeg-devel. You'll also need to have the libjpeg |
86 |
package installed. |
87 |
|
88 |
%package -n jpeg-progs |
89 |
Summary: Programs for manipulating JPEG format image files |
90 |
Group: Graphics |
91 |
Requires: %{libname} = %{epoch}:%{version}-%{release} |
92 |
Provides: jpeg-progs = %{epoch}:%{version}-%{release} |
93 |
Provides: libjpeg-progs = %{epoch}:%{version}-%{release} |
94 |
|
95 |
%description -n jpeg-progs |
96 |
The jpeg-progs package contains simple client programs for accessing |
97 |
the libjpeg functions. Libjpeg client programs include cjpeg, djpeg, |
98 |
jpegtran, rdjpgcom and wrjpgcom. Cjpeg compresses an image file into JPEG |
99 |
format. Djpeg decompresses a JPEG file into a regular image file. Jpegtran |
100 |
can perform various useful transformations on JPEG files. Rdjpgcom displays |
101 |
any text comments included in a JPEG file. Wrjpgcom inserts text |
102 |
comments into a JPEG file. |
103 |
|
104 |
%prep |
105 |
%setup -qn libjpeg-turbo-%{version} |
106 |
|
107 |
%build |
108 |
export CONFIGURE_TOP=`pwd` |
109 |
mkdir 8 |
110 |
pushd 8 |
111 |
%configure2_5x \ |
112 |
--with-jpeg8 \ |
113 |
--disable-silent-rules \ |
114 |
--enable-shared \ |
115 |
--enable-static |
116 |
%make |
117 |
gcc %{optflags} -o jpegexiforient %{SOURCE2} |
118 |
popd |
119 |
|
120 |
mkdir 6 |
121 |
pushd 6 |
122 |
%configure2_5x \ |
123 |
--enable-shared |
124 |
%make |
125 |
popd |
126 |
|
127 |
%check |
128 |
pushd 8 |
129 |
LD_PRELOAD=$PWD/.libs/%{name}.so make test |
130 |
popd |
131 |
|
132 |
%install |
133 |
%makeinstall_std -C 8 |
134 |
|
135 |
rm -fr %{buildroot}%{_libdir}/*.la %{buildroot}%{_datadir}/doc |
136 |
|
137 |
install -m 755 8/jpegexiforient %{buildroot}%{_bindir} |
138 |
install -m 755 %{SOURCE3} %{buildroot}%{_bindir} |
139 |
cp -fP 6/.libs/libjpeg.so.* %{buildroot}%{_libdir} |
140 |
|
141 |
%files -n %{libname} |
142 |
%doc README change.log coderules.txt filelist.txt install.txt jconfig.txt libjpeg.txt structure.txt usage.txt wizard.txt |
143 |
%{_libdir}/libjpeg.so.%{major}* |
144 |
|
145 |
%files -n %{lib6name} |
146 |
%{_libdir}/libjpeg.so.62 |
147 |
%{_libdir}/libjpeg.so.62.* |
148 |
|
149 |
%files -n %{develname} |
150 |
%doc example.c |
151 |
%{_libdir}/*.so |
152 |
%{_includedir}/*.h |
153 |
|
154 |
%files -n %{staticname} |
155 |
%{_libdir}/*.a |
156 |
|
157 |
%files -n jpeg-progs |
158 |
%{_bindir}/* |
159 |
%{_mandir}/man1/* |