nigelj e38dd1b
Name:           ocaml-camlimages
nigelj e38dd1b
Version:        2.2.0
dea2a43
Release:        10%{?dist}
nigelj e38dd1b
Summary:        OCaml image processing library
nigelj e38dd1b
nigelj e38dd1b
Group:          Development/Libraries
nigelj e38dd1b
License:        LGPL
nigelj e38dd1b
URL:            http://pauillac.inria.fr/camlimages/
nigelj e38dd1b
Source0:        ftp://ftp.inria.fr/INRIA/Projects/cristal/caml-light/bazar-ocaml/camlimages-%{version}.tgz
nigelj e38dd1b
Source1:        camlimages-2.2.0-htmlref.tar.gz
nigelj e38dd1b
Patch0:         camlimages-2.2.0-stubdest.patch
b8c7b86
b8c7b86
# https://bugzilla.redhat.com/show_bug.cgi?id=509531#c4
b8c7b86
Patch1:         camlimages-oversized-png-check-CVE-2009-2295.patch
b8c7b86
67c2fd6
# https://bugzilla.redhat.com/show_bug.cgi?id=528732
67c2fd6
Patch2:         camlimages-oversized-tiff-check-CVE-2009-3296.patch
67c2fd6
nigelj e38dd1b
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
nigelj e38dd1b
nigelj d93f23c
# Excluding on ppc64 due to missing dependencies (Bug #239518)
nigelj d93f23c
ExcludeArch:    ppc64
nigelj d93f23c
nigelj e38dd1b
BuildRequires:  lablgtk libpng-devel libjpeg-devel ocaml
nigelj e38dd1b
BuildRequires:  libXpm-devel ghostscript-devel freetype-devel
nigelj e38dd1b
BuildRequires:  giflib-devel
nigelj e38dd1b
Requires:       ocaml
nigelj e38dd1b
%define buildlibs ppm bmp xvthumb jpeg gif png xpm ps graphics freetype
nigelj e38dd1b
nigelj e38dd1b
%description
nigelj e38dd1b
CamlImages is an image processing library for Objective CAML, which provides:
nigelj e38dd1b
basic functions for image processing and loading/saving, various image file 
nigelj e38dd1b
formats (hence providing a translation facility from format to format), 
nigelj e38dd1b
and an interface with the Caml graphics library allows to display images 
nigelj e38dd1b
in the Graphics module screen and to mix them with Caml drawings
nigelj e38dd1b
nigelj e38dd1b
In addition, the library can handle huge images that cannot be (or can hardly
nigelj e38dd1b
be) stored into the main memory (the library then automatically creates swap
nigelj e38dd1b
files and escapes them to reduce the memory usage).
nigelj e38dd1b
nigelj e38dd1b
%package        devel
nigelj e38dd1b
Summary:        Development files for camlimages
nigelj e38dd1b
Group:          Development/Libraries
nigelj e38dd1b
Requires:       %{name} = %{version}-%{release} 
nigelj e38dd1b
%description    devel
nigelj e38dd1b
The camlimages-devel package provides libraries and headers for 
nigelj e38dd1b
developing applications using camlimages
nigelj e38dd1b
nigelj e38dd1b
Includes documentation provided by ocamldoc
nigelj e38dd1b
nigelj e38dd1b
%prep
nigelj e38dd1b
%setup -q -n camlimages-2.2 -a 1
b8c7b86
%patch0 -p1
67c2fd6
%patch1 -p1
67c2fd6
%patch2 -p1
b8c7b86
nigelj e38dd1b
sed -i -e 's|LIBRARYDIRS=ppm bmp xvthumb jpeg tiff gif png xpm ps graphics freetype|LIBRARYDIRS=%buildlibs|' Makefile.build.in
nigelj e38dd1b
nigelj e38dd1b
%build
nigelj e38dd1b
%configure
nigelj e38dd1b
make
nigelj e38dd1b
nigelj e38dd1b
%install
nigelj e38dd1b
rm -rf $RPM_BUILD_ROOT
nigelj e38dd1b
make install DESTDIR=$RPM_BUILD_ROOT
nigelj e38dd1b
rm $RPM_BUILD_ROOT%{_libdir}/ocaml/camlimages/*.o
nigelj e38dd1b
rm $RPM_BUILD_ROOT%{_libdir}/ocaml/camlimages/*.cmo
nigelj e38dd1b
rm $RPM_BUILD_ROOT%{_libdir}/ocaml/camlimages/*.mli
nigelj e38dd1b
nigelj e38dd1b
%clean
nigelj e38dd1b
rm -rf $RPM_BUILD_ROOT
nigelj e38dd1b
nigelj e38dd1b
nigelj e38dd1b
%files
nigelj e38dd1b
%defattr(-,root,root,-)
nigelj e38dd1b
%doc Announce Announce-2.2 CHANGES LICENSE README doc/
nigelj e38dd1b
%{_libdir}/ocaml/stublibs/*.so
nigelj e38dd1b
nigelj e38dd1b
%files devel
nigelj e38dd1b
%defattr(-,root,root,-)
nigelj e38dd1b
%doc htmlref/
nigelj e38dd1b
%{_libdir}/ocaml/camlimages
nigelj e38dd1b
nigelj e38dd1b
nigelj e38dd1b
%changelog
dea2a43
* Fri Oct 16 2009 Richard W.M. Jones <rjones@redhat.com> - 2.2.0-10
67c2fd6
- ocaml-camlimages: TIFF reader multiple integer overflows
67c2fd6
  (CVE 2009-3296 / RHBZ#528732).
67c2fd6
b8c7b86
* Fri Jul  3 2009 Richard W.M. Jones <rjones@redhat.com> - 2.2.0-8
b8c7b86
- ocaml-camlimages: PNG reader multiple integer overflows
b8c7b86
  (CVE 2009-2295 / RHBZ#509531).
b8c7b86
nigelj d93f23c
* Wed May 09 2007 Nigel Jones <dev@nigelj.com> 2.2.0-8
nigelj d93f23c
- Exclude ppc64 builds due to missing ocaml
nigelj d93f23c
nigelj e38dd1b
* Fri May 04 2007 Nigel Jones <dev@nigelj.com> 2.2.0-7
nigelj e38dd1b
- Change to Makefile patch to move .so files to stublibs
nigelj e38dd1b
- Rename to ocaml-camlimages
nigelj e38dd1b
- Other changes per review
nigelj e38dd1b
nigelj e38dd1b
* Thu May 03 2007 Nigel Jones <dev@nigelj.com> 2.2.0-6
nigelj e38dd1b
- Include .*a files just to make sure
nigelj e38dd1b
nigelj e38dd1b
* Thu May 03 2007 Nigel Jones <dev@nigelj.com> 2.2.0-5
nigelj e38dd1b
- Revert -4 changes
nigelj e38dd1b
- Remove excludedirs patch, replace with a sed
nigelj e38dd1b
- Provide html documentation generated from running ocaml-ocamldoc
nigelj e38dd1b
nigelj e38dd1b
* Thu Apr 26 2007 Nigel Jones <dev@nigelj.com> 2.2.0-4
nigelj e38dd1b
- Add Provides: camlimages-static, and LICENSE to -devel docs
nigelj e38dd1b
nigelj e38dd1b
* Thu Apr 12 2007 Nigel Jones <dev@nigelj.com> 2.2.0-3
nigelj e38dd1b
- Remove .a & .o files
nigelj e38dd1b
nigelj e38dd1b
* Wed Apr 11 2007 Nigel Jones <dev@nigelj.com> 2.2.0-2
nigelj e38dd1b
- Add missing dependencies
nigelj e38dd1b
nigelj e38dd1b
* Tue Apr 10 2007 Nigel Jones <dev@nigelj.com> 2.2.0-1
nigelj e38dd1b
- Initial spec file