Files
rpms/fedora/SPECS/archive/libcec.spec

107 lines
2.6 KiB
RPMSpec
Raw Normal View History

%if 0%{?fedora}
%global with_python 1
%endif
%define vvv 3
Name: libcec
Version: 4.0.0
Release: 1%{?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}-%{name}-%{version}-%{vvv}.tar.gz
Patch0: 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}-%{vvv}
%patch0 -p1 -b .python
# Remove non linux binaries
rm -rf support
rm -rf driver
%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.py
%{python3_sitearch}/cec/
%endif
%changelog
* Sat Dec 3 2016 Daniel Steiner <dsteiner@redhat.com>
- Build for Fedora 25.