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

Last change on this file since 1140 was 1140, checked in by Silvan Scherrer, 9 years ago

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

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