%if 0%{?fedora} %global with_python 1 %endif Name: libcec Version: 4.0.2 Release: 2%{?dist} Summary: Library and utilities for HDMI-CEC device control Group: System Environment/Libraries License: GPLv2+ URL: http://libcec.pulse-eight.com/ Source0: https://github.com/Pulse-Eight/%{name}/archive/%{name}-%{version}.tar.gz Patch1: libcec-pythonlib.patch BuildRequires: cmake BuildRequires: libXrandr-devel BuildRequires: lockdev-devel BuildRequires: ncurses-devel BuildRequires: platform-devel %if 0%{?with_python} BuildRequires: python3-devel %endif BuildRequires: swig BuildRequires: systemd-devel %description libCEC allows you in combination with the right hardware to control your device with your TV remote control over your existing HDMI cabling. libCEC is an enabling platform for the CEC bus in HDMI, it allows developers to interact with other HDMI devices without having to worry about the communication overhead, handshaking, and the various ways of send messages for each vendor. %package devel Summary: Development package for %{name} Group: Development/Libraries Requires: %{name}%{?_isa} = %{version}-%{release} Requires: pkgconfig %description devel Files for development with %{name}. %if 0%{?with_python} %package -n python3-libcec Summary: A Python 3 interface to libcec Group: Development/Libraries Requires: %{name}%{?_isa} = %{version}-%{release} %description -n python3-libcec Python 3 bindings for libcec %endif %prep %setup -q -n %{name}-%{name}-%{version} %patch1 -p1 -b .lib # Remove non linux binaries rm -rf support rm -rf driver # Fix shebang for Python 3 script. sed -i '1s=^#! /usr/bin/python=#!/usr/bin/python3=' src/pyCecClient/pyCecClient.py %build %cmake . make %{?_smp_mflags} V=1 %install make install DESTDIR=%{buildroot} INSTALL='install -p' #Remove libtool archives. find %{buildroot} -name '*.la' -delete # Remove versioned binaries rm %{buildroot}/%{_bindir}/cec-client %{buildroot}/%{_bindir}/cecc-client mv %{buildroot}/%{_bindir}/cec-client-%{version} %{buildroot}/%{_bindir}/cec-client mv %{buildroot}/%{_bindir}/cecc-client-%{version} %{buildroot}/%{_bindir}/cecc-client %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %{!?_licensedir:%global license %%doc} %license COPYING %doc AUTHORS ChangeLog %{_bindir}/cec-client %{_bindir}/cecc-client %{_libdir}/libcec.so.* %files devel %{_includedir}/libcec %{_libdir}/pkgconfig/libcec.pc %{_libdir}/libcec.so %if 0%{?with_python} %files -n python3-libcec %{_bindir}/pyCecClient %{python3_sitearch}/cec/ %endif %changelog * Thu Feb 23 2017 Iryna Shcherbina 4.0.2-2 - Fix python3-libcec dragging in both Python 3 and Python 2 (RHBZ#1420396) * Fri Feb 3 2017 Peter Robinson 4.0.2-1 - Update to 4.0.2 * Sat Jan 7 2017 Peter Robinson 4.0.1-1 - Update to 4.0.1 * Mon Dec 19 2016 Miro Hrončok - 4.0.0-2 - Rebuild for Python 3.6 * Sun Oct 30 2016 Peter Robinson 4.0.0-1 - Update to 4.0.0 * Tue Jul 19 2016 Fedora Release Engineering - 3.1.0-3 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages * Mon May 16 2016 Peter Robinson 3.1.0-2 - Don't build python3 bindings on EPEL * Wed Jan 20 2016 Peter Robinson 3.1.0-1 - Update to 3.1.0 - Build python3 bindings * Mon Jan 18 2016 Ville Skyttä - 3.0.1-2 - Build with $RPM_OPT_FLAGS (use %%cmake macro) * Tue Jan 12 2016 Peter Robinson 3.0.1-1 - Update to 3.0.1 * Wed Jun 17 2015 Fedora Release Engineering - 2.2.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Sat May 02 2015 Kalev Lember - 2.2.0-2 - Rebuilt for GCC 5 C++11 ABI change * Mon Nov 10 2014 Peter Robinson 2.2.0-1 - Update to 2.2.0 * Sun Aug 17 2014 Fedora Release Engineering - 2.1.4-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild * Sat Jun 07 2014 Fedora Release Engineering - 2.1.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Mon Dec 16 2013 Peter Robinson 2.1.4-1 - Update to 2.1.4 * Sat Aug 03 2013 Fedora Release Engineering - 2.1.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Fri May 17 2013 Peter Robinson 2.1.3-1 - Update to 2.1.3 * Mon Mar 4 2013 Peter Robinson 2.1.0-1 - Update to 2.1.0 * Thu Feb 14 2013 Fedora Release Engineering - 2.0.5-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Fri Dec 7 2012 Peter Robinson 2.0.5-1 - Update to 2.0.5 * Sun Nov 18 2012 Peter Robinson 2.0.4-1 - Update to 2.0.4 * Mon Nov 12 2012 Peter Robinson 2.0.3-1 - Update to 2.0.3 * Sun Nov 4 2012 Peter Robinson 1.9.0-2 - Updates from review * Wed Sep 26 2012 Peter Robinson 1.9.0-1 - Update to 1.9.0 * Sat Jun 30 2012 Peter Robinson 1.7.1-1 - Initial packaging