File _service:set_version:babl.spec of Package babl

#
# spec file for package babl
#
# Copyright (c) 2020 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#

%if 0%{?suse_version}
%define lib_name libbabl-0_1-0
%else
%define lib_name babl
%endif

%define debug_package_requires %{lib_name} = %{version}-%{release}

Name:           babl
Version:        0.1.x+git.20240211T163028~a28309c
Release:        0
Summary:        Dynamic Pixel Format Translation Library
License:        LGPL-3.0-or-later AND GPL-3.0-or-later
Group:          Development/Libraries/C and C++
URL:            http://gegl.org/babl/

Source0:        https://download.gimp.org/pub/babl/0.1/%{name}-%{version}.tar.xz
Source99:       baselibs.conf
BuildRequires:  meson
BuildRequires:  pkgconfig
BuildRequires:  vala
BuildRequires:  pkgconfig(gobject-introspection-1.0)
BuildRequires:  pkgconfig(lcms2)
BuildRequires:  pkgconfig(vapigen)
BuildRequires:  pkgconfig(gi-docgen) 
# None of these is needed for standard build:
#BuildRequires:  inkscape ruby w3m

%define vala_version %(rpm -q --queryformat='%%{VERSION}' vala | sed 's/\.[0-9]*$//g')

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

%if 0%{?suse_version}
%package -n %{lib_name}
Summary:        Dynamic Pixel Format Translation Library
Group:          System/Libraries

%description -n %{lib_name}
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.
%endif

%package -n typelib-1_0-Babl-0_1
Summary:        Introspection bindings for babl
Group:          System/Libraries

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

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:       %{lib_name} = %{version}
%if 0%{?suse_version}
Requires:       typelib-1_0-Babl-0_1 = %{version}
%endif

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

%package vala
Summary:        Vala Bindings to the Dynamic Pixel Format Translation Library
Group:          Development/Libraries/C and C++
Requires:       %{lib_name} = %{version}
Requires:       vala

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

This package provides Vala bindings for babl.

%prep
%autosetup -p1

%build
sed "s,@BABL_GIT_VERSION@,%{version},g" git-version.h.in > git-version.h
%meson -Dwith-docs=false \
	%{nil}
%meson_build

%install
%meson_install
mv %{buildroot}%{_datadir}/vala %{buildroot}%{_datadir}/vala-%{vala_version}

%post   -n %{lib_name} -p /sbin/ldconfig
%postun -n %{lib_name} -p /sbin/ldconfig

%if 0%{?suse_version}
%files -n %{lib_name}
%else
%files
%endif
%license COPYING
%doc NEWS
%{_libdir}/*.so.*
%{_libdir}/babl-0.1/
%{_bindir}/%{name}

%if 0%{?suse_version}
%files -n typelib-1_0-Babl-0_1
%endif
%{_libdir}/girepository-1.0/Babl-0.1.typelib

%files devel
%doc AUTHORS TODO
%{_includedir}/babl-0.1/
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%{_datadir}/gir-1.0/Babl-0.1.gir

%files vala
%{_datadir}/vala-%{vala_version}/vapi/babl-0.1.deps
%{_datadir}/vala-%{vala_version}/vapi/babl-0.1.vapi

%changelog
openSUSE Build Service is sponsored by