Last active
December 29, 2021 22:34
-
-
Save frantisekz/2b8070d039b4a14498e61cf16c6c3511 to your computer and use it in GitHub Desktop.
intel-media-driver-free.spec
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Fixes GenKrn | |
%global optflags %{optflags} -O0 | |
Name: intel-media-driver-free | |
Version: 21.4.3 | |
Release: 1%{?dist} | |
Summary: The Intel Media Driver for VAAPI | |
License: MIT and BSD | |
URL: https://github.com/intel/media-driver | |
# Original source has non-free and/or patented files, use strip.py on original source! | |
#Source0: %%{url}/archive/intel-media-%%{version}%%{?pre}.tar.gz | |
Source0: intel-media-%{version}-free.tar.gz | |
Source1: intel-media-driver.metainfo.xml | |
# https://github.com/intel/media-driver/commit/42ffd79 ; https://github.com/intel/gmmlib/issues/93 | |
Patch01: 42ffd79.patch | |
Patch02: 0001-Try-to-workaround-kernel-header-gen-issues.patch | |
# This fixes weird 'undefined in scope' errors which seemingly make no sense at all | |
Patch03: 0001-Wtf.patch | |
Patch04: 0001-Wtf-2.patch | |
Patch05: 0001-Wtf-3.patch | |
Patch06: 0001-Wtf-4.patch | |
# This is an Intel only vaapi backend | |
ExclusiveArch: i686 x86_64 | |
BuildRequires: cmake | |
BuildRequires: gcc | |
BuildRequires: gcc-c++ | |
# AppStream metadata generation | |
BuildRequires: libappstream-glib >= 0.6.3 | |
BuildRequires: pkgconfig(igdgmm) | |
BuildRequires: pkgconfig(libcmrt) | |
BuildRequires: intel-igc | |
BuildRequires: intel-igc-devel | |
BuildRequires: intel-cm-compiler | |
BuildRequires: intel-compute-runtime | |
BuildRequires: python3 | |
BuildRequires: python3-devel | |
BuildRequires: python-unversioned-command | |
BuildRequires: pkgconfig(libva) >= 1.6.0 | |
BuildRequires: pkgconfig(pciaccess) | |
BuildRequires: libpciaccess | |
BuildRequires: libdrm | |
BuildRequires: libdrm-devel | |
BuildRequires: pkgconfig(x11) | |
BuildRequires: ninja-build | |
# The full intel-media-driver and this -free variant aren't co-installable | |
Conflicts: intel-media-driver | |
%description | |
The Intel Media Driver for VAAPI is a new VA-API (Video Acceleration API) | |
user mode driver supporting hardware accelerated decoding, encoding, | |
and video post processing for GEN based graphics hardware. | |
https://01.org/intel-media-for-linux | |
%prep | |
%autosetup -p1 -n media-driver-intel-media-%{version}%{?pre} | |
# Fix license perm | |
chmod -x LICENSE.md README.md CMakeLists.txt | |
# Remove pre-built (but unused) files | |
rm -f Tools/MediaDriverTools/UMDPerfProfiler/MediaPerfParser | |
# Remove all -Werror compile flags | |
sed -e "/-Werror/d" -i media_driver/cmake/linux/media_compile_flags_linux.cmake | |
sed -e "/-Werror/d" -i media_driver/media_top_cmake.cmake | |
%build | |
%ifarch %{ix86} | |
export CXXFLAGS="%{optflags} -D_FILE_OFFSET_BITS=64" | |
%endif | |
%cmake \ | |
%ifarch %{ix86} | |
-DARCH:STRING=32 \ | |
%endif | |
-DENABLE_NONFREE_KERNELS:BOOL=OFF \ | |
-DBUILD_KERNELS:BOOL=ON \ | |
-G Ninja | |
%cmake_build | |
%install | |
%cmake_install | |
# Fix perm on library to be stripped | |
chmod +x %{buildroot}%{_libdir}/dri/iHD_drv_video.so | |
# install AppData and add modalias provides | |
mkdir -p %{buildroot}%{_metainfodir} | |
install -pm 0644 %{SOURCE1} %{buildroot}%{_metainfodir} | |
# TODO - have pci based hw detection | |
%if 0 | |
fn=%{buildroot}%{_metainfodir}/intel-media-driver.metainfo.xml | |
%{SOURCE9} src/i965_pciids.h | xargs appstream-util add-provide ${fn} modalias | |
%endif | |
# Don't provide the headers - Used by anyone else ? | |
rm -rf %{buildroot}%{_includedir}/igfxcmrt | |
rm -rf %{buildroot}%{_libdir}/pkgconfig | |
%files | |
%doc README.md | |
%license LICENSE.md | |
%{_libdir}/dri/iHD_drv_video.so | |
%{_libdir}/libigfxcmrt.so* | |
%{_metainfodir}/intel-media-driver.metainfo.xml | |
%changelog | |
* Mon Dec 27 2021 Frantisek Zatloukal <fzatlouk@redhat.com> - 21.4.3-1 | |
- Initial package, taken from rpmfusion and reduced to contain only free parts |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment