| [850] | 1 | #define svn_url     e:/trees/libjpeg/trunk
 | 
|---|
 | 2 | %define svn_url     http://svn.netlabs.org/repos/ports/libjpeg/trunk
 | 
|---|
| [914] | 3 | %define svn_rev     1848
 | 
|---|
| [850] | 4 | 
 | 
|---|
| [256] | 5 | Summary: A library for manipulating JPEG image format files
 | 
|---|
 | 6 | Name: libjpeg
 | 
|---|
| [850] | 7 | Version: 8d
 | 
|---|
| [914] | 8 | Release: 2%{?dist}
 | 
|---|
| [256] | 9 | License: IJG
 | 
|---|
 | 10 | Group: System Environment/Libraries
 | 
|---|
 | 11 | URL: http://www.ijg.org/
 | 
|---|
 | 12 | 
 | 
|---|
| [850] | 13 | Vendor:  bww bitwise works GmbH
 | 
|---|
 | 14 | Source:  %{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip
 | 
|---|
| [256] | 15 | 
 | 
|---|
| [850] | 16 | # DEF files to create forwarders for the legacy package
 | 
|---|
 | 17 | Source10:       jpeg.def
 | 
|---|
| [256] | 18 | 
 | 
|---|
| [850] | 19 | BuildRequires: autoconf libtool
 | 
|---|
| [256] | 20 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 | 
|---|
 | 21 | 
 | 
|---|
 | 22 | %description
 | 
|---|
 | 23 | The libjpeg package contains a library of functions for manipulating
 | 
|---|
 | 24 | JPEG images, as well as simple client programs for accessing the
 | 
|---|
 | 25 | libjpeg functions.  Libjpeg client programs include cjpeg, djpeg,
 | 
|---|
 | 26 | jpegtran, rdjpgcom and wrjpgcom.  Cjpeg compresses an image file into
 | 
|---|
 | 27 | JPEG format.  Djpeg decompresses a JPEG file into a regular image
 | 
|---|
 | 28 | file.  Jpegtran can perform various useful transformations on JPEG
 | 
|---|
 | 29 | files.  Rdjpgcom displays any text comments included in a JPEG file.
 | 
|---|
 | 30 | Wrjpgcom inserts text comments into a JPEG file.
 | 
|---|
 | 31 | 
 | 
|---|
 | 32 | %package devel
 | 
|---|
 | 33 | Summary: Development tools for programs which will use the libjpeg library
 | 
|---|
 | 34 | Group: Development/Libraries
 | 
|---|
 | 35 | Requires: libjpeg = %{version}-%{release}
 | 
|---|
 | 36 | 
 | 
|---|
 | 37 | %description devel
 | 
|---|
 | 38 | The libjpeg-devel package includes the header files and documentation
 | 
|---|
 | 39 | necessary for developing programs which will manipulate JPEG files using
 | 
|---|
 | 40 | the libjpeg library.
 | 
|---|
 | 41 | 
 | 
|---|
 | 42 | If you are going to develop programs which will manipulate JPEG images,
 | 
|---|
 | 43 | you should install libjpeg-devel.  You'll also need to have the libjpeg
 | 
|---|
 | 44 | package installed.
 | 
|---|
 | 45 | 
 | 
|---|
 | 46 | %package static
 | 
|---|
 | 47 | Summary: Static JPEG image format file library
 | 
|---|
 | 48 | Group: Development/Libraries
 | 
|---|
 | 49 | Requires: libjpeg-devel = %{version}-%{release}
 | 
|---|
 | 50 | 
 | 
|---|
 | 51 | %description static
 | 
|---|
 | 52 | The libjpeg-static package contains the statically linkable version of libjpeg.
 | 
|---|
 | 53 | Linking to static libraries is discouraged for most applications, but it is
 | 
|---|
 | 54 | necessary for some boot packages.
 | 
|---|
 | 55 | 
 | 
|---|
| [850] | 56 | %debug_package
 | 
|---|
 | 57 | 
 | 
|---|
| [256] | 58 | %prep
 | 
|---|
| [850] | 59 | %if %{?svn_rev:%(sh -c 'if test -f "%{_sourcedir}/%{name}-%{version}-r%{svn_rev}.zip" ; then echo 1 ; else echo 0 ; fi')}%{!?svn_rev):0}
 | 
|---|
 | 60 | %setup -q
 | 
|---|
 | 61 | %else
 | 
|---|
 | 62 | %setup -n "%{name}-%{version}" -Tc
 | 
|---|
 | 63 | svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force
 | 
|---|
 | 64 | rm -f "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip"
 | 
|---|
 | 65 | (cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" "%{name}-%{version}")
 | 
|---|
 | 66 | %endif
 | 
|---|
| [256] | 67 | 
 | 
|---|
| [850] | 68 | # Prepare forwarder DLLs.
 | 
|---|
 | 69 | for m in %{SOURCE10}; do
 | 
|---|
 | 70 |   cp ${m} .
 | 
|---|
 | 71 | done
 | 
|---|
| [256] | 72 | 
 | 
|---|
| [850] | 73 | # Hack: disable autoheader so that it doesn't overwrite our cfg template.
 | 
|---|
 | 74 | export AUTOHEADER="echo autoheader ignored"
 | 
|---|
 | 75 | autoreconf -vif
 | 
|---|
 | 76 | 
 | 
|---|
| [256] | 77 | %build
 | 
|---|
 | 78 | export LDFLAGS="-Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
 | 
|---|
| [914] | 79 | export VENDOR="%{vendor}"
 | 
|---|
| [256] | 80 | %configure \
 | 
|---|
| [850] | 81 |      --enable-shared --enable-static
 | 
|---|
| [256] | 82 | 
 | 
|---|
 | 83 | make %{?_smp_mflags}
 | 
|---|
 | 84 | 
 | 
|---|
| [850] | 85 | %check
 | 
|---|
 | 86 | # this export is needed, as else the dll for the tests are not found
 | 
|---|
 | 87 | export BEGINLIBPATH=%{_builddir}/%{buildsubdir}/.libs
 | 
|---|
 | 88 | make test
 | 
|---|
 | 89 | 
 | 
|---|
| [256] | 90 | %install
 | 
|---|
 | 91 | rm -rf $RPM_BUILD_ROOT
 | 
|---|
 | 92 | %makeinstall
 | 
|---|
 | 93 | 
 | 
|---|
| [850] | 94 | #install -m 755 jpeg.dll $RPM_BUILD_ROOT/%{_libdir}
 | 
|---|
 | 95 | #install -m 755 .libs/jpeg_s.a $RPM_BUILD_ROOT/%{_libdir}
 | 
|---|
| [256] | 96 | 
 | 
|---|
 | 97 | # We don't ship .la files.
 | 
|---|
 | 98 | rm $RPM_BUILD_ROOT%{_libdir}/*.la
 | 
|---|
 | 99 | 
 | 
|---|
| [850] | 100 | # Generate & install forwarder DLLs.
 | 
|---|
| [914] | 101 | gcc -Zomf -Zdll -nostdlib jpeg.def -l$RPM_BUILD_ROOT/%{_libdir}/jpeg8.dll -lend -o $RPM_BUILD_ROOT/%{_libdir}/jpeg.dll
 | 
|---|
| [850] | 102 | 
 | 
|---|
| [256] | 103 | %files
 | 
|---|
 | 104 | %defattr(-,root,root)
 | 
|---|
 | 105 | %doc usage.txt README
 | 
|---|
 | 106 | %{_libdir}/jpeg*.dll
 | 
|---|
| [850] | 107 | %{_bindir}/*.exe
 | 
|---|
| [256] | 108 | %{_mandir}/*/*
 | 
|---|
 | 109 | 
 | 
|---|
 | 110 | %files devel
 | 
|---|
 | 111 | %defattr(-,root,root)
 | 
|---|
 | 112 | %doc libjpeg.txt coderules.txt structure.txt wizard.txt example.c
 | 
|---|
| [850] | 113 | %{_libdir}/jpeg*_dll.a
 | 
|---|
| [256] | 114 | %{_includedir}/*.h
 | 
|---|
 | 115 | 
 | 
|---|
 | 116 | %files static
 | 
|---|
 | 117 | %defattr(-,root,root)
 | 
|---|
| [850] | 118 | %{_libdir}/jpeg.a
 | 
|---|
| [256] | 119 | 
 | 
|---|
 | 120 | %clean
 | 
|---|
 | 121 | rm -rf $RPM_BUILD_ROOT
 | 
|---|
 | 122 | 
 | 
|---|
 | 123 | %changelog
 | 
|---|
| [914] | 124 | * Wed Nov 30 2016 Silvan Scherrer <silvan.scherrer@aroa.ch> - 8d-2
 | 
|---|
 | 125 | - add -nostdlib to forwarders, to need less heap
 | 
|---|
 | 126 | 
 | 
|---|
| [850] | 127 | * Wed Sep 21 2016 Silvan Scherrer <silvan.scherrer@aroa.ch> - 8d-1
 | 
|---|
 | 128 | - update to version 8d
 | 
|---|
 | 129 | - change build part
 | 
|---|
 | 130 | - add debug files
 | 
|---|
 | 131 | 
 | 
|---|
| [256] | 132 | * Mon Dec 19 2011 yd
 | 
|---|
 | 133 | - initial build.
 | 
|---|