pango/pango.spec

257 lines
8.2 KiB
RPMSpec
Raw Normal View History

#
# spec file for package pango
#
# Copyright (c) 2014 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/
#
# When updating the binary version, do not forget to also update baselibs.conf
%define pango_binary_version 1.8.0
Name: pango
Version: 1.36.8
Release: 0
Summary: Library for Layout and Rendering of Text
License: LGPL-2.1+
Group: System/Libraries
Url: http://www.pango.org/
Source: http://download.gnome.org/sources/pango/1.36/%{name}-%{version}.tar.xz
Source1: README.SUSE
Source2: macros.pango
Source99: baselibs.conf
BuildRequires: gcc-c++
BuildRequires: gtk-doc
BuildRequires: pkg-config
BuildRequires: pkgconfig(cairo) >= 1.12.10
BuildRequires: pkgconfig(fontconfig) >= 2.10.91
BuildRequires: pkgconfig(freetype2)
BuildRequires: pkgconfig(glib-2.0) >= 2.33.12
BuildRequires: pkgconfig(gobject-2.0)
BuildRequires: pkgconfig(gobject-introspection-1.0)
BuildRequires: pkgconfig(harfbuzz) >= 0.9.9
BuildRequires: pkgconfig(libthai) >= 0.1.9
BuildRequires: pkgconfig(xft) >= 2.0.0
BuildRequires: pkgconfig(xrender)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Pango is a library for layout and rendering of text, with an emphasis
on internationalization. It can be used anywhere that text layout
is needed.
Pango forms the core of text and font handling for GTK+.
%package -n libpango-1_0-0
Summary: Library for Layout and Rendering of Text
Group: System/Libraries
# pango-querymodules(-64)? was first introduced the --update-cache option in 1.31.1... (bnc#792646).
Requires(post): %{name}-tools >= 1.31.1
Provides: %{name} = %{version}
Obsoletes: %{name} < %{version}
# bug437293
%ifarch ppc64
Obsoletes: pango-64bit
%endif
#
%description -n libpango-1_0-0
Pango is a library for layout and rendering of text, with an emphasis
on internationalization. It can be used anywhere that text layout
is needed.
Pango forms the core of text and font handling for GTK+.
%package -n typelib-1_0-Pango-1_0
Summary: Library for Layout and Rendering of Text -- Introspection bindings
Group: System/Libraries
%description -n typelib-1_0-Pango-1_0
Pango is a library for layout and rendering of text, with an emphasis
on internationalization. It can be used anywhere that text layout
is needed.
Pango forms the core of text and font handling for GTK+.
This package provides the GObject Introspection bindings for Pango.
%package tools
Summary: Library for Layout and Rendering of Text -- Tools
Group: System/Libraries
%description tools
Pango is a library for layout and rendering of text, with an emphasis
on internationalization. It can be used anywhere that text layout
is needed.
Pango forms the core of text and font handling for GTK+.
%package module-thai-lang
Summary: Library for Layout and Rendering of Text -- Module for the Thai Language
Group: System/Libraries
Requires(post): %{name}-tools
Requires(postun): %{name}-tools
Provides: locale(pango:th_TH)
%description module-thai-lang
Pango is a library for layout and rendering of text, with an emphasis
on internationalization. It can be used anywhere that text layout
is needed.
Pango forms the core of text and font handling for GTK+.
%package devel
Summary: Library for Layout and Rendering of Text -- Development Files
Group: Development/Libraries/GNOME
Requires: libpango-1_0-0 = %{version}
Requires: typelib-1_0-Pango-1_0 = %{version}
# bug437293
%ifarch ppc64
Obsoletes: pango-devel-64bit
%endif
Provides: pango-doc = %{version}
Obsoletes: pango-doc < %{version}
%description devel
Pango is a library for layout and rendering of text, with an emphasis
on internationalization. It can be used anywhere that text layout
is needed.
Pango forms the core of text and font handling for GTK+.
This package contains all necessary include files and libraries needed
to develop applications that require these.
%prep
%setup -q
%if "%{_lib}" == "lib64"
cp -a %{SOURCE1} .
%endif
%build
%configure --disable-static --with-pic --with-cairo
make %{?_smp_mflags}
%install
%make_install
find %{buildroot}%{_libdir} -name '*.la' -type f -delete -print
mkdir -p %{buildroot}%{_sysconfdir}/pango/
touch %{buildroot}%{_sysconfdir}/pango/pango.modules
touch %{buildroot}%{_libdir}/pango/%{pango_binary_version}/modules.cache
%if "%{_lib}" == "lib64"
mv %{buildroot}%{_bindir}/pango-querymodules %{buildroot}%{_bindir}/pango-querymodules-64
%endif
# Install rpm macros
mkdir -p %{buildroot}%{_sysconfdir}/rpm
cp %{SOURCE2} %{buildroot}%{_sysconfdir}/rpm
###########################################################################
# Note: when updating scriptlets, don't forget to also update baselibs.conf
###########################################################################
# Convenient %%define for the scriplets
%if "%{_lib}" == "lib64"
%define _pango_querymodules %{_bindir}/pango-querymodules-64
%else
%define _pango_querymodules %{_bindir}/pango-querymodules
%endif
%define _pango_querymodules_update_cache %{_pango_querymodules} --update-cache
%post -n libpango-1_0-0
/sbin/ldconfig
%if 0
# In case libpango-1_0-0 gets installed before pango-tools, we don't want to
# fail. So we make the call to pango-querymodules dependent on the existence of
# the binary. This is why we also have a %%post for pango-tools.
%endif
if test -f %{_pango_querymodules}; then
%{_pango_querymodules_update_cache}
fi
%if 0
# No need to call pango-querymodules in postun:
# - if it's an upgrade, it will have been called in post
# - if it's an uninstall, we don't care about this anymore
%endif
%postun -n libpango-1_0-0 -p /sbin/ldconfig
%post module-thai-lang
%{_pango_querymodules_update_cache}
%postun module-thai-lang
%{_pango_querymodules_update_cache}
%post tools
%if 0
# If we install pango-tools for the first time, then we should run it in case
# libpango-1_0-0 was installed first (ie, if
# %%{_libdir}/pango/%%{pango_binary_version} already exists) which means
# pango-querymodules couldn't run there.
%endif
if [ $1 = 1 ]; then
test -f %{_libdir}/libpango-1.0.so.0
if test $? -eq 0; then
%{_pango_querymodules_update_cache}
fi
fi
%files -n libpango-1_0-0
%defattr(-,root,root)
%if "%{_lib}" == "lib64"
%doc README AUTHORS COPYING ChangeLog README.SUSE
%else
%doc README AUTHORS COPYING ChangeLog
%endif
%dir %{_libdir}/pango
%dir %{_libdir}/pango/%{pango_binary_version}
%ghost %{_libdir}/pango/%{pango_binary_version}/modules.cache
%dir %{_libdir}/pango/%{pango_binary_version}/modules
%{_libdir}/pango/%{pango_binary_version}/modules/pango-arabic-lang.so
%{_libdir}/pango/%{pango_binary_version}/modules/pango-basic-fc.so
%{_libdir}/pango/%{pango_binary_version}/modules/pango-indic-lang.so
%{_libdir}/lib*.so.*
%dir %{_sysconfdir}/pango
%config %ghost %{_sysconfdir}/pango/pango.modules
%files -n typelib-1_0-Pango-1_0
%defattr(-,root,root)
%{_libdir}/girepository-1.0/Pango-1.0.typelib
%{_libdir}/girepository-1.0/PangoCairo-1.0.typelib
%{_libdir}/girepository-1.0/PangoFT2-1.0.typelib
%{_libdir}/girepository-1.0/PangoXft-1.0.typelib
%files tools
%defattr(-, root, root)
%{_bindir}/pango-querymodules*
%{_bindir}/pango-view
%doc %{_mandir}/man1/pango-querymodules.1*
%doc %{_mandir}/man1/pango-view.1*
# We have this module in a subpackage because it requires additional libraries.
%files module-thai-lang
%defattr(-, root, root)
%{_libdir}/pango/%{pango_binary_version}/modules/pango-thai-lang.so
%files devel
%defattr(-, root, root)
%{_libdir}/lib*.so
%{_libdir}/pkgconfig/*.pc
%{_includedir}/pango-1.0/
%{_datadir}/gir-1.0/*.gir
%doc %{_datadir}/gtk-doc/html/pango/
%{_sysconfdir}/rpm/macros.pango
%changelog