Sophie

Sophie

distrib > Fedora > 13 > i386 > media > updates-src > by-pkgid > a45b0e70c098926c4a9e84383852557e > files > 3

input-pad-1.0.1-2.fc13.src.rpm

%define have_python_devel 1
%define have_xtest_devel  1
%define have_eek_devel    1
%define have_old_eek      1

%if %have_python_devel
  %if ! (0%{?fedora} > 12 || 0%{?rhel} > 5)
  %{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
  %endif
%endif

%define sub_version             1.0
%define libxklavier_version     4.0
%define libxml2_version         2.0

%define libinput_paddir %{_libdir}/%{name}-%sub_version
%define moduledir       %{_libdir}/%{name}-%sub_version/modules
%define kbduidir        %{_libdir}/%{name}-%sub_version/modules/kbdui
%define xkeysenddir     %{_libdir}/%{name}-%sub_version/modules/xkeysend


Name:       input-pad
Version:    1.0.1
Release:    2%{?dist}
Summary:    On-screen Input Pad to Send Characters with Mouse
License:    LGPLv2+
Group:      System Environment/Libraries
URL:        http://code.google.com/p/input-pad/
Source0:    http://input-pad.googlecode.com/files/%{name}-%{version}.tar.gz
%if %have_old_eek
Patch1:     input-pad-xx-old-eek.patch
%endif

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

BuildRequires:  gettext-devel
BuildRequires:  gtk2-devel
BuildRequires:  libtool
BuildRequires:  libxkbfile-devel
BuildRequires:  libxklavier-devel       >= %libxklavier_version
BuildRequires:  libxml2-devel           >= %libxml2_version
BuildRequires:  intltool
BuildRequires:  pkgconfig
%if %have_xtest_devel
BuildRequires:  libXtst-devel
%endif
%if %have_python_devel
BuildRequires:  python2-devel
BuildRequires:  swig
%endif
%if %have_eek_devel
BuildRequires:  eekboard-devel
%endif

%description
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
Requires:   %{name} = %{version}-%{release}

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

%if %have_python_devel
%package python
Summary:    Input Pad for python
Group:      System Environment/Libraries
Requires:   %{name} = %{version}-%{release}

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

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

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

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

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

%prep
%setup -q
%if %have_old_eek
%patch1 -p1
%endif

%build
%if %have_old_eek
autoreconf -f -v -i
%endif
%configure \
%if ! %have_python_devel
    --disable-python            \
%endif
%if %have_eek_devel
    --enable-eek                \
%endif
%if %have_xtest_devel
    --enable-xtest              \
%endif
    --disable-static
make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p'

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

rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/*.a
%if %have_xtest_devel
rm -f $RPM_BUILD_ROOT%xkeysenddir/*.la
rm -f $RPM_BUILD_ROOT%xkeysenddir/*.a
%endif
%if %have_eek_devel
rm -f $RPM_BUILD_ROOT%kbduidir/*.la
rm -f $RPM_BUILD_ROOT%kbduidir/*.a
%endif
%if %have_python_devel
rm -f $RPM_BUILD_ROOT%python_sitearch/%{name}-%sub_version/*.la
rm -f $RPM_BUILD_ROOT%python_sitearch/%{name}-%sub_version/*.a
%endif

%find_lang %{name}

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files -f %{name}.lang
%defattr(-,root,root,-)
%doc AUTHORS COPYING README
%{_bindir}/input-pad
%dir %libinput_paddir
%dir %moduledir
%dir %xkeysenddir
%dir %kbduidir
%{_libdir}/libinput-pad.so.*
%{_datadir}/%name
%{_datadir}/pixmaps/input-pad.png

%files devel
%defattr(-,root,root,-)
%{_includedir}/%{name}-%sub_version
%{_libdir}/libinput-pad.so
%{_libdir}/pkgconfig/*.pc

%if %have_python_devel
%files python
%defattr(-,root,root,-)
%python_sitearch/%{name}-%sub_version
%python_sitearch/pyinput_pad.pth
%endif

%if %have_xtest_devel
%files xtest
%defattr(-,root,root,-)
%xkeysenddir/libinput-pad-xtest-gdk.so
%endif

%if %have_eek_devel
%files eek
%defattr(-,root,root,-)
%kbduidir/libinput-pad-eek-gtk.so
%endif

%changelog
* Thu May 19 2011 Takao Fujiwara <tfujiwar@redhat.com> - 1.0.1-2
- Bumped to 1.0.1
- Added input-pad-xx-old-eek.patch for eekboard.

* Tue Nov 30 2010 Takao Fujiwara <tfujiwar@redhat.com> - 1.0.0-1
- Bumped to 1.0.0

* Tue Sep 07 2010 Takao Fujiwara <tfujiwar@redhat.com> - 0.1.2-1
- Bumped to 0.1.2

* Tue Jun 29 2010 Takao Fujiwara <takao.fujiwara1@gmail.com> - 0.1.0.20100630-1
- Bumped to 0.1.0.20100630

* Tue Jun 22 2010 Takao Fujiwara <takao.fujiwara1@gmail.com> - 0.1.0.20100622-1
- Bumped to 0.1.0.20100622

* Mon Jun 14 2010 Takao Fujiwara <takao.fujiwara1@gmail.com> - 0.1.0.20100614-1
- Initial Implementation. Bug 599316