File vips.spec of Package vips

#
# spec file for package vips
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}

Name:           vips
%define libname lib%{name}
Version:        7.34.2
Release:        0
%define somajor 31
Summary:        C/C++ library for processing large images
License:        LGPL-2.1
Group:          System/Libraries
Url:            http://www.vips.ecs.soton.ac.uk/
Source0:        http://www.vips.ecs.soton.ac.uk/supported/current/%{name}-%{version}.tar.gz
# PATCH-FIX-OPENSUSE vips-date-and-time.patch - fix file-contains-date-and-time RPMLINT warning
Patch0:         vips-date-and-time.patch

BuildRequires:  ImageMagick-devel
BuildRequires:  fdupes
BuildRequires:  fftw3-devel
BuildRequires:  gcc-c++
BuildRequires:  gettext
BuildRequires:  glib2-devel
BuildRequires:  gtk-doc
BuildRequires:  libcfitsio-devel
BuildRequires:  libexif-devel
BuildRequires:  libjpeg-devel
BuildRequires:  liblcms2-devel
BuildRequires:  libmatio-devel
BuildRequires:  libopenexr-devel
BuildRequires:  libopenslide-devel
BuildRequires:  libpng-devel
BuildRequires:  libtiff-devel
BuildRequires:  libtool
BuildRequires:  libxml2-devel
BuildRequires:  orc >= 0.4
BuildRequires:  pango-devel
BuildRequires:  python-devel
BuildRequires:  swig
BuildRequires:  zlib-devel

BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
VIPS is a free image processing system. It is good with large images
(images larger than the amount of RAM you have available), with many CPUs,
for working with colour, for scientific analysis and for general
research & development.

%package -n %{libname}%{somajor}
Summary:        C/C++ library for processing large images
Group:          System/Libraries

%description -n %{libname}%{somajor}
VIPS is a free image processing system. It is good with large images
(images larger than the amount of RAM you have available), with many CPUs,
for working with colour, for scientific analysis and for general
research & development.

%package -n %{libname}-devel
Summary:        Development files for VIPS library
Group:          Development/Libraries/Other
Requires:       %{libname}%{somajor} = %{version}
Requires:       libjpeg-devel
Requires:       libtiff-devel
Requires:       zlib-devel

%description -n %{libname}-devel
This package contains development files for developing applications that use VIPS library.

%package tools
Summary:        Command line tools for VIPS library
Group:          Productivity/Graphics/Other
Requires:       %{libname}%{somajor} = %{version}

%description tools
This package contains command line tools for processing large images using VIPS library.

%package -n python-%{name}
Summary:        Python bindings for VIPS image processing library
Group:          Development/Libraries/Python
Requires:       %{libname}%{somajor} = %{version}

%description -n python-%{name}
This package contains Python bindings for VIPS library.

%package doc
Summary:        Documentation for VIPS library
Group:          Documentation/Other
Requires:       %{libname}%{somajor} = %{version}
BuildArch:      noarch

%description doc
This package contains documentation about VIPS library in HTML and PDF formats.

%prep
%setup -q
%patch0 -p1

%build
%configure --disable-static
make %{?_smp_mflags}

%install
%make_install
find %{buildroot}%{_libdir} -name '*.la' -type f -delete -print
%find_lang vips7.34
%fdupes %{buildroot}%{python_sitearch}/
rm -rf %{buildroot}%{_datadir}/doc/vips

%post -n %{libname}%{somajor} -p /sbin/ldconfig

%postun -n %{libname}%{somajor} -p /sbin/ldconfig

%files -n %{libname}%{somajor} -f vips7.34.lang
%defattr(-,root,root)
%{_libdir}/*.so.%{somajor}*

%files -n %{libname}-devel
%defattr(-,root,root)
%{_libdir}/*.so
%{_includedir}/%{name}/
%{_libdir}/pkgconfig/*
%{_datadir}/gtk-doc/html/%{libname}/

%files tools
%defattr(-,root,root)
%{_bindir}/*
%{_mandir}/man1/*

%files -n python-%{name}
%defattr(-,root,root)
%{python_sitearch}/*

%files doc
%defattr(-,root,root)
%doc doc/html doc/pdf AUTHORS NEWS THANKS TODO COPYING ChangeLog

%changelog
openSUSE Build Service is sponsored by