File babl.spec of Package babl

#
# spec file for package babl
#
# Copyright (c) 2012 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/
#


# Temprarily disabled, see bgo#673422
%define build_vala 0

Name:           babl
Url:            http://gegl.org/babl/
Version:        0.1.10
Release:        0
Summary:        Dynamic Pixel Format Translation Library
License:        LGPL-3.0+
Group:          System/Libraries
Source:         http://ftp.gtk.org/pub/babl/0.1/%{name}-%{version}.tar.bz2
# PATCH-FIX-UPSTREAM babl-fix-gir.patch bgo#666647 dimstar@opensuse.org -- Fix building of .gir and typelib files.
Patch0:         babl-fix-gir.patch
# PATCH-FIX-UPSTREAM babl-fix-gir-build.patch bgo#673422 vuntz@opensuse.org -- Fix build of .gir
Patch1:         babl-fix-gir-build.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  gobject-introspection-devel
# Needed for patch0 and patch1
BuildRequires:  libtool
BuildRequires:  pkg-config
BuildRequires:  vala
%define debug_package_requires libbabl-0_1-0 = %{version}-%{release}
# None of these is needed for standard build:
#BuildRequires:  inkscape ruby w3m
# To list AUTHORS:
# sed -n 's/  <dt>//p' <AUTHORS  | sed 's/<em>/</;s/<\/em>/>/;s/ at /@/;s/<\/dt>//'

%description
babl is a dynamic, any to any, pixel format translation library.

It allows converting between different methods of storing pixels known
as pixel formats that have with different bitdepths and other data
representations, color models and component permutations.

A vocabulary to formulate new pixel formats from existing primitives is
provided as well as the framework to add new color models and data
types.

%package -n libbabl-0_1-0
Summary:        Dynamic Pixel Format Translation Library
Group:          System/Libraries

%description -n libbabl-0_1-0
babl is a dynamic, any to any, pixel format translation library.

It allows converting between different methods of storing pixels known
as pixel formats that have with different bitdepths and other data
representations, color models and component permutations.

A vocabulary to formulate new pixel formats from existing primitives is
provided as well as the framework to add new color models and data
types.

%package -n typelib-1_0-Babl-0_1
Summary:        Dynamic Pixel Format Translation Library -- Introspection bindings
Group:          System/Libraries

%description -n typelib-1_0-Babl-0_1
babl is a dynamic, any to any, pixel format translation library.

It allows converting between different methods of storing pixels known
as pixel formats that have with different bitdepths and other data
representations, color models and component permutations.

A vocabulary to formulate new pixel formats from existing primitives is
provided as well as the framework to add new color models and data
types.

This package provides the GObject Introspection bindings for babl.

%package devel
Summary:        Dynamic Pixel Format Translation Library
Group:          Development/Libraries/C and C++
Requires:       glibc-devel
Requires:       libbabl-0_1-0 = %{version}
Requires:       typelib-1_0-Babl-0_1 = %{version}

%description devel
babl is a dynamic, any to any, pixel format translation library.

It allows converting between different methods of storing pixels known
as pixel formats that have with different bitdepths and other data
representations, color models and component permutations.

A vocabulary to formulate new pixel formats from existing primitives is
provided as well as the framework to add new color models and data
types.

%prep
%setup -q
%patch0 -p1
%patch1 -p1

%build
# Needed for patch0 and patch1
./autogen.sh
%configure\
	--disable-static \
	--enable-introspection \
%if !%{build_vala}
	--without-vala \
%endif
	%{nil}
make %{?_smp_mflags}

%install
%makeinstall
find %{buildroot} -type f -name "*.la" -delete -print

%post -n libbabl-0_1-0 -p /sbin/ldconfig

%postun -n libbabl-0_1-0 -p /sbin/ldconfig

%files -n libbabl-0_1-0
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog NEWS README TODO
%{_libdir}/*.so.*
%{_libdir}/babl-0.1/

%files -n typelib-1_0-Babl-0_1
%defattr(-,root,root)
%{_libdir}/girepository-1.0/Babl-0.1.typelib

%files devel
%defattr(-,root,root)
%{_datadir}/gir-1.0/Babl-0.1.gir
%if %{build_vala}
%dir %{_datadir}/vala
%dir %{_datadir}/vala/vapi
%{_datadir}/vala/vapi/babl-0.1.vapi
%endif
%{_includedir}/babl-0.1/
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc

%changelog