%global srcname gammu %global gammu_ver 1.39.0 %define name_source python-gammu %define epel_version 2.11-2 %define python2_package python2 %if 0%{?rhel}%{?fedora} %if 0%{?rhel} %if 0%{?rhel} <= 7 %define python2_package python %endif %else %if 0%{?fedora} <= 25 %define python2_package python %endif %endif %endif %define python3_package python%{python3_pkgversion} Name: gammu-python Version: 2.11 Release: 3%{?dist} Summary: Python bindings for Gammu Group: Development/Languages License: GPLv2+ URL: http://wammu.eu/python-gammu/ Source0: https://github.com/gammu/%{name_source}/archive/%{version}/%{name_source}-%{version}.tar.gz BuildRequires: %{python2_package}-devel %{python3_package}-devel BuildRequires: %{python2_package}-setuptools %{python3_package}-setuptools BuildRequires: %{srcname}-devel >= %{gammu_ver} #for tests: Solve DBI failed to initialize! BuildRequires: libdbi-dbd-sqlite #Obsoletes: %{name} <= 1.35.0 #Obsoletes: %{name_source} <= 2.6-7 Obsoletes: %{name_source} <= %{epel_version} # Transaction check error: # file /usr/lib/debug/.build-id/ce/44b5a1cd54dcf3897c4c7ea8722b063dd98c21.debug from install of gammu-python-debuginfo-2.6-8.el7.centos.x86_64 conflicts with file from package python-gammu-debuginfo-2.6-5.el7.centos.x86_64 # file /usr/lib/debug/usr/lib64/python2.7/site-packages/gammu/_gammu.so.debug from install of gammu-python-debuginfo-2.6-8.el7.centos.x86_64 conflicts with file from package python-gammu-debuginfo-2.6-5.el7.centos.x86_64 # file /usr/lib/debug/usr/lib64/python3.4/site-packages/gammu/_gammu.cpython-34m.so.debug from install of gammu-python-debuginfo-2.6-8.el7.centos.x86_64 conflicts with file from package python-gammu-debuginfo-2.6-5.el7.centos.x86_64 #Obsoletes: %{name_source}-debuginfo <= 2.6-7 Obsoletes: %{name_source}-debuginfo <= %{epel_version} Requires: %{name}-debuginfo = %{?epoch:%{epoch}:}%{version}-%{release} #Requires: %{srcname} >= 1.35 Requires: %{srcname}-libs%{?_isa} >= %{gammu_ver} Requires: %{python2_package}-%{srcname} = %{?epoch:%{epoch}:}%{version}-%{release} Requires: %{python3_package}-%{srcname} = %{?epoch:%{epoch}:}%{version}-%{release} %description Python bindings for Gammu library. It currently does not support all Gammu features, but range of covered functions is increasing, if you need some specific, feel free to use bug tracking system for feature requests. %package -n %{python2_package}-%{srcname} Summary: Python2 bindings for Gammu #Requires: %{srcname} >= 1.35 Requires: %{srcname}-libs%{?_isa} >= %{gammu_ver} Requires: %{python2_package} %{?python_provide:%python_provide %{python2_package}-%{srcname}} %if "%{python2_package}" != "python2" #%{?python_provide:%python_provide python2-%{srcname}} Provides: python2-%{srcname} = %{?epoch:%{epoch}:}%{version}-%{release} Obsoletes: python2-%{srcname} < %{?epoch:%{epoch}:}%{version}-%{release} %endif %if "%{python2_package}" != "python" #%{?python_provide:%python_provide python-%{srcname}} Provides: python-%{srcname} = %{?epoch:%{epoch}:}%{version}-%{release} Obsoletes: python-%{srcname} < %{?epoch:%{epoch}:}%{version}-%{release} %endif %description -n %{python2_package}-%{srcname} Python2 bindings for Gammu library. It currently does not support all Gammu features, but range of covered functions is increasing, if you need some specific, feel free to use bug tracking system for feature requests. %package -n %{python3_package}-%{srcname} Summary: Python3 bindings for Gammu #Requires: %{srcname} >= 1.35 Requires: %{srcname}-libs%{?_isa} >= %{gammu_ver} Requires: %{python3_package} %{?python_provide:%python_provide %{python3_package}-%{srcname}} %if "%{python3_package}" != "python3" #%{?python_provide:%python_provide python3-%{srcname}} Provides: python3-%{srcname} = %{?epoch:%{epoch}:}%{version}-%{release} Obsoletes: python3-%{srcname} < %{?epoch:%{epoch}:}%{version}-%{release} %endif %description -n %{python3_package}-%{srcname} Python3 bindings for Gammu library. It currently does not support all Gammu features, but range of covered functions is increasing, if you need some specific, feel free to use bug tracking system for feature requests. %prep %setup -q -n %{name_source}-%{version} %build %py2_build %py3_build %install %py2_install %py3_install %check %{__python2} setup.py test || : %{__python3} setup.py test || : %files %doc AUTHORS NEWS.rst README.rst %license COPYING %files -n %{python2_package}-%{srcname} %doc AUTHORS NEWS.rst README.rst %license COPYING %{python2_sitearch}/gammu %{python2_sitearch}/python_gammu-*.egg-info %files -n %{python3_package}-%{srcname} %doc AUTHORS NEWS.rst README.rst examples/* %license COPYING %{python3_sitearch}/gammu %{python3_sitearch}/python_gammu-*.egg-info %changelog * Sat Feb 03 2018 Tomasz Tomasik - 2.11-3 - Backport changes from python-gammu-2.6-5.el7.centos.src.rpm (Mon May 01 2017 Tomasz Tomasik - 2.6-5) - Backport changes from gammu-python-2.6-8.el7.centos.src.rpm (Thu Oct 26 2017 Tomasz Tomasik - 2.6-8) - Add a few changes to the SPEC file - Update requirements - Change main package name from python-gammu to gammu-python - Rebuilt for EL7 * Tue Jan 09 2018 Sérgio Basto - 2.11-2 - Enforce the exact EVR for gammu-libs * Sat Jan 06 2018 Fedora Release Monitoring - 2.11-1 - Update to 2.11 (#1531828) * Sun Dec 24 2017 Sérgio Basto - 2.10-1 - Update to python-gammu-2.10 (#1510442) . Add python 3 compatibility for epel7 * Sun Aug 20 2017 Sérgio Basto - 2.9-2 - Bump for another build * Sun Aug 20 2017 Sérgio Basto - 2.9-1 - Update to 2.9 (#1460053) * Sun Aug 20 2017 Sérgio Basto - 2.6-7 - Use python3 compatibility to EPEL https://fedoraproject.org/wiki/PackagingDrafts:Python3EPEL * Thu Aug 03 2017 Fedora Release Engineering - 2.6-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild * Thu Jul 27 2017 Fedora Release Engineering - 2.6-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Sat Feb 11 2017 Fedora Release Engineering - 2.6-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Mon Dec 19 2016 Miro Hrončok - 2.6-3 - Rebuild for Python 3.6 * Tue Jul 19 2016 Fedora Release Engineering - 2.6-2 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages * Sun May 29 2016 Sérgio Basto - 2.6-1 - Update python-gammu to 2.6 * Thu Feb 04 2016 Fedora Release Engineering - 2.5-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Wed Jan 20 2016 Sérgio Basto - 2.5-1 - Update python-gammu to 2.5 * Tue Nov 17 2015 Sérgio Basto - 2.4-2 - Fixed 3 typos: - %%{?python_provide:%%python_provide python2-%{srcname}} is duplicated on line 22. It should only be present on line 33. - python2-gammu contains %{python3_sitearch}/gammu. This does not look right. - python2_sitearch should be used instead of python_sitearch. * Sun Nov 08 2015 Sérgio Basto - 2.4-1 - Update python-gammu to 2.4 - Added python3 support * Tue Jun 16 2015 Sérgio Basto - 2.3-1 - python-gammu is independent since gammu-1.36, again ... * Thu Jan 8 2009 Caolán McNamara - 0.28-1 - devel n-v-r < F-10, syncing to rebuild against libGammu * Sat Nov 29 2008 Ignacio Vazquez-Abrams - 0.27-3 - Fix locations for Python 2.6 * Sat Nov 29 2008 Ignacio Vazquez-Abrams - 0.27-2 - Rebuild for Python 2.6 * Sat Oct 11 2008 Xavier Lamien - 0.27-1 - Update release. * Sun Sep 14 2008 Xavier Lamien - 0.26-3 - Rebuild. * Wed Sep 3 2008 Tom "spot" Callaway - 0.26-2 - fix license tag * Mon Aug 25 2008 Xavier Lamien - 0.26-1 - Update release. * Sat Apr 05 2008 Xavier Lamien - 0.24-3 - Added missing file on Rawhide. * Tue Feb 19 2008 Fedora Release Engineering - 0.24-2 - Autorebuild for GCC 4.3 * Fri Dec 28 2007 Xavier Lamien < lxtnow[at]gmail.com > - 0.24-1 - Updated Release. * Wed Oct 17 2007 Xavier Lamien < lxtnow[at]gmail.com > - 0.22-3 - Added pcc arch build. * Sun Oct 14 2007 Xavier Lamien < lxtnow[at]gmail.com > - 0.22-2 - Excluded pcc arch for now, build error reported to upstream. * Fri Oct 12 2007 Xavier Lamien < lxtnow[at]gmail.com > - 0.22-1 - Updated Release. * Tue Jul 03 2007 Xavier Lamien < lxtnow[at]gmail.com > - 0.21-1 - Updated Release. * Wed May 23 2007 Xavier Lamien < lxtnow[at]gmail.com > - 0.20-1 - Updated release. - fixed permission on examples files. - added gammu as require (need it to work with wammu package). * Tue May 08 2007 Xavier Lamien < lxtnow[at]gmail.com > - 0.19-1 - Initial RPM Release.