| 1 | #define svn_url e:/trees/libjpeg/trunk
|
|---|
| 2 | %define svn_url http://svn.netlabs.org/repos/ports/libjpeg/trunk
|
|---|
| 3 | %define svn_rev 1848
|
|---|
| 4 |
|
|---|
| 5 | Summary: A library for manipulating JPEG image format files
|
|---|
| 6 | Name: libjpeg
|
|---|
| 7 | Version: 8d
|
|---|
| 8 | Release: 2%{?dist}
|
|---|
| 9 | License: IJG
|
|---|
| 10 | Group: System Environment/Libraries
|
|---|
| 11 | URL: http://www.ijg.org/
|
|---|
| 12 |
|
|---|
| 13 | Vendor: bww bitwise works GmbH
|
|---|
| 14 | Source: %{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip
|
|---|
| 15 |
|
|---|
| 16 | # DEF files to create forwarders for the legacy package
|
|---|
| 17 | Source10: jpeg.def
|
|---|
| 18 |
|
|---|
| 19 | BuildRequires: autoconf libtool
|
|---|
| 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 |
|
|---|
| 56 | %debug_package
|
|---|
| 57 |
|
|---|
| 58 | %prep
|
|---|
| 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
|
|---|
| 67 |
|
|---|
| 68 | # Prepare forwarder DLLs.
|
|---|
| 69 | for m in %{SOURCE10}; do
|
|---|
| 70 | cp ${m} .
|
|---|
| 71 | done
|
|---|
| 72 |
|
|---|
| 73 | # Hack: disable autoheader so that it doesn't overwrite our cfg template.
|
|---|
| 74 | export AUTOHEADER="echo autoheader ignored"
|
|---|
| 75 | autoreconf -vif
|
|---|
| 76 |
|
|---|
| 77 | %build
|
|---|
| 78 | export LDFLAGS="-Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
|
|---|
| 79 | export VENDOR="%{vendor}"
|
|---|
| 80 | %configure \
|
|---|
| 81 | --enable-shared --enable-static
|
|---|
| 82 |
|
|---|
| 83 | make %{?_smp_mflags}
|
|---|
| 84 |
|
|---|
| 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 |
|
|---|
| 90 | %install
|
|---|
| 91 | rm -rf $RPM_BUILD_ROOT
|
|---|
| 92 | %makeinstall
|
|---|
| 93 |
|
|---|
| 94 | #install -m 755 jpeg.dll $RPM_BUILD_ROOT/%{_libdir}
|
|---|
| 95 | #install -m 755 .libs/jpeg_s.a $RPM_BUILD_ROOT/%{_libdir}
|
|---|
| 96 |
|
|---|
| 97 | # We don't ship .la files.
|
|---|
| 98 | rm $RPM_BUILD_ROOT%{_libdir}/*.la
|
|---|
| 99 |
|
|---|
| 100 | # Generate & install forwarder DLLs.
|
|---|
| 101 | gcc -Zomf -Zdll -nostdlib jpeg.def -l$RPM_BUILD_ROOT/%{_libdir}/jpeg8.dll -lend -o $RPM_BUILD_ROOT/%{_libdir}/jpeg.dll
|
|---|
| 102 |
|
|---|
| 103 | %files
|
|---|
| 104 | %defattr(-,root,root)
|
|---|
| 105 | %doc usage.txt README
|
|---|
| 106 | %{_libdir}/jpeg*.dll
|
|---|
| 107 | %{_bindir}/*.exe
|
|---|
| 108 | %{_mandir}/*/*
|
|---|
| 109 |
|
|---|
| 110 | %files devel
|
|---|
| 111 | %defattr(-,root,root)
|
|---|
| 112 | %doc libjpeg.txt coderules.txt structure.txt wizard.txt example.c
|
|---|
| 113 | %{_libdir}/jpeg*_dll.a
|
|---|
| 114 | %{_includedir}/*.h
|
|---|
| 115 |
|
|---|
| 116 | %files static
|
|---|
| 117 | %defattr(-,root,root)
|
|---|
| 118 | %{_libdir}/jpeg.a
|
|---|
| 119 |
|
|---|
| 120 | %clean
|
|---|
| 121 | rm -rf $RPM_BUILD_ROOT
|
|---|
| 122 |
|
|---|
| 123 | %changelog
|
|---|
| 124 | * Wed Nov 30 2016 Silvan Scherrer <silvan.scherrer@aroa.ch> - 8d-2
|
|---|
| 125 | - add -nostdlib to forwarders, to need less heap
|
|---|
| 126 |
|
|---|
| 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 |
|
|---|
| 132 | * Mon Dec 19 2011 yd
|
|---|
| 133 | - initial build.
|
|---|