%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(0)")} %if ! (0%{?fedora} > 12 || 0%{?rhel} > 5) %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} %endif Name: screenkey Version: 0.2 Release: 3%{?dist} Summary: A screen-cast tool to show your keys and based on key-mon project Group: Applications/System License: GPL+ URL: https://launchpad.net/screenkey Source0: http://launchpad.net/screenkey/v%{version}/v%{version}/+download/screenkey-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python-devel Requires: python, python-xlib %description A screen-cast tool to show your keys inspired by Screenflick and based on the key-mon project. %prep %setup -q %build CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build %install rm -rf $RPM_BUILD_ROOT mkdir -p %{buildroot}%{_defaultdocdir}/%{name}-%{version} find build/lib* -name '*.py' -exec sed -i "1{/^#!/d}" {} \; && \ %{__python} setup.py install -O1 --skip-build --root %{buildroot} %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc %{_bindir}/screenkey %{_prefix}/share/applications/screenkey.desktop %{python_sitearch}/Screenkey %if 0%{?fedora} >= 9 %{python_sitearch}/*egg-info %endif %changelog * Mon Jun 14 2010 Ivan Makfinsky - 0.2-3 - Rebase, this is dev code. * Fri Jun 11 2010 Ivan Makfinsky - 0.1.1-7 - Updated spec file with proper macros. * Thu Jun 10 2010 Ivan Makfinsky - 0.1.1-6 - Added fork method so that it properly backgrounds itself. * Wed Jun 09 2010 Ivan Makfinsky - 0.1.1-5 - Corrected build deps. Added python-devel. Corrected python-sitearch in files. * Tue Jun 08 2010 Ivan Makfinsky - 0.1.1-1 - Initial Build