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 \
$(NULL)
ALL_SPECS =$(PACKAGES:%=$(SPECS)/%.spec)
......
gtk-theme-name = "Adwaita"
gtk-icon-theme-name = "gnome"
gtk-cursor-theme-name = "Adwaita"
gtk-button-images = 0
gtk-menu-images = 0
XIM=none
XIM_PROGRAM=/bin/true
XIM_ARGS=
SHORT_DESC=im-cedilla
GTK_IM_MODULE=cedilla
QT_IM_MODULE=xim
......@@ -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
URL: http://www.gtk.org
#VCS: git:git://git.gnome.org/gtk+#gtk-2-24
Source: http://download.gnome.org/sources/gtk+/2.24/gtk+-%{version}.tar.xz
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}
%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 tools to complete application
suites.
%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.
%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.
%prep
%setup -q -n gtk+-%{version}
%build
(if ! test -x configure; then NOCONFIGURE=1 ./autogen.sh; 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 http://git.gnome.org/cgit/gtk+/plain/NEWS"; exit } }' NEWS > tmp; mv tmp NEWS
%install
make install DESTDIR=$RPM_BUILD_ROOT \
RUN_QUERY_IMMODULES_TEST=false
%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
%post
/sbin/ldconfig
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
%postun
/sbin/ldconfig
if [ $1 -gt 0 ]; then
gtk-query-immodules-2.0 --update-cache
fi
%postun immodules
gtk-query-immodules-2.0 --update-cache
%postun immodule-xim
gtk-query-immodules-2.0 --update-cache
%files -f gtk20.lang
%doc AUTHORS COPYING NEWS README
%{_bindir}/gtk-query-immodules-2.0
%{_libdir}/libgtk-x11-2.0.so.*
%{_libdir}/libgdk-x11-2.0.so.*
%{_libdir}/libgailutil.so.*
%dir %{_libdir}/gtk-2.0
%dir %{_libdir}/gtk-2.0/%{bin_version}
%{_libdir}/gtk-2.0/%{bin_version}/engines
%{_libdir}/gtk-2.0/%{bin_version}/filesystems
%dir %{_libdir}/gtk-2.0/%{bin_version}/immodules
%{_libdir}/gtk-2.0/%{bin_version}/printbackends
%{_libdir}/gtk-2.0/modules
%{_libdir}/gtk-2.0/immodules
%dir %{_datadir}/gtk-2.0
%{_datadir}/themes/Default
%{_datadir}/themes/Emacs
%{_datadir}/themes/Raleigh
%ghost %{_libdir}/gtk-2.0/%{bin_version}/immodules.cache
%{_libdir}/girepository-1.0
%files immodules
%{_libdir}/gtk-2.0/%{bin_version}/immodules/im-am-et.so
%{_libdir}/gtk-2.0/%{bin_version}/immodules/im-cedilla.so
%{_libdir}/gtk-2.0/%{bin_version}/immodules/im-cyrillic-translit.so
%{_libdir}/gtk-2.0/%{bin_version}/immodules/im-inuktitut.so
%{_libdir}/gtk-2.0/%{bin_version}/immodules/im-ipa.so
%{_libdir}/gtk-2.0/%{bin_version}/immodules/im-multipress.so
%{_libdir}/gtk-2.0/%{bin_version}/immodules/im-thai.so
%{_libdir}/gtk-2.0/%{bin_version}/immodules/im-ti-er.so
%{_libdir}/gtk-2.0/%{bin_version}/immodules/im-ti-et.so
%{_libdir}/gtk-2.0/%{bin_version}/immodules/im-viqr.so
%{_sysconfdir}/X11/xinit/xinput.d/im-cedilla.conf
%dir %{_sysconfdir}/gtk-2.0
%config(noreplace) %{_sysconfdir}/gtk-2.0/im-multipress.conf
%files immodule-xim
%{_libdir}/gtk-2.0/%{bin_version}/immodules/im-xim.so
%files devel -f gtk20-properties.lang
%{_libdir}/lib*.so
%{_libdir}/gtk-2.0/include
%{_includedir}/*
%{_datadir}/aclocal/*
%{_bindir}/gtk-builder-convert
%{_libdir}/pkgconfig/*
%{_bindir}/gtk-demo
%{_datadir}/gtk-2.0/demo
%{_datadir}/gir-1.0
%files devel-docs
%{_datadir}/gtk-doc
%changelog
* Fri Nov 21 2014 Alexander Larsson <alexl@redhat.com> - 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