gtk3/gtk3.spec
OBS User autobuild 4dc6c29438 Accepting request 46468 from GNOME:Factory
Copy from GNOME:Factory/gtk3 based on submit request 46468 from user vuntz

OBS-URL: https://build.opensuse.org/request/show/46468
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gtk3?expand=0&rev=2
2010-08-27 15:19:07 +00:00

282 lines
9.7 KiB
RPMSpec

#
# spec file for package gtk3 (Version 2.90.5)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2010 Dominique Leuenebrger, Amsterdam, Netherlands
#
# 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/
#
Name: gtk3
%define _name gtk+
Version: 2.90.5
Release: 2
# FIXME: 2.90.5 doesn't compile with parallel build (bgo#624304). Check if this is still true for later versions.
License: LGPLv2.1+
Summary: The GTK+ toolkit library (version 3)
Url: http://www.gtk.org/
Group: System/Libraries
Source: ftp://ftp.gnome.org/pub/GNOME/sources/%{_name}/2.90/%{_name}-%{version}.tar.bz2
Source1: README.SUSE
Source2: gtkrc
Source3: macros.gtk3
Source99: baselibs.conf
# PATCH-FIX-OPENSUSE gtk3-GTK_PATH64.patch sbrabec@novell.com - 64-bit dual install. Use GTK_PATH64 environment variable instead of GTK_PATH
Patch0: gtk3-GTK_PATH64.patch
# PATCH-FIX-OPENSUSE gtk3-path-local.patch Search in /usr/local/%{_lib} by default. bnc369696 bgo534474
Patch1: gtk3-path-local.patch
# PATCH-FEATURE-UPSTREAM gtk3-bnc129753-localize-font-style-name.patch bnc129753 bgo319484 mfabian@novell.com - Translate the font styles in the GUI
Patch2: gtk3-bnc129753-localize-font-style-name.patch
# PATCH-FIX-UPSTREAM gtk3-bnc130159-bgo319483-async-font-selection.patch bnc130159 bgo319483 federico@novell.com - Load fonts asynchronously in GtkFontSelection to make it appear faster for CJK languages
Patch3: gtk3-bnc130159-bgo319483-async-font-selection.patch
BuildRequires: fdupes
BuildRequires: cups-devel
BuildRequires: gnome-patch-translation
BuildRequires: pkgconfig(atk)
BuildRequires: pkgconfig(cairo)
BuildRequires: pkgconfig(fontconfig)
BuildRequires: pkgconfig(gdk-pixbuf-2.0) >= 2.21.0
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(gobject-introspection-1.0)
BuildRequires: pkgconfig(pango)
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xcomposite)
BuildRequires: pkgconfig(xcursor)
BuildRequires: pkgconfig(xdamage)
BuildRequires: pkgconfig(xext)
BuildRequires: pkgconfig(xfixes)
BuildRequires: pkgconfig(xi)
BuildRequires: pkgconfig(xinerama)
BuildRequires: pkgconfig(xrandr)
BuildRequires: pkgconfig(xrender)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
GTK+ is a multi-platform toolkit for creating graphical user interfaces.
Offering a complete set of widgets, GTK+ is suitable for projects
ranging from small one-off projects to complete application suites.
%package -n libgtk-3_0-0
License: LGPLv2.1+
Summary: The GTK+ toolkit library (version 3)
Group: System/Libraries
# Provide %{name} to make the lang package installable
Provides: %{name} = %{version}
Requires(post): %{name}-tools
Requires(postun): %{name}-tools
# gtk+ can work without branding/data/translations. Built in defaults will be used then.
Recommends: %{name}-branding
Recommends: %{name}-data = %{version}
Recommends: %{name}-lang = %{version}
Recommends: gvfs
Recommends: hicolor-icon-theme
%description -n libgtk-3_0-0
GTK+ is a multi-platform toolkit for creating graphical user interfaces.
Offering a complete set of widgets, GTK+ is suitable for projects
ranging from small one-off projects to complete application suites.
%package tools
License: LGPLv2.1+
Summary: The GTK+ toolkit library (version 3) -- Tools
Group: System/Libraries
%description tools
GTK+ is a multi-platform toolkit for creating graphical user interfaces.
Offering a complete set of widgets, GTK+ is suitable for projects
ranging from small one-off projects to complete application suites.
%package data
License: LGPLv2.1+
Summary: The GTK+ toolkit library (version 3) -- Data Files
Group: System/Libraries
BuildArch: noarch
%description data
GTK+ is a multi-platform toolkit for creating graphical user interfaces.
Offering a complete set of widgets, GTK+ is suitable for projects
ranging from small one-off projects to complete application suites.
%package branding-upstream
License: LGPLv2.1+
Summary: The GTK+ toolkit library (version 3) -- Branding Files
Group: System/Libraries
Provides: %{name}-branding = %{version}
Conflicts: otherproviders(%{name}-branding)
Supplements: packageand(%{name}:branding-upstream)
%description branding-upstream
GTK+ is a multi-platform toolkit for creating graphical user interfaces.
Offering a complete set of widgets, GTK+ is suitable for projects
ranging from small one-off projects to complete application suites.
%package devel
License: LGPLv2.1+
Summary: The GTK+ toolkit library (version 3) -- Development Files
Group: Development/Libraries/X11
Requires: libgtk-3_0-0 = %{version}
# gtk-builder-convert needs this.
Requires: pyxml
%description devel
GTK+ is a multi-platform toolkit for creating graphical user interfaces.
Offering a complete set of widgets, GTK+ is suitable for projects
ranging from small one-off projects to complete application suites.
This package contains the development files for GTK+ 3.x.
%lang_package
%prep
%setup -q -n %{_name}-%{version}
gnome-patch-translation-prepare
%if "%_lib" == "lib64"
cp -a %{S:1} .
%patch0 -p1
%endif
%patch1 -p0
%patch2 -p1
%patch3 -p1
gnome-patch-translation-update
%build
%configure \
--disable-static \
--enable-man \
--with-xinput=xfree \
--enable-introspection
# building of gobject-introspection seems to fail with -j 'n>1' (see bgo#624304)
#%{__make} %{?_smp_mflags}
%{__make}
%install
%makeinstall
find %{buildroot}%{_libdir} -name '*.la' -delete -print
%find_lang gtk30
%find_lang gtk30-properties
install -m 644 -D %{S:2} %{buildroot}%{_sysconfdir}/gtk-3.0/gtkrc
touch %{buildroot}%{_libdir}/gtk-3.0/3.0.0/immodules.cache
%if "%_lib" == "lib64"
mv %{buildroot}%{_bindir}/gtk-query-immodules-3.0 %{buildroot}%{_bindir}/gtk-query-immodules-3.0-64
mv %{buildroot}%{_mandir}/man1/gtk-query-immodules-3.0.1 %{buildroot}%{_mandir}/man1/gtk-query-immodules-3.0-64.1
%endif
# Install rpm macros
mkdir -p %{buildroot}%{_sysconfdir}/rpm
cp %{S:3} %{buildroot}%{_sysconfdir}/rpm
%fdupes %{buildroot}%{_datadir}
%fdupes %{buildroot}%{_libdir}
%clean
rm -rf %{buildroot}
# In case libgtk-3_0-0 gets installed before
# gtk3-tools, we don't want to fail. So we make the call to
# gtk-query-immodules-3.0 dependent on the existence of
# the binary. This is why we also have a %post for
# gtk3-tools.
%post -n libgtk-3_0-0
/sbin/ldconfig
%if "%_lib" == "lib64"
test -f %{_bindir}/gtk-query-immodules-3.0-64 && %{_bindir}/gtk-query-immodules-3.0-64 --update-cache
%else
test -f %{_bindir}/gtk-query-immodules-3.0 && %{_bindir}/gtk-query-immodules-3.0 --update-cache
%endif
# If we install gtk3-tools for the first time,
# then we should run it in case libgtk-3_0-0 was installed
# first (ie, if %{_libdir}/gtk-3.0/3.0.0 already exists) which means
# gtk-query-immodules-3.0 couldn't run there.
%post tools
if [ $1 == 1 ]; then
test -d %{_libdir}/gtk-3.0/3.0.0
if test $? -eq 0; then
%if "%_lib" == "lib64"
%{_bindir}/gtk-query-immodules-3.0-64 --update-cache
%else
%{_bindir}/gtk-query-immodules-3.0 --update-cache
%endif
fi
fi
# No need to call gtk-query-immodules-3.0 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
%postun -n libgtk-3_0-0 -p /sbin/ldconfig
%files -n libgtk-3_0-0
%defattr(-, root, root)
%doc AUTHORS COPYING README NEWS ChangeLog
%if "%_lib" == "lib64"
%doc README.SUSE
%endif
%config %{_sysconfdir}/gtk-3.0/im-multipress.conf
%dir %{_libdir}/gtk-3.0
%dir %{_libdir}/gtk-3.0/3.0.0
%{_libdir}/gtk-3.0/modules/
%{_libdir}/gtk-3.0/3.0.0/engines/
%{_libdir}/gtk-3.0/3.0.0/immodules/
%{_libdir}/gtk-3.0/3.0.0/printbackends/
%ghost %{_libdir}/gtk-3.0/3.0.0/immodules.cache
%{_libdir}/libgailutil-3.0.so.*
%{_libdir}/libgdk-x11-3.0.so.*
%{_libdir}/libgtk-x11-3.0.so.*
%{_libdir}/girepository-1.0/*.typelib
%files tools
%defattr(-,root,root)
%{_bindir}/gtk-query-immodules-3.0*
%{_bindir}/gtk-update-icon-cache-3.0
%{_mandir}/man1/gtk-query-immodules-3.0*.1*
%{_mandir}/man1/gtk-update-icon-cache-3.0.1*
%files data
%defattr(-,root,root)
%{_datadir}/themes/Default/gtk-3.0-key/gtkrc
%{_datadir}/themes/Emacs/gtk-3.0-key/gtkrc
%{_datadir}/themes/Raleigh/gtk-3.0/gtkrc
%files branding-upstream
%defattr(-,root,root)
%config %{_sysconfdir}/gtk-3.0/gtkrc
%files lang -f gtk30.lang -f gtk30-properties.lang
%files devel
%defattr(-,root,root)
%doc %{_datadir}/gtk-doc/html/*
%{_bindir}/gtk3-demo
%{_bindir}/gtk-builder-convert-3.0
%{_mandir}/man1/gtk-builder-convert-3.0.1*
%{_datadir}/aclocal/gtk-3.0.m4
%dir %{_datadir}/gtk-3.0
%{_datadir}/gtk-3.0/demo/
%{_datadir}/gir-1.0/*.gir
%{_includedir}/gail-3.0/
%{_includedir}/gtk-3.0/
%{_libdir}/gtk-3.0/include/
%{_libdir}/pkgconfig/gail-3.0.pc
%{_libdir}/pkgconfig/gdk-3.0.pc
%{_libdir}/pkgconfig/gdk-x11-3.0.pc
%{_libdir}/pkgconfig/gtk+-3.0.pc
%{_libdir}/pkgconfig/gtk+-unix-print-3.0.pc
%{_libdir}/pkgconfig/gtk+-x11-3.0.pc
%{_libdir}/libgailutil-3.0.so
%{_libdir}/libgdk-x11-3.0.so
%{_libdir}/libgtk-x11-3.0.so
%{_sysconfdir}/rpm/macros.gtk3
%changelog