%define have_python_devel 1 %define have_xtest_devel 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 0.1 %define libxklavier_version 4.0 %define libxml2_version 2.0 Name: input-pad Version: 0.1.0.20100608 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://fujiwara.fedorapeople.org/ibus/input-pad/%{name}-%{version}.tar.gz 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 %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} Requires: libXtst %description xtest The input-pad-python package contains XTEST extension module %endif %prep %setup -q %build %configure --disable-static make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p' rm -f $RPM_BUILD_ROOT%{_libdir}/*.la rm -f $RPM_BUILD_ROOT%{_libdir}/*.a %if %have_xtest_devel rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}-%sub_version/modules/*.la rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}-%sub_version/modules/*.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 %{_libdir}/%{name}-%sub_version %dir %{_libdir}/%{name}-%sub_version/modules %{_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,-) %{_libdir}/%{name}-%sub_version/modules/libinput-pad-xtest-gdk.so %endif %changelog * Tue Jun 08 2010 Takao Fujiwara - 0.1.0.20100608-1 - Current version.