| 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 |
|
|---|
| 11 | BuildRequires: autoconf
|
|---|
| 12 | BuildRequires: automake
|
|---|
| 13 | BuildRequires: libtool
|
|---|
| 14 | BuildRequires: nasm
|
|---|
| 15 |
|
|---|
| 16 | Obsoletes: libjpeg < 8d-3
|
|---|
| 17 | # add provides (even if it not needed) to workaround bad packages, like
|
|---|
| 18 | # java-1.6.0-openjdk (#rh607554) -- atkac
|
|---|
| 19 | Provides: libjpeg = 8d-3%{?dist}
|
|---|
| 20 |
|
|---|
| 21 | %description
|
|---|
| 22 | The libjpeg-turbo package contains a library of functions for manipulating JPEG
|
|---|
| 23 | images.
|
|---|
| 24 |
|
|---|
| 25 | %package devel
|
|---|
| 26 | Summary: Headers for the libjpeg-turbo library
|
|---|
| 27 | Obsoletes: libjpeg-devel < 8d-3
|
|---|
| 28 | Provides: libjpeg-devel = 8d-3%{?dist}
|
|---|
| 29 | Requires: libjpeg-turbo = %{version}-%{release}
|
|---|
| 30 | Obsoletes: libjpeg-turbo-static < 1.3.1
|
|---|
| 31 | Provides: libjpeg-turbo-static = 1.3.1%{?dist}
|
|---|
| 32 |
|
|---|
| 33 | %description devel
|
|---|
| 34 | This package contains header files necessary for developing programs which will
|
|---|
| 35 | manipulate JPEG files using the libjpeg-turbo library.
|
|---|
| 36 |
|
|---|
| 37 | %package utils
|
|---|
| 38 | Summary: Utilities for manipulating JPEG images
|
|---|
| 39 | Requires: libjpeg-turbo = %{version}-%{release}
|
|---|
| 40 |
|
|---|
| 41 | %description utils
|
|---|
| 42 | The libjpeg-turbo-utils package contains simple client programs for accessing
|
|---|
| 43 | the libjpeg functions. It contains cjpeg, djpeg, jpegtran, rdjpgcom and
|
|---|
| 44 | wrjpgcom. Cjpeg compresses an image file into JPEG format. Djpeg decompresses a
|
|---|
| 45 | JPEG file into a regular image file. Jpegtran can perform various useful
|
|---|
| 46 | transformations on JPEG files. Rdjpgcom displays any text comments included in a
|
|---|
| 47 | JPEG file. Wrjpgcom inserts text comments into a JPEG file.
|
|---|
| 48 |
|
|---|
| 49 | %package -n turbojpeg
|
|---|
| 50 | Summary: TurboJPEG library
|
|---|
| 51 |
|
|---|
| 52 | %description -n turbojpeg
|
|---|
| 53 | The turbojpeg package contains the TurboJPEG shared library.
|
|---|
| 54 |
|
|---|
| 55 | %package -n turbojpeg-devel
|
|---|
| 56 | Summary: Headers for the TurboJPEG library
|
|---|
| 57 | Requires: turbojpeg = %{version}-%{release}
|
|---|
| 58 |
|
|---|
| 59 | %description -n turbojpeg-devel
|
|---|
| 60 | This package contains header files necessary for developing programs which will
|
|---|
| 61 | manipulate JPEG files using the TurboJPEG library.
|
|---|
| 62 | %debug_package
|
|---|
| 63 |
|
|---|
| 64 |
|
|---|
| 65 | %prep
|
|---|
| 66 | %scm_setup
|
|---|
| 67 |
|
|---|
| 68 | %build
|
|---|
| 69 | autoreconf -vif
|
|---|
| 70 |
|
|---|
| 71 | export LDFLAGS="-Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
|
|---|
| 72 | export LIBS="-lcx"
|
|---|
| 73 | export 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
|
|---|
| 77 | sed 's/emxexp \\$libobjs \\$convenience/emxexp \\$libobjs/' -i.bak libtool
|
|---|
| 78 |
|
|---|
| 79 | make %{?_smp_mflags} V=1
|
|---|
| 80 |
|
|---|
| 81 | %install
|
|---|
| 82 | make install DESTDIR=%{buildroot}
|
|---|
| 83 | find %{buildroot} -name "*.la" -delete
|
|---|
| 84 |
|
|---|
| 85 | # Fix perms
|
|---|
| 86 | chmod -x README.md
|
|---|
| 87 |
|
|---|
| 88 | # multilib header hack
|
|---|
| 89 | # we only apply this to known Red Hat multilib arches, per bug #1264675
|
|---|
| 90 | case `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 | ;;
|
|---|
| 100 | esac
|
|---|
| 101 |
|
|---|
| 102 | if test -n "$wordsize"
|
|---|
| 103 | then
|
|---|
| 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
|
|---|
| 122 | EOF
|
|---|
| 123 |
|
|---|
| 124 | fi
|
|---|
| 125 |
|
|---|
| 126 | %check
|
|---|
| 127 | # this export is needed, as else the dll for the tests are not found
|
|---|
| 128 | export BEGINLIBPATH=%{_builddir}/%{buildsubdir}/.libs
|
|---|
| 129 | make 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
|
|---|