%global srcname lirc %global sum Linux Infrared Remote Control python module %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)") Summary: %{sum} Name: python-%{srcname} Version: 0.0.5 Release: 20%{?dist} License: GPLv2+ Group: Development/Languages URL: http://pylirc.mccabe.nu/ Source0: http://downloads.sf.net/pylirc/pylirc-%{version}.tar.gz Source1: python-lirc-README Source2: python-lirc-API Source3: python-lirc-sample-simple.py Source4: python-lirc-sample-multithread.py BuildRequires: python2-devel, python3-devel, lirc-devel Provides: pylirc = %{version}-%{release} %description pyLirc is a module for Python that interacts with lirc to give Python programs the ability to receive commands from remote controls. %package -n python2-%{srcname} Summary: %{sum} %{?python_provide:%python_provide python2-%{srcname}} %description -n python2-%{srcname} pyLirc is a module for Python that interacts with lirc to give Python programs the ability to receive commands from remote controls. %package -n python3-%{srcname} Summary: %{sum} %{?python_provide:%python_provide python3-%{srcname}} %description -n python3-%{srcname} pyLirc is a module for Python that interacts with lirc to give Python programs the ability to receive commands from remote controls. %prep %setup -q -n pylirc-%{version} %build #CFLAGS="%{optflags}" %{__python} setup.py build %py2_build %py3_build %install #%{__rm} -rf %{buildroot} %{__python} setup.py install -O1 --skip-build --root %{buildroot} # Install our docs for later inclusion with %%doc %{__install} -p -m 0644 %{SOURCE1} README %{__install} -p -m 0644 %{SOURCE2} API %{__install} -p -m 0644 %{SOURCE3} sample-simple.py %{__install} -p -m 0644 %{SOURCE4} sample-multithread.py %files -n python2-%{srcname} %defattr(-,root,root,-) %doc API PKG-INFO README sample-simple.py sample-multithread.py %{python_sitearch}/pylircmodule.so %{python_sitearch}/pylirc-*.egg-info %files -n python3-%{srcname} %defattr(-,root,root,-) %doc API PKG-INFO README sample-simple.py sample-multithread.py %{python3_sitearch}/pylircmodule.so %{python3_sitearch}/pylirc-*.egg-info %changelog * Fri Nov 27 2015 Ján ONDREJ (SAL) - 0.0.5-20 - python3 support added - removed buildroot * Thu Jun 18 2015 Fedora Release Engineering - 0.0.5-19 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Sun Aug 17 2014 Fedora Release Engineering - 0.0.5-18 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild * Sat Jun 07 2014 Fedora Release Engineering - 0.0.5-17 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Sun Aug 04 2013 Fedora Release Engineering - 0.0.5-16 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Thu Feb 14 2013 Fedora Release Engineering - 0.0.5-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Sat Jul 21 2012 Fedora Release Engineering - 0.0.5-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Sat Jan 14 2012 Fedora Release Engineering - 0.0.5-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Tue Feb 08 2011 Fedora Release Engineering - 0.0.5-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Thu Jul 22 2010 David Malcolm - 0.0.5-11 - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild * Thu Jul 8 2010 Matthias Saou 0.0.5-10 - Add dist tag for the EL-6 build. * Sun Jul 26 2009 Fedora Release Engineering - 0.0.5-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Thu Feb 26 2009 Fedora Release Engineering - 0.0.5-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Sat Nov 29 2008 Ignacio Vazquez-Abrams - 0.0.5-8 - Rebuild for Python 2.6 * Sun Feb 24 2008 Matthias Saou 0.0.5-7 - Missing egg file, now included. * Tue Feb 19 2008 Fedora Release Engineering - Autorebuild for GCC 4.3 * Wed Aug 22 2007 Matthias Saou 0.0.5-5 - Rebuild for new BuildID feature. * Fri Aug 3 2007 Matthias Saou 0.0.5-4 - Update License field. - Remove dist tag, since the package will seldom change. * Thu Mar 1 2007 Matthias Saou 0.0.5-3 - Prefix all our own documentation source files. - Include a README about our license changes and added docs. * Thu Feb 8 2007 Matthias Saou 0.0.5-2 - Change License from GPL to LGPL as our package links with lirc which is GPL. - Add pylirc (original name) virtual provides. - Include the API doc and both examples from the website. * Thu Feb 8 2007 Matthias Saou 0.0.5-1 - Initial RPM release.