source: spec/trunk/SPECS/libjpeg-turbo.spec@ 1504

Last change on this file since 1504 was 1141, checked in by Silvan Scherrer, 8 years ago

spec: libjpeg-turbo: Release version 1.5.1-1.

File size: 4.8 KB
Line 
1Name: libjpeg-turbo
2Version: 1.5.1
3Release: 1%{?dist}
4Summary: A MMX/SSE2/SIMD accelerated library for manipulating JPEG image files
5License: IJG
6URL: http://sourceforge.net/projects/libjpeg-turbo
7
8Vendor: 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
11Source10: jpeg.def
12
13BuildRequires: autoconf
14BuildRequires: automake
15BuildRequires: libtool
16BuildRequires: nasm
17
18Obsoletes: libjpeg < 8d-3
19# add provides (even if it not needed) to workaround bad packages, like
20# java-1.6.0-openjdk (#rh607554) -- atkac
21Provides: libjpeg = 8d-3%{?dist}
22
23%description
24The libjpeg-turbo package contains a library of functions for manipulating JPEG
25images.
26
27%package devel
28Summary: Headers for the libjpeg-turbo library
29Obsoletes: libjpeg-devel < 8d-3
30Provides: libjpeg-devel = 8d-3%{?dist}
31Requires: libjpeg-turbo = %{version}-%{release}
32Obsoletes: libjpeg-turbo-static < 1.3.1
33Provides: libjpeg-turbo-static = 1.3.1%{?dist}
34
35%description devel
36This package contains header files necessary for developing programs which will
37manipulate JPEG files using the libjpeg-turbo library.
38
39%package utils
40Summary: Utilities for manipulating JPEG images
41Requires: libjpeg-turbo = %{version}-%{release}
42
43%description utils
44The libjpeg-turbo-utils package contains simple client programs for accessing
45the libjpeg functions. It contains cjpeg, djpeg, jpegtran, rdjpgcom and
46wrjpgcom. Cjpeg compresses an image file into JPEG format. Djpeg decompresses a
47JPEG file into a regular image file. Jpegtran can perform various useful
48transformations on JPEG files. Rdjpgcom displays any text comments included in a
49JPEG file. Wrjpgcom inserts text comments into a JPEG file.
50
51%package -n turbojpeg
52Summary: TurboJPEG library
53
54%description -n turbojpeg
55The turbojpeg package contains the TurboJPEG shared library.
56
57%package -n turbojpeg-devel
58Summary: Headers for the TurboJPEG library
59Requires: turbojpeg = %{version}-%{release}
60
61%description -n turbojpeg-devel
62This package contains header files necessary for developing programs which will
63manipulate JPEG files using the TurboJPEG library.
64%debug_package
65
66
67%prep
68%scm_setup
69
70# Prepare forwarder DLLs.
71for m in %{SOURCE10}; do
72 cp ${m} .
73done
74
75%build
76autoreconf -vif
77
78export LDFLAGS="-Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
79export LIBS="-lcx"
80export 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
84sed 's/emxexp \\$libobjs \\$convenience/emxexp \\$libobjs/' -i.bak libtool
85
86make %{?_smp_mflags} V=1
87
88%install
89make install DESTDIR=%{buildroot}
90find %{buildroot} -name "*.la" -delete
91
92# Generate & install forwarder DLLs.
93gcc -Zomf -Zdll -nostdlib jpeg.def -l$RPM_BUILD_ROOT/%{_libdir}/jpeg8.dll -lend -o $RPM_BUILD_ROOT/%{_libdir}/jpeg.dll
94
95# Fix perms
96chmod -x README.md
97
98# multilib header hack
99# we only apply this to known Red Hat multilib arches, per bug #1264675
100case `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 ;;
110esac
111
112if test -n "$wordsize"
113then
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
132EOF
133
134fi
135
136%check
137# this export is needed, as else the dll for the tests are not found
138export BEGINLIBPATH=%{_builddir}/%{buildsubdir}/.libs
139make 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
Note: See TracBrowser for help on using the repository browser.