unconditionally build with raspberrypi support on arm and aarch64 [release 6.0.2-2mamba;Tue Apr 20 2021]
This commit is contained in:
parent
d397ab768a
commit
90048cbf1e
26
libcec-6.0.2-pythonlib.patch
Normal file
26
libcec-6.0.2-pythonlib.patch
Normal file
@ -0,0 +1,26 @@
|
||||
diff --git a/src/libcec/cmake/CheckPlatformSupport.cmake b/src/libcec/cmake/CheckPlatformSupport.cmake
|
||||
index 1d99bd8..8a5e3d2 100644
|
||||
--- a/src/libcec/cmake/CheckPlatformSupport.cmake
|
||||
+++ b/src/libcec/cmake/CheckPlatformSupport.cmake
|
||||
@@ -280,16 +280,16 @@ else()
|
||||
|
||||
if (${PYTHON_MAJOR_VERSION} EQUAL 2)
|
||||
install(TARGETS ${SWIG_MODULE_cec_REAL_NAME}
|
||||
- DESTINATION lib/python${PYTHON_VERSION}/${PYTHON_PKG_DIR}/${PYTHON_LIB_INSTALL_PATH}/cec)
|
||||
+ DESTINATION lib${LIB_SUFFIX}/python${PYTHON_VERSION}/${PYTHON_PKG_DIR}/${PYTHON_LIB_INSTALL_PATH}/cec)
|
||||
install(FILES ${CMAKE_BINARY_DIR}/src/libcec/cec.py
|
||||
- DESTINATION lib/python${PYTHON_VERSION}/${PYTHON_PKG_DIR})
|
||||
+ DESTINATION lib${LIB_SUFFIX}/python${PYTHON_VERSION}/${PYTHON_PKG_DIR}/cec)
|
||||
install(FILES ${CMAKE_SOURCE_DIR}/src/libcec/cmake/__init__.py
|
||||
- DESTINATION lib/python${PYTHON_VERSION}/${PYTHON_PKG_DIR}/cec)
|
||||
+ DESTINATION lib${LIB_SUFFIX}/python${PYTHON_VERSION}/${PYTHON_PKG_DIR}/cec)
|
||||
else()
|
||||
install(TARGETS ${SWIG_MODULE_cec_REAL_NAME}
|
||||
- DESTINATION lib/python${PYTHON_VERSION}/${PYTHON_PKG_DIR}/${PYTHON_LIB_INSTALL_PATH})
|
||||
+ DESTINATION lib${LIB_SUFFIX}/python${PYTHON_VERSION}/${PYTHON_PKG_DIR}/${PYTHON_LIB_INSTALL_PATH}/cec)
|
||||
install(FILES ${CMAKE_BINARY_DIR}/src/libcec/cec.py
|
||||
- DESTINATION lib/python${PYTHON_VERSION}/${PYTHON_PKG_DIR})
|
||||
+ DESTINATION lib${LIB_SUFFIX}/python${PYTHON_VERSION}/${PYTHON_PKG_DIR}/cec)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
105
libcec.spec
105
libcec.spec
@ -1,28 +1,17 @@
|
||||
# note: build for raspberrypi
|
||||
# autospec --define _with_raspberrypi=1 -u -a5 libcec.spec
|
||||
# -or-
|
||||
# rpmbuild --with raspberrypi libcec.spec
|
||||
|
||||
%if "%{?_with_raspberrypi}"
|
||||
%define pckname %{name}-rpi
|
||||
%else
|
||||
%define pckname %name
|
||||
%endif
|
||||
|
||||
Name: libcec
|
||||
Epoch: 1
|
||||
Version: 6.0.2
|
||||
Release: 1mamba
|
||||
Release: 2mamba
|
||||
Summary: USB CEC Adaptor communication Library
|
||||
Group: System/Kernel and Hardware
|
||||
Vendor: openmamba
|
||||
Distribution: openmamba
|
||||
Packager: Davide Madrisan <davide.madrisan@gmail.com>
|
||||
Packager: Silvan Calarco <silvan.calarco@mambasoft.com>
|
||||
URL: http://libcec.pulse-eight.com/
|
||||
## GITSOURCE git://github.com/Pulse-Eight/libcec.git
|
||||
Source: https://github.com/Pulse-Eight/libcec/archive/libcec-%{version}.tar.gz
|
||||
#Source: https://github.com/Pulse-Eight/libcec.git/libcec-%{version}/libcec-%{version}.tar.bz2
|
||||
Patch0: libcec-3.0.1-buildfix-upstream.patch
|
||||
Patch1: libcec-6.0.2-pythonlib.patch
|
||||
License: GPL
|
||||
## AUTOBUILDREQ-BEGIN
|
||||
BuildRequires: glibc-devel
|
||||
@ -31,7 +20,6 @@ BuildRequires: libXrandr-devel
|
||||
BuildRequires: libcec-p8-platform-devel
|
||||
BuildRequires: libgcc
|
||||
BuildRequires: libncurses-devel
|
||||
BuildRequires: libpython-devel
|
||||
BuildRequires: libpython3-devel
|
||||
BuildRequires: libstdc++6-devel
|
||||
BuildRequires: libudev-devel
|
||||
@ -39,50 +27,58 @@ BuildRequires: libudev-devel
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: libtool
|
||||
BuildRequires: liblockdev-devel
|
||||
%if "%{?_with_raspberrypi}"
|
||||
%ifarch arm aarch64
|
||||
BuildRequires: libraspberrypi-devel
|
||||
Provides: libcec = %{?epoch:%epoch:}%{version}-%{release}
|
||||
%endif
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||
|
||||
%description
|
||||
libCEC allows you in combination with the right hardware to control your device with your TV remote control.
|
||||
|
||||
%if "%{?_with_raspberrypi}"
|
||||
%package -n %{name}-rpi
|
||||
Group: System/Kernel and Hardware
|
||||
Summary: USB CEC Adaptor communication Library
|
||||
|
||||
%description -n %{name}-rpi
|
||||
libCEC allows you in combination with the right hardware to control your device with your TV remote control.
|
||||
%endif
|
||||
|
||||
%package -n %{pckname}-devel
|
||||
%package devel
|
||||
Group: Development/Libraries
|
||||
Summary: Development files for %{pckname}
|
||||
Requires: %{pckname} = %{?epoch:%epoch:}%{version}-%{release}
|
||||
%if "%{?_with_raspberrypi}"
|
||||
Provides: libcec-devel = %{?epoch:%epoch:}%{version}-%{release}
|
||||
%endif
|
||||
Summary: Development files for %{name}
|
||||
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
|
||||
Requires: pkg-config
|
||||
|
||||
%description -n %{pckname}-devel
|
||||
This package contains libraries and header files for developing applications that use %{pckname}.
|
||||
%description devel
|
||||
This package contains libraries and header files for developing applications that use %{name}.
|
||||
|
||||
%package tools
|
||||
Group: System/Tools
|
||||
Summary: Tools provided with %{name}
|
||||
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
|
||||
|
||||
%description tools
|
||||
This package contains libraries and header files for developing applications that use %{name}.
|
||||
|
||||
%package -n python-%{name}
|
||||
Group: System/Tools
|
||||
Summary: A Python 3 interface to libcec
|
||||
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
|
||||
|
||||
%description -n python-%{name}
|
||||
This package contains libraries and header files for developing applications that use %{name}.
|
||||
|
||||
%debug_package
|
||||
|
||||
%prep
|
||||
%setup -q -n libcec-libcec-%{version}
|
||||
#-D -T
|
||||
#:<< _EOF
|
||||
#%patch0 -p1
|
||||
%patch1 -p1
|
||||
|
||||
%build
|
||||
#: << CBLOCK
|
||||
#:<< _EOF
|
||||
%cmake -d build \
|
||||
\
|
||||
%if "%{?_with_raspberrypi}"
|
||||
-DPYTHON_INCLUDE_DIR=%{python3_inc} \
|
||||
-DPYTHON_LIBRARY=%{_libdir}/libpython%{python3_version}.so \
|
||||
%ifarch arm aarch64
|
||||
-DRPI_INCLUDE_DIR=/opt/vc/include \
|
||||
-DRPI_LIB_DIR=/opt/vc/lib
|
||||
-DRPI_LIB_DIR=/opt/vc/lib \
|
||||
%endif
|
||||
%ifarch aarch64 \
|
||||
--DHAVE_AOCEC_API=1
|
||||
%endif
|
||||
|
||||
%make
|
||||
@ -94,29 +90,38 @@ This package contains libraries and header files for developing applications tha
|
||||
%clean
|
||||
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||
|
||||
%post -n %{pckname} -p /sbin/ldconfig
|
||||
%postun -n %{pckname} -p /sbin/ldconfig
|
||||
%post -p /sbin/ldconfig
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%files -n %{pckname}
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%{_bindir}/cec-client
|
||||
%{_bindir}/cec-client-%{version}
|
||||
%{_bindir}/cecc-client
|
||||
%{_bindir}/cecc-client-%{version}
|
||||
%{_bindir}/pyCecClient
|
||||
%{python3_sitelib}/_cec.so
|
||||
%{python3_sitelib}/cec.py
|
||||
%{_libdir}/libcec.so.*
|
||||
%doc AUTHORS COPYING
|
||||
|
||||
%files -n %{pckname}-devel
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
%{_includedir}/libcec
|
||||
%{_libdir}/libcec.so
|
||||
%{_libdir}/pkgconfig/libcec.pc
|
||||
#%doc ChangeLog
|
||||
|
||||
%files tools
|
||||
%defattr(-,root,root)
|
||||
%{_bindir}/cec-client
|
||||
%{_bindir}/cec-client-%{version}
|
||||
%{_bindir}/cecc-client
|
||||
%{_bindir}/cecc-client-%{version}
|
||||
|
||||
%files -n python-libcec
|
||||
%{_bindir}/pyCecClient
|
||||
%dir %{python3_sitearch}/cec
|
||||
%{python3_sitearch}/cec/_cec.so
|
||||
%{python3_sitearch}/cec/cec.py
|
||||
|
||||
%changelog
|
||||
* Tue Apr 20 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 6.0.2-2mamba
|
||||
- unconditionally build with raspberrypi support on arm and aarch64
|
||||
|
||||
* Thu Jul 16 2020 Automatic Build System <autodist@mambasoft.it> 6.0.2-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user