Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37560512
en ru br
Репозитории ALT
S:2.24.33-alt1
5.1: 2.16.6-alt1
4.1: 2.12.12-alt0.M41.4
4.0: 2.10.14-alt1
3.0: 2.6.7-alt1
www.altlinux.org/Changes

Группа :: Система/Библиотеки
Пакет: libgtk+2

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

%define _name gtk+
%define ver_major 2.6
%define binary_ver 2.4.0
%def_disable static
%def_enable gtk_doc

Name: libgtk+2
Version: %ver_major.7
Release: alt1

Summary: The GIMP ToolKit (GTK+), a library for creating GUIs for X
Summary(ru_RU.KOI8-R): GTK+, библиотека для создания GUI под X Window System
License: LGPL
Group: System/Libraries
Url: http://www.gtk.org
Packager: Yuri N. Sedunov <aris at altlinux.ru>

Icon: gtk+-logo.xpm
Source: ftp://ftp.gnome.org/pub/gnome/sources/%_name/%ver_major/%_name-%version.tar.bz2
Patch: gtk+-2.6.5-Lai-gtkfilesel.patch.bz2
Patch1: gtk+-2.2.4-Lai-images_types-2004.04.04.patch.gz

%define glib_ver 2.6.3
%define pango_ver 1.8.1
%define atk_ver 1.9.0
%define xft_ver 2.0-alt5
%define fontconfig_ver 2.2.1-alt2
%define shared_mime_info_ver 0.16

# since 2.5.6

Obsoletes: gtk-engines-pixmap
Provides: gtk-engines-pixmap = %version-%release

# We need to prereq these so we can run gtk-query-immodules-2.0 in post

PreReq: glib2 >= %glib_ver
PreReq: libpango >= %pango_ver
PreReq: libatk >= %atk_ver
PreReq: XFree86-libs

Requires: common-licenses
Requires: shared-mime-info >= %shared_mime_info_ver

# some fonts with Xft2 support require

Requires: urw-fonts >= 2.0-alt19

Provides: gtk2 = %version, gtk+2 = %version, libgtk2 = %version
Obsoletes: gtk2, gtk+-gtkbeta, gtk+2, libgtk2

BuildPrereq: glib2-devel >= %glib_ver
BuildPrereq: libpango-devel >= %pango_ver
BuildPrereq: libatk-devel >= %atk_ver
#BuildPreReq: libXft-devel >= %xft_ver
BuildPreReq: libXft-devel
BuildPreReq: fontconfig-devel >= %fontconfig_ver

# Automatically added by buildreq on Tue Dec 07 2004

BuildRequires: XFree86-devel-static XFree86-libs docbook-dtds docbook-style-xsl docbook-utils fontconfig-devel freetype2-devel gcc-c++ gcc-g77 glib2-devel gtk-doc indent libatk-devel libgpg-error libjpeg-devel libpango-devel libpng-devel libstdc++-devel libtiff-devel pkgconfig python-base python-modules-compiler python-modules-encodings rpm-build-python xml-common  xsltproc zlib-devel

%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.

This version of GTK+ is required for Gnome 2.x.

%package devel
Summary: Development files and tools for GTK+ applications
Summary(ru_RU.KOI8-R): Набор для разработчика приложений, использующих GTK+
Group: Development/GNOME and GTK+
Icon: gtk+-devel-logo.xpm
Requires: %name = %version-%release, glib2-devel >= %glib_ver, pkgconfig
Requires: libatk-devel >= %atk_ver, libpango-devel >= %pango_ver
Provides: gtk2-devel = %version, gtk+2-devel = %version, libgtk2-devel = %version, libgtk+2-devel-static
Obsoletes: gtk2-devel, gtk+-gtkbeta-devel, gtk+2-devel, libgtk2-devel, libgtk+2-devel-static

%description devel
GTK+ is a multi-platform toolkit for creating graphical user interfaces.
This package contains the files needed for developing GTK+ applications.

%package devel-doc
Summary: Development documentation for GTK+
Summary(ru_RU.KOI8-R): Документация разработчика на GTK+
Group: Development/GNOME and GTK+
Conflicts: %name < %version-%release

%description devel-doc
GTK+ is a multi-platform toolkit for creating graphical user interfaces.
This package contains documentation needed for developing GTK+ applications.

%if_enabled static
%package devel-static
Summary: Static libraries for GTK+ (GIMP ToolKit) applications
Group: Development/GNOME and GTK+
Requires: %name = %version-%release
Provides: gtk2-devel-static = %version, gtk+2-devel-static = %version, libgtk2-devel-static = %version
Obsoletes: gtk2-devel, gtk+-gtkbeta-devel, gtk+2-devel, libgtk2-devel

%description devel-static
GTK+ is a multi-platform toolkit for creating graphical user interfaces.
This package contains the static libraries for GTK+.
%endif

%prep
%setup -q -n %_name-%version
%patch -p1
%patch1 -p1

%build
%{?_disable_static:export lt_cv_prog_cc_static_works=no}
%{?_enable_static:export lt_cv_prog_cc_static_works=yes}
%configure \
   %{subst_enable static} \
%if_enabled gtk_doc
   --enable-gtk-doc \
%endif
   --with-xinput=yes \
   --enable-fbmanager

# SMP-incompatible build

%make

%install
%makeinstall
%__install -d %buildroot{%_sysconfdir/gtk-2.0,%_libdir/gtk-2.0/%binary_ver/engines}

# system wide gtkrc

%__cat <<__RC__ > %buildroot%_sysconfdir/gtk-2.0/gtkrc
# This enables editing of menu accelerators by pressing
# an accelerator over the menu item.
gtk-can-change-accels = 1
__RC__

# The license

%__ln_s -f %_licensedir/LGPL-2 COPYING

# remove non-packaged files

%__rm -f %buildroot%_libdir/gtk-2.0/*/*/*.la

%find_lang --output=gtk20.lang gtk20 gtk20-properties

# --------------------------------------------------------------------------------------

# needed for Lai's GTK+ File Selector patch
%__cat <<__SH__ >%_name.sh
# Some features of enhanced file selector have performance penalties.
# Here are some environment variables to disable them.

# Disable looking up icons for files.

export GTK_FILESEL_NO_ICONS=1
# Disable file type detection. This will also disable icons.
export GTK_FILESEL_NO_MIME=1
# Disable all columns (Date, Size, etc.) except File.
# This will disable icon lookup and file type detection too.
export GTK_FILESEL_SIMPLE=0
__SH__

%__cat <<__CSH__ >%_name.csh
# Some features of enhanced file selector have performance penalties.
# Here are some environment variables to disable them.

# Disable looking up icons for files.

setenv GTK_FILESEL_NO_ICONS 1
# Disable file type detection. This will also disable icons.
setenv GTK_FILESEL_NO_MIME 1
# Disable all columns (Date, Size, etc.) except File.
# This will disable icon lookup and file type detection too.
setenv GTK_FILESEL_SIMPLE 0
__CSH__

%__install -pD -m755 %_name.sh %buildroot%_sysconfdir/profile.d/%_name.sh
%__install -pD -m755 %_name.csh %buildroot%_sysconfdir/profile.d/%_name.csh
#----------------------------------------------------------------------------------------

# Update icon cache daily.

%__mkdir_p %buildroot%_sysconfdir/cron.daily
%__cat <<__CRON__ >gtk+2.cron
#!/bin/sh
# Update icon cache (disabled by default)

#%_bindir/gtk-update-icon-cache --force --quiet %_iconsdir

#%_bindir/gtk-update-icon-cache --force --quiet %_datadir/pixmaps
__CRON__

%__install -m755 gtk+2.cron %buildroot%_sysconfdir/cron.daily/gtk+2

%__bzip2 -9fk ChangeLog NEWS

%post
%post_ldconfig
%_bindir/gtk-query-immodules-2.0 > %_sysconfdir/gtk-2.0/gtk.immodules
%_bindir/gdk-pixbuf-query-loaders > %_sysconfdir/gtk-2.0/gdk-pixbuf.loaders
#%_bindir/gtk-update-icon-cache --force --quiet %_iconsdir
#%_bindir/gtk-update-icon-cache --force --quiet %_datadir/pixmaps

%postun -p %postun_ldconfig

%triggerpostun -- %name <= 2.0.6-alt0.7
[ $2 != 0 ] || exit 0
%_bindir/gtk-query-immodules-2.0 > %_sysconfdir/gtk-2.0/gtk.immodules

%files -f gtk20.lang
%_bindir/gtk-query-immodules-2.0
%_bindir/gtk-update-icon-cache
%_bindir/gdk-pixbuf-query-loaders
%_libdir/libgtk*.so.*
%_libdir/libgdk*.so.*
%dir %_libdir/gtk-2.0
%dir %_libdir/gtk-2.0/%binary_ver
%dir %_libdir/gtk-2.0/%binary_ver/*
%_libdir/gtk-2.0/%binary_ver/*/*.so
%_datadir/themes
%dir %_sysconfdir/gtk-2.0
#---------------------------------
# needed for Lai's GTK+ File Selector patch
%config %_sysconfdir/profile.d/*
#---------------------------------
%config(noreplace) %_sysconfdir/gtk-2.0/gtkrc
%config(missingok, noreplace) %attr(0755,root,root)%_sysconfdir/cron.daily/*
%ghost %_sysconfdir/gtk-2.0/gtk.immodules
%ghost %_sysconfdir/gtk-2.0/gdk-pixbuf.loaders
#%ghost %_iconsdir/icon-theme.cache
%_man1dir/gdk-pixbuf-query-loaders.*
%_man1dir/gtk-query-immodules*
%_man1dir/gtk-update-icon-cache.*
%doc --no-dereference COPYING
%doc AUTHORS ChangeLog.* NEWS.* README

%files devel
%_bindir/gdk-pixbuf-csource
%_bindir/gtk-demo
%_libdir/*.so
%_libdir/gtk-2.0/include
%_libdir/pkgconfig/*
%_includedir/*
%_datadir/gtk-2.0
%_datadir/aclocal/*
%_man1dir/gdk-pixbuf-csource*

%if_enabled gtk_doc
%files devel-doc
%_datadir/gtk-doc/html/*
%endif

%if_enabled static
%files devel-static
%_libdir/*.a
%_libdir/gtk-2.0/*/*/*.a
%endif

%changelog

Полный changelog можно просмотреть здесь

 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin