Commit e3235d8a authored by Alexander Larsson's avatar Alexander Larsson
Browse files

Add gtk2

parent 07f0bad6
......@@ -39,6 +39,7 @@ PACKAGES = \
itstool yelp-xsl yelp-tools \
hicolor-icon-theme libcroco vala librsvg2 adwaita-icon-theme \
gnome-sdk gnome-platform dejavu-fonts \
gtk2 \
gtk-theme-name = "Adwaita"
gtk-icon-theme-name = "gnome"
gtk-cursor-theme-name = "Adwaita"
gtk-button-images = 0
gtk-menu-images = 0
......@@ -8,6 +8,7 @@ BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildArch: noarch
BuildRequires: gnome-sdk-base
BuildRequires: gtk2
BuildRequires: gtk3 gtk3-immodules
BuildRequires: hicolor-icon-theme
BuildRequires: adwaita-icon-theme
......@@ -17,6 +18,7 @@ BuildRequires: librsvg2
BuildRequires: dbus-glib
BuildRequires: gobject-introspection
Requires: gtk2-devel
Requires: gtk3-devel
Requires: librsvg2-devel
Requires: hicolor-icon-theme
%global bin_version 2.10.0
Summary: The GIMP ToolKit (GTK+), a library for creating GUIs for X
Name: gtk2
Version: 2.24.25
Release: 1%{?dist}
License: LGPLv2+
Group: System Environment/Libraries
#VCS: git:git://
Source3: im-cedilla.conf
BuildRequires: gnome-sdk-base
BuildRequires: atk-devel
BuildRequires: glib2-devel
BuildRequires: cairo-devel
BuildRequires: gdk-pixbuf2-devel
BuildRequires: pango-devel
BuildRequires: libXi-devel
#BuildRequires: cups-devel
BuildRequires: libXrandr-devel
BuildRequires: libXrender-devel
BuildRequires: libXcursor-devel
BuildRequires: libXfixes-devel
BuildRequires: libXinerama-devel
BuildRequires: libXcomposite-devel
BuildRequires: libXdamage-devel
BuildRequires: gobject-introspection-devel
# required for icon theme apis to work
Requires: hicolor-icon-theme
# We need to prereq these so we can run gtk-query-immodules-2.0
Requires(post): glib2 >= %{glib2_version}
Requires(post): atk >= %{atk_version}
Requires(post): pango >= %{pango_version}
# and these for gdk-pixbuf-query-loaders
Requires: libXrandr >= %{xrandr_version}
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 tools to complete application
%package immodules
Summary: Input methods for GTK+
Group: System Environment/Libraries
Requires: gtk2 = %{version}-%{release}
# for /etc/X11/xinit/xinput.d
Requires: imsettings
%description immodules
The gtk2-immodules package contains standalone input methods that are shipped
as part of GTK+.
%package immodule-xim
Summary: XIM support for GTK+
Group: System Environment/Libraries
Requires: gtk2 = %{version}-%{release}
%description immodule-xim
The gtk2-immodule-xim package contains XIM support for GTK+.
%package devel
Summary: Development files for GTK+
Group: Development/Libraries
Requires: gtk2 = %{version}-%{release}
Requires: pango-devel
Requires: atk-devel
Requires: glib2-devel
Requires: gdk-pixbuf2-devel
Requires: cairo-devel
Requires: libX11-devel, libXcursor-devel, libXinerama-devel
Requires: libXext-devel, libXi-devel, libXrandr-devel
Requires: libXfixes-devel, libXcomposite-devel
Requires: pkgconfig
%description devel
This package contains the libraries and header files that are needed
for writing applications with the GTK+ widget toolkit. If you plan
to develop applications with GTK+, consider installing the gtk2-devel-docs
%package devel-docs
Summary: Developer documentation for GTK+
Group: Development/Libraries
Requires: gtk2 = %{version}-%{release}
#BuildArch: noarch
%description devel-docs
This package contains developer documentation for the GTK+ widget toolkit.
%setup -q -n gtk+-%{version}
(if ! test -x configure; then NOCONFIGURE=1 ./; CONFIGFLAGS=--enable-gtk-doc; fi;
%configure $CONFIGFLAGS \
--enable-man \
--with-xinput=xfree \
--enable-debug \
# fight unused direct deps
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
make %{?_smp_mflags}
# truncate NEWS
awk '/^Overview of Changes/ { seen+=1 }
{ if (seen < 2) print }
{ if (seen == 2) { print "For older news, see"; exit } }' NEWS > tmp; mv tmp NEWS
make install DESTDIR=$RPM_BUILD_ROOT \
%find_lang gtk20
%find_lang gtk20-properties
# Input method frameworks want this
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/X11/xinit/xinput.d
cp %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/X11/xinit/xinput.d
# Remove unpackaged files
rm $RPM_BUILD_ROOT%{_libdir}/*.la
rm $RPM_BUILD_ROOT%{_libdir}/gtk-2.0/*/*.la
rm $RPM_BUILD_ROOT%{_libdir}/gtk-2.0/%{bin_version}/*/*.la
touch $RPM_BUILD_ROOT%{_libdir}/gtk-2.0/%{bin_version}/immodules.cache
mkdir -p $RPM_BUILD_ROOT%{_libdir}/gtk-2.0/modules
mkdir -p $RPM_BUILD_ROOT%{_libdir}/gtk-2.0/immodules
mkdir -p $RPM_BUILD_ROOT%{_libdir}/gtk-2.0/%{bin_version}/filesystems
# We use the gtk3 version of this:
rm $RPM_BUILD_ROOT%{_bindir}/gtk-update-icon-cache
gtk-query-immodules-2.0 --update-cache
%post immodules
gtk-query-immodules-2.0 --update-cache
%post immodule-xim
gtk-query-immodules-2.0 --update-cache
if [ $1 -gt 0 ]; then
gtk-query-immodules-2.0 --update-cache
%postun immodules
gtk-query-immodules-2.0 --update-cache
%postun immodule-xim
gtk-query-immodules-2.0 --update-cache
%files -f gtk20.lang
%dir %{_libdir}/gtk-2.0
%dir %{_libdir}/gtk-2.0/%{bin_version}
%dir %{_libdir}/gtk-2.0/%{bin_version}/immodules
%dir %{_datadir}/gtk-2.0
%ghost %{_libdir}/gtk-2.0/%{bin_version}/immodules.cache
%files immodules
%dir %{_sysconfdir}/gtk-2.0
%config(noreplace) %{_sysconfdir}/gtk-2.0/im-multipress.conf
%files immodule-xim
%files devel -f gtk20-properties.lang
%files devel-docs
* Fri Nov 21 2014 Alexander Larsson <> - 2.24.25-1
- Initial version, based on F21
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment