File gegl-unstable.spec of Package gegl-unstable

#
# spec file for package gegl-unstable
#
# Copyright (c) 2016 SUSE LINUX 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/
#


%define debug_package_requires libgegl-0_3-0 = %{version}-%{release}
Name:           gegl-unstable
%define _name gegl
Version:        0.3.6
Release:        0
Summary:        Generic Graphics Library
License:        GPL-3.0+ and LGPL-3.0+
Group:          System/Libraries
Url:            http://gegl.org/
Source:         %{_name}-%{version}.tar.xz
BuildRequires:  ImageMagick
BuildRequires:  OpenEXR-devel
BuildRequires:  SDL-devel
BuildRequires:  asciidoc
BuildRequires:  babl-devel >= 0.1.14
BuildRequires:  enscript
BuildRequires:  gcc-c++
BuildRequires:  libtool
BuildRequires:  pkgconfig(json-glib-1.0)
# multiple provides by gd and gd-tools
BuildRequires:  gd
BuildRequires:  glib2-devel >= 2.16.1
BuildRequires:  graphviz-gd
# Only for directory ownership:
BuildRequires:  gtk-doc
BuildRequires:  gtk2-devel
BuildRequires:  intltool
BuildRequires:  lensfun-devel
# Needed to build the doc, as Bitstream Vera Sans is the referenced font.
BuildRequires:  liberation-fonts
BuildRequires:  libexiv2-devel
BuildRequires:  libjasper-devel >= 1.900.1
BuildRequires:  libjpeg-devel
BuildRequires:  libpng-devel
BuildRequires:  librsvg-devel
BuildRequires:  libspiro-devel
BuildRequires:  libstdc++-devel
BuildRequires:  lua-devel
BuildRequires:  ruby
BuildRequires:  pkgconfig(gexiv2)
BuildRequires:  pkgconfig(libavcodec) >= 55.69.100
BuildRequires:  pkgconfig(libavformat) >= 55.48.100
BuildRequires:  pkgconfig(libraw)
BuildRequires:  pkgconfig(libswscale) >= 2.6.100
BuildRequires:  pkgconfig(libtiff-4)
BuildRequires:  pkgconfig(libv4l2)
BuildRequires:  pkgconfig(libwebp)
BuildRequires:  pkgconfig(vapigen)
# For umfpack
BuildRequires:  suitesparse-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
# since version 0.3.5, we no longer provide an orig-addon package, as ffmpeg/libav
# exists in Tumbleweed and we use it to build
Provides:       %{_name}-0_3-orig-addon = %{version}
Obsoletes:      %{_name}-0_3-orig-addon < 0.3.5

%description
GEGL provides infrastructure to do demand based cached non destructive
image editing on larger than RAM buffers. Through babl it provides
support for a wide range of color models and pixel storage formats for
input and output.

%package -n %{_name}-0_3
Summary:        Generic Graphics Library
Group:          System/Libraries
Recommends:     %{_name}-0_3-lang

%description -n %{_name}-0_3
GEGL provides infrastructure to do demand based cached non destructive
image editing on larger than RAM buffers. Through babl it provides
support for a wide range of color models and pixel storage formats for
input and output.

%package -n libgegl-0_3-0
Summary:        Generic Graphics Library
Group:          System/Libraries
# The plugins are required for the lib to be usable
Requires:       %{_name}-0_3 >= %{version}

%description -n libgegl-0_3-0
GEGL provides infrastructure to do demand based cached non destructive
image editing on larger than RAM buffers. Through babl it provides
support for a wide range of color models and pixel storage formats for
input and output.

%package devel
Summary:        Generic Graphics Library
Group:          System/Libraries
Requires:       libgegl-0_3-0 = %{version}

%description devel
GEGL provides infratructure to do demand based cached non destructive
image editing on larger than RAM buffers. Through babl it provides
support for a wide range of color models and pixel storage formats for
input and output.

%package doc
Summary:        Generic Graphics Library
Group:          System/Libraries
Requires:       libgegl-0_3-0 = %{version}

%description doc
GEGL provides infrastructure to do demand based cached non destructive
image editing on larger than RAM buffers. Through babl it provides
support for a wide range of color models and pixel storage formats for
input and output.

%lang_package -n %{_name}-0_3

%prep
%setup -q -n %{_name}-%{version}

%build
./autogen.sh
export RPM_OPT_FLAGS="%{optflags} -fno-strict-aliasing"
## Not passing --enable-workshop=yes\ as it breaks the build atm
%configure\
	--disable-static --disable-silent-rules
make %{?_smp_mflags}

%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}
# remove example programs
for example in \
    gegl-tester; do
    rm %{buildroot}%{_bindir}/$example
done
find %{buildroot} -type f -name "*.la" -delete -print
# move some files out of the way to not conflict with gegl 0.2
mv %{buildroot}%{_bindir}/gegl %{buildroot}%{_bindir}/gegl-0.3
mv %{buildroot}%{_bindir}/gegl-imgcmp %{buildroot}%{_bindir}/gegl-imgcmp-0.3
mv %{buildroot}%{_datadir}/gtk-doc/html/gegl/ %{buildroot}%{_datadir}/gtk-doc/html/gegl-0.3/
%find_lang %{_name}-0.3 %{?no_lang_C}

%post -n gegl-0_3 -p /sbin/ldconfig
%post -n libgegl-0_3-0 -p /sbin/ldconfig

%postun -n gegl-0_3 -p /sbin/ldconfig
%postun -n libgegl-0_3-0 -p /sbin/ldconfig

%files
%defattr(-,root,root)
%{_bindir}/gegl-0.3
%{_bindir}/gegl-imgcmp-0.3

%files -n %{_name}-0_3
%defattr(-,root,root)
%dir %{_libdir}/gegl-0.3/
%{_libdir}/gegl-0.3/*.so
# libgegl-sc-0.3.so is a support library for the seamless-clone module
%{_libdir}/libgegl-sc-0.3.so
%{_libdir}/libgegl-npd-0.3.so
%{_libdir}/gegl-0.3/grey2.json

%files -n libgegl-0_3-0
%defattr(-,root,root)
%doc AUTHORS COPYING COPYING.LESSER NEWS
%{_libdir}/libgegl-0.3.so.*

%files devel
%defattr(-,root,root)
%{_includedir}/gegl-0.3/
%{_libdir}/libgegl-0.3.so
%{_libdir}/pkgconfig/gegl-0.3.pc
%{_libdir}/pkgconfig/gegl-sc-0.3.pc

%files doc
%defattr(-,root,root)
%doc %{_datadir}/gtk-doc/html/gegl-0.3/

%files -n %{_name}-0_3-lang -f %{_name}-0.3.lang
%defattr(-,root,root)

%changelog