File atk.spec of Package atk

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


Name:           atk
Summary:        An Accessibility ToolKit
License:        LGPL-2.1-or-later
Group:          System/Libraries
Version:        2.28.1
Release:        0
URL:            http://www.gtk.org/
Source:         http://download.gnome.org/sources/atk/2.28/%{name}-%{version}.tar.xz
Source99:       baselibs.conf
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  glib2-devel >= 2.31.2
BuildRequires:  gobject-introspection-devel
BuildRequires:  translation-update-upstream
%if 0%{?BUILD_FROM_VCS}
BuildRequires:  gnome-common
BuildRequires:  gtk-doc
%endif
Requires:       %{name}-lang = %{version}
Requires:       libatk-1_0-0
# bug437293
%ifarch ppc64
Obsoletes:      atk-64bit
%endif
#
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
The ATK library provides a set of accessibility interfaces. By
supporting the ATK interfaces, an application or toolkit can be used
with screen readers, magnifiers, and alternate input devices.

%package -n libatk-1_0-0
Summary:        An Accessibility ToolKit
Group:          System/Libraries
Provides:       %{name} = %{version}
Obsoletes:      %{name} < %{version}

%description -n libatk-1_0-0
The ATK library provides a set of accessibility interfaces. By
supporting the ATK interfaces, an application or toolkit can be used
with screen readers, magnifiers, and alternate input devices.

%package -n typelib-1_0-Atk-1_0
Summary:        An Accessibility ToolKit -- Introspection bindings
Group:          System/Libraries

%description -n typelib-1_0-Atk-1_0
The ATK library provides a set of accessibility interfaces. By
supporting the ATK interfaces, an application or toolkit can be used
with screen readers, magnifiers, and alternate input devices.

This package provides the GObject Introspection bindings for ATK.

%package devel
Summary:        Include Files and Libraries mandatory for Development
Group:          Development/Libraries/GNOME
Requires:       libatk-1_0-0 = %{version}
Requires:       typelib-1_0-Atk-1_0 = %{version}
# bug437293
%ifarch ppc64
Obsoletes:      atk-devel-64bit
%endif
#

%description devel
This package contains all necessary include files and libraries needed
to develop applications that require these.

%package doc
Summary:        Additional Package Documentation for atk
Group:          System/Libraries
Requires:       libatk-1_0-0 = %{version}
%if 0%{?suse_version} >= 1120
BuildArch:      noarch
%endif

%description doc
This package contains additional documentation for the ATK Library.

%lang_package

%prep
%setup -q
translation-update-upstream

%if 0%{?BUILD_FROM_VCS}
[ -x ./autogen.sh ] && NOCONFIGURE=1 ./autogen.sh
%endif

%build
%configure \
%if 0%{?BUILD_FROM_VCS}
  --enable-gtk-doc \
%endif
  --disable-static
make %{?_smp_mflags}

%install
%makeinstall
%if 0%{?suse_version} <= 1120
%{__rm} %{buildroot}%{_datadir}/locale/en@shaw/LC_MESSAGES/*
%endif
%if 0%{?suse_version} > 1110
%{__rm} %{buildroot}/%{_libdir}/*.la
%endif
%find_lang %{name}10
%fdupes $RPM_BUILD_ROOT

%post -n libatk-1_0-0 -p /sbin/ldconfig

%postun -n libatk-1_0-0 -p /sbin/ldconfig

%files -n libatk-1_0-0
%defattr(-, root, root)
%doc AUTHORS COPYING NEWS README
%{_libdir}/lib*.so.*

%files -n typelib-1_0-Atk-1_0
%defattr(-, root, root)
%{_libdir}/girepository-1.0/Atk-1.0.typelib

%files lang -f %{name}10.lang

%files devel
%defattr(-, root, root)
%{_includedir}/atk-1.0
%{_libdir}/lib*.so
%{_libdir}/pkgconfig/*.pc
%{_datadir}/gir-1.0/*.gir
%if 0%{?suse_version} <= 1110
%{_libdir}/*.la
%endif

%files doc
%defattr(-, root, root)
%dir %{_datadir}/gtk-doc
%dir %{_datadir}/gtk-doc/html
%{_datadir}/gtk-doc/html/atk

%changelog
openSUSE Build Service is sponsored by