File input-pad.spec of Package input-pad

# spec file for package input-pad
# Copyright (c) 2012 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

%define libinput_paddir %{_libdir}/%{name}-1.0
%define moduledir       %{_libdir}/%{name}-1.0/modules
%define kbduidir        %{_libdir}/%{name}-1.0/modules/kbdui
%define xkeysenddir     %{_libdir}/%{name}-1.0/modules/xkeysend
%define build_xtest    (0%{suse_version} > 1210)

Name:            input-pad
Version:         1.0.3
Release:         1
Summary:         On-screen Input Pad to Send Characters with Mouse
License:         LGPL-2.0+
Group:           System/GUI/Other

BuildRoot:       %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:   gettext-devel
BuildRequires:   gtk2-devel
BuildRequires:   gtk3-devel
BuildRequires:   libtool
%if 0%{suse_version} > 1210
BuildRequires:   libxkbfile-devel
BuildRequires:   libxklavier-devel >= 4.0
BuildRequires:   libxml2-devel >= 2.0
BuildRequires:   intltool
BuildRequires:   pkgconfig
%if %{build_xtest}
BuildRequires:   libXtst-devel
BuildRequires:   gobject-introspection-devel
BuildRequires:   python-devel 
BuildRequires:   swig
BuildRequires:   eekboard-devel
Requires:        gobject-introspection
Requires:        python3-gobject

The input pad is a tool to send a character on button to text applications.

%package devel
Summary:    Development tools for input-pad
Group:      Development/Libraries/C and C++"
Requires:   %{name} = %{version}-%{release}

%description devel
The input-pad-devel package contains the header files.

%package -n python-input-pad
Summary:    Input Pad for Python GObject2
Group:      System/Libraries
Requires:   %{name} = %{version}-%{release}
Requires:   python-gtk

%description -n python-input-pad
The input-pad-pygobject2 package contains the python wrapper files.

%if %{build_xtest}
%package xtest
Summary:    Input Pad with XTEST extension
Group:      System/Libraries
Requires:   %{name} = %{version}-%{release}

%description xtest
The input-pad-xtest package contains XTEST extension module

%package eek
Summary:    Input Pad with eekboard extension
Group:      System/Libraries
Requires:   %{name} = %{version}-%{release}

%description eek
The input-pad-eek package contains eekboard extension module

%setup -q

%configure    --enable-pygobject2         \
              --enable-eek                \
%if %{build_xtest}
             --enable-xtest              \

make %{?_smp_mflags}

make install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p'

if [ ! -d $RPM_BUILD_ROOT%kbduidir ] ; then
    mkdir -p $RPM_BUILD_ROOT%kbduidir
if [ ! -d $RPM_BUILD_ROOT%xkeysenddir ] ; then
    mkdir -p $RPM_BUILD_ROOT%xkeysenddir

rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/*.a
%if %{build_xtest}
rm -f $RPM_BUILD_ROOT%{xkeysenddir}/*.la
rm -f $RPM_BUILD_ROOT%{xkeysenddir}/*.a
rm -f $RPM_BUILD_ROOT%{kbduidir}/*.la
rm -f $RPM_BUILD_ROOT%{kbduidir}/*.a
rm -f $RPM_BUILD_ROOT%{python_sitelib}/%{name}-1.0/*.la
rm -f $RPM_BUILD_ROOT%{python_sitelib}/%{name}-1.0/*.a

%find_lang %{name}

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files -f %{name}.lang
%dir %libinput_paddir
%dir %moduledir
%dir %xkeysenddir
%dir %kbduidir

%files devel

%files -n python-input-pad

%if %{build_xtest}
%files xtest

%files eek

openSUSE Build Service is sponsored by