1 | Name: libjpeg-turbo
|
---|
2 | Version: 1.5.1
|
---|
3 | Release: 1%{?dist}
|
---|
4 | Summary: A MMX/SSE2/SIMD accelerated library for manipulating JPEG image files
|
---|
5 | License: IJG
|
---|
6 | URL: http://sourceforge.net/projects/libjpeg-turbo
|
---|
7 |
|
---|
8 | Vendor: bww bitwise works GmbH
|
---|
9 | %scm_source github https://github.com/bitwiseworks/%{name}-os2 %{version}-os2
|
---|
10 | # DEF files to create forwarders for the legacy package
|
---|
11 | Source10: jpeg.def
|
---|
12 |
|
---|
13 | BuildRequires: autoconf
|
---|
14 | BuildRequires: automake
|
---|
15 | BuildRequires: libtool
|
---|
16 | BuildRequires: nasm
|
---|
17 |
|
---|
18 | Obsoletes: libjpeg < 8d-3
|
---|
19 | # add provides (even if it not needed) to workaround bad packages, like
|
---|
20 | # java-1.6.0-openjdk (#rh607554) -- atkac
|
---|
21 | Provides: libjpeg = 8d-3%{?dist}
|
---|
22 |
|
---|
23 | %description
|
---|
24 | The libjpeg-turbo package contains a library of functions for manipulating JPEG
|
---|
25 | images.
|
---|
26 |
|
---|
27 | %package devel
|
---|
28 | Summary: Headers for the libjpeg-turbo library
|
---|
29 | Obsoletes: libjpeg-devel < 8d-3
|
---|
30 | Provides: libjpeg-devel = 8d-3%{?dist}
|
---|
31 | Requires: libjpeg-turbo = %{version}-%{release}
|
---|
32 | Obsoletes: libjpeg-turbo-static < 1.3.1
|
---|
33 | Provides: libjpeg-turbo-static = 1.3.1%{?dist}
|
---|
34 |
|
---|
35 | %description devel
|
---|
36 | This package contains header files necessary for developing programs which will
|
---|
37 | manipulate JPEG files using the libjpeg-turbo library.
|
---|
38 |
|
---|
39 | %package utils
|
---|
40 | Summary: Utilities for manipulating JPEG images
|
---|
41 | Requires: libjpeg-turbo = %{version}-%{release}
|
---|
42 |
|
---|
43 | %description utils
|
---|
44 | The libjpeg-turbo-utils package contains simple client programs for accessing
|
---|
45 | the libjpeg functions. It contains cjpeg, djpeg, jpegtran, rdjpgcom and
|
---|
46 | wrjpgcom. Cjpeg compresses an image file into JPEG format. Djpeg decompresses a
|
---|
47 | JPEG file into a regular image file. Jpegtran can perform various useful
|
---|
48 | transformations on JPEG files. Rdjpgcom displays any text comments included in a
|
---|
49 | JPEG file. Wrjpgcom inserts text comments into a JPEG file.
|
---|
50 |
|
---|
51 | %package -n turbojpeg
|
---|
52 | Summary: TurboJPEG library
|
---|
53 |
|
---|
54 | %description -n turbojpeg
|
---|
55 | The turbojpeg package contains the TurboJPEG shared library.
|
---|
56 |
|
---|
57 | %package -n turbojpeg-devel
|
---|
58 | Summary: Headers for the TurboJPEG library
|
---|
59 | Requires: turbojpeg = %{version}-%{release}
|
---|
60 |
|
---|
61 | %description -n turbojpeg-devel
|
---|
62 | This package contains header files necessary for developing programs which will
|
---|
63 | manipulate JPEG files using the TurboJPEG library.
|
---|
64 | %debug_package
|
---|
65 |
|
---|
66 |
|
---|
67 | %prep
|
---|
68 | %scm_setup
|
---|
69 |
|
---|
70 | # Prepare forwarder DLLs.
|
---|
71 | for m in %{SOURCE10}; do
|
---|
72 | cp ${m} .
|
---|
73 | done
|
---|
74 |
|
---|
75 | %build
|
---|
76 | autoreconf -vif
|
---|
77 |
|
---|
78 | export LDFLAGS="-Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
|
---|
79 | export LIBS="-lcx"
|
---|
80 | export VENDOR="%{vendor}"
|
---|
81 | %configure --disable-static --enable-shared --with-jpeg8
|
---|
82 |
|
---|
83 | # we need to tweak the libtool a bit, as else it's not building see also ticket #94
|
---|
84 | sed 's/emxexp \\$libobjs \\$convenience/emxexp \\$libobjs/' -i.bak libtool
|
---|
85 |
|
---|
86 | make %{?_smp_mflags} V=1
|
---|
87 |
|
---|
88 | %install
|
---|
89 | make install DESTDIR=%{buildroot}
|
---|
90 | find %{buildroot} -name "*.la" -delete
|
---|
91 |
|
---|
92 | # Generate & install forwarder DLLs.
|
---|
93 | gcc -Zomf -Zdll -nostdlib jpeg.def -l$RPM_BUILD_ROOT/%{_libdir}/jpeg8.dll -lend -o $RPM_BUILD_ROOT/%{_libdir}/jpeg.dll
|
---|
94 |
|
---|
95 | # Fix perms
|
---|
96 | chmod -x README.md
|
---|
97 |
|
---|
98 | # multilib header hack
|
---|
99 | # we only apply this to known Red Hat multilib arches, per bug #1264675
|
---|
100 | case `uname -i` in
|
---|
101 | i386 | ppc | s390 | sparc )
|
---|
102 | wordsize="32"
|
---|
103 | ;;
|
---|
104 | x86_64 | ppc64 | s390x | sparc64 )
|
---|
105 | wordsize="64"
|
---|
106 | ;;
|
---|
107 | *)
|
---|
108 | wordsize=""
|
---|
109 | ;;
|
---|
110 | esac
|
---|
111 |
|
---|
112 | if test -n "$wordsize"
|
---|
113 | then
|
---|
114 | mv $RPM_BUILD_ROOT%{_includedir}/jconfig.h \
|
---|
115 | $RPM_BUILD_ROOT%{_includedir}/jconfig-$wordsize.h
|
---|
116 |
|
---|
117 | cat >$RPM_BUILD_ROOT%{_includedir}/jconfig.h <<EOF
|
---|
118 | #ifndef JCONFIG_H_MULTILIB
|
---|
119 | #define JCONFIG_H_MULTILIB
|
---|
120 |
|
---|
121 | #include <bits/wordsize.h>
|
---|
122 |
|
---|
123 | #if __WORDSIZE == 32
|
---|
124 | # include "jconfig-32.h"
|
---|
125 | #elif __WORDSIZE == 64
|
---|
126 | # include "jconfig-64.h"
|
---|
127 | #else
|
---|
128 | # error "unexpected value for __WORDSIZE macro"
|
---|
129 | #endif
|
---|
130 |
|
---|
131 | #endif
|
---|
132 | EOF
|
---|
133 |
|
---|
134 | fi
|
---|
135 |
|
---|
136 | %check
|
---|
137 | # this export is needed, as else the dll for the tests are not found
|
---|
138 | export BEGINLIBPATH=%{_builddir}/%{buildsubdir}/.libs
|
---|
139 | make test %{?_smp_mflags}
|
---|
140 |
|
---|
141 | #post -p /sbin/ldconfig
|
---|
142 | #postun -p /sbin/ldconfig
|
---|
143 |
|
---|
144 | #post -n turbojpeg -p /sbin/ldconfig
|
---|
145 | #postun -n turbojpeg -p /sbin/ldconfig
|
---|
146 |
|
---|
147 | %files
|
---|
148 | %doc README.md README.ijg ChangeLog.md
|
---|
149 | %{_libdir}/jpeg*.dll
|
---|
150 |
|
---|
151 | %files devel
|
---|
152 | %doc coderules.txt jconfig.txt libjpeg.txt structure.txt example.c
|
---|
153 | %{_includedir}/jconfig*.h
|
---|
154 | %{_includedir}/jerror.h
|
---|
155 | %{_includedir}/jmorecfg.h
|
---|
156 | %{_includedir}/jpeglib.h
|
---|
157 | %{_libdir}/jpeg*_dll.a
|
---|
158 | %{_libdir}/pkgconfig/libjpeg.pc
|
---|
159 |
|
---|
160 | %files utils
|
---|
161 | %doc usage.txt wizard.txt
|
---|
162 | %{_bindir}/cjpeg.exe
|
---|
163 | %{_bindir}/djpeg.exe
|
---|
164 | %{_bindir}/jpegtran.exe
|
---|
165 | %{_bindir}/rdjpgcom.exe
|
---|
166 | %{_bindir}/wrjpgcom.exe
|
---|
167 | %{_mandir}/man1/cjpeg.1*
|
---|
168 | %{_mandir}/man1/djpeg.1*
|
---|
169 | %{_mandir}/man1/jpegtran.1*
|
---|
170 | %{_mandir}/man1/rdjpgcom.1*
|
---|
171 | %{_mandir}/man1/wrjpgcom.1*
|
---|
172 |
|
---|
173 | %files -n turbojpeg
|
---|
174 | %{_libdir}/turbo*.dll
|
---|
175 |
|
---|
176 | %files -n turbojpeg-devel
|
---|
177 | %{_includedir}/turbojpeg.h
|
---|
178 | %{_libdir}/turbo*_dll.a
|
---|
179 | %{_libdir}/pkgconfig/libturbojpeg.pc
|
---|
180 |
|
---|
181 | %changelog
|
---|
182 | * Fri May 12 2017 Silvan Scherrer <silvan.scherrer@aroa.ch> - 1.5.1-1
|
---|
183 | - Initial version
|
---|