File caribou.spec of Package caribou

#
# spec file for package caribou
#
# Copyright (c) 2011 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/
#



Name:           caribou
Version:        0.4.1
Release:        1
# FIXME: Stop hiding the .desktop file with %%suse_update_desktop_file -u if launching caribou finally works
License:        LGPLv2.1+
Summary:        On-screen Keyboard for GNOME
Url:            http://live.gnome.org/Caribou
Group:          System/GUI/GNOME
Source0:        http://download.gnome.org/sources/caribou/0.4/%{name}-%{version}.tar.bz2
# For directory ownership
BuildRequires:  dbus-1
BuildRequires:  fdupes
BuildRequires:  gnome-doc-utils-devel
BuildRequires:  gobject-introspection-devel
BuildRequires:  intltool
BuildRequires:  python-xml
BuildRequires:  update-desktop-files
BuildRequires:  vala >= 0.13
BuildRequires:  pkgconfig(clutter-1.0)
BuildRequires:  pkgconfig(gee-1.0)
BuildRequires:  pkgconfig(gio-2.0)
BuildRequires:  pkgconfig(gtk+-2.0)
BuildRequires:  pkgconfig(gtk+-3.0)
BuildRequires:  pkgconfig(libxklavier)
BuildRequires:  pkgconfig(libxml-2.0)
BuildRequires:  pkgconfig(pygobject-3.0) >= 2.90.3
BuildRequires:  pkgconfig(x11)
BuildRequires:  pkgconfig(xtst)
Requires:       python-atspi
Requires:       python-xml
Recommends:     %{name}-lang
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%py_requires
%glib2_gsettings_schema_requires

%description
Caribou is a text entry and UI navigation application being developed
as an alternative to the Gnome On-screen Keyboard. The overarching goal
for Caribou is to create a usable solution for people whose primary way
of accessing a computer is a switch device.

%package gtk-module-common
License:        LGPLv2.1+
Summary:        On-screen Keyboard for GNOME -- Common Files for GTK+ Modules
Group:          System/GUI/GNOME
Recommends:     %{name}-gtk2-module
Recommends:     %{name}-gtk3-module

%description gtk-module-common
Caribou is a text entry and UI navigation application being developed
as an alternative to the Gnome On-screen Keyboard. The overarching goal
for Caribou is to create a usable solution for people whose primary way
of accessing a computer is a switch device.

This package contains files common to both the GTK+ 2 and GTK+ 3
modules.

%package gtk2-module
License:        LGPLv2.1+
Summary:        On-screen Keyboard for GNOME -- GTK+ 2 Module
Group:          System/GUI/GNOME
Requires:       %{name} = %{version}
Requires:       %{name}-gtk-module-common = %{version}
Supplements:    packageand(%{name}:gtk2)

%description gtk2-module
Caribou is a text entry and UI navigation application being developed
as an alternative to the Gnome On-screen Keyboard. The overarching goal
for Caribou is to create a usable solution for people whose primary way
of accessing a computer is a switch device.

%package gtk3-module
License:        LGPLv2.1+
Summary:        On-screen Keyboard for GNOME -- GTK+ 3 Module
Group:          System/GUI/GNOME
Requires:       %{name} = %{version}
Requires:       %{name}-gtk-module-common = %{version}
Supplements:    packageand(%{name}:gtk3)

%description gtk3-module
Caribou is a text entry and UI navigation application being developed
as an alternative to the Gnome On-screen Keyboard. The overarching goal
for Caribou is to create a usable solution for people whose primary way
of accessing a computer is a switch device.

%package -n libcaribou0
License:        LGPLv2.1+
Summary:        On-screen Keyboard for GNOME -- Library
Group:          System/GUI/GNOME

%description -n libcaribou0
Caribou is a text entry and UI navigation application being developed
as an alternative to the Gnome On-screen Keyboard. The overarching goal
for Caribou is to create a usable solution for people whose primary way
of accessing a computer is a switch device.

%package devel
License:        LGPLv2.1+
Summary:        On-screen Keyboard for GNOME -- Development Files
Group:          Development/Libraries/GNOME

%description devel
Caribou is a text entry and UI navigation application being developed
as an alternative to the Gnome On-screen Keyboard. The overarching goal
for Caribou is to create a usable solution for people whose primary way
of accessing a computer is a switch device.

%lang_package
%prep
%setup -q

%build
%configure \
    --disable-static     \
    --enable-gtk3-module \
    --enable-gtk2-module
make %{?_smp_mflags}

%install
%make_install
find %{buildroot}%{_libdir} -name '*.la' -type f -delete -print
%find_lang %{name} %{?no_lang_C}
# As the icon is not shipped, don't mention it in the .desktop file
sed -i -e s'/Icon=.*/Icon=/g' %{buildroot}%{_datadir}/applications/caribou.desktop
# FIXME: We have to unhide this when the application gets its icon (bnc#726954) and when caribou actually works
%suse_update_desktop_file -u %{name}
%suse_update_desktop_file %{name}-autostart
%fdupes %{buildroot}

%post
%glib2_gsettings_schema_post

%postun
%glib2_gsettings_schema_postun

%post -n libcaribou0 -p /sbin/ldconfig

%postun -n libcaribou0 -p /sbin/ldconfig

%clean
%{__rm} -rf %{buildroot}

%files
%defattr(-, root, root)
%doc COPYING README
%{_bindir}/caribou
%{_bindir}/caribou-preferences
%{python_sitelib}/caribou/
%{_datadir}/antler/
%{_datadir}/applications/caribou.desktop
%{_datadir}/caribou/
%{_datadir}/dbus-1/services/org.gnome.Caribou.Antler.service
%{_datadir}/glib-2.0/schemas/org.gnome.antler.gschema.xml
%{_datadir}/glib-2.0/schemas/org.gnome.caribou.gschema.xml
%{_libexecdir}/antler-keyboard
%{_sysconfdir}/xdg/autostart/caribou-autostart.desktop

%files gtk-module-common
%defattr(-, root, root)
%dir %{_libdir}/gnome-settings-daemon-3.0
%dir %{_libdir}/gnome-settings-daemon-3.0/gtk-modules
%{_libdir}/gnome-settings-daemon-3.0/gtk-modules/caribou-gtk-module.desktop

%files gtk2-module
%defattr(-, root, root)
%{_libdir}/gtk-2.0/modules/libcaribou-gtk-module.so

%files gtk3-module
%defattr(-, root, root)
%{_libdir}/gtk-3.0/modules/libcaribou-gtk-module.so

%files -n libcaribou0
%defattr(-, root, root)
%{_libdir}/libcaribou.so.*
%{_libdir}/girepository-1.0/Caribou-1.0.typelib

%files devel
%defattr(-, root, root)
%{_includedir}/libcaribou/
%{_libdir}/libcaribou.so
%{_datadir}/gir-1.0/*.gir

%files lang -f %{name}.lang

%changelog
openSUSE Build Service is sponsored by