diff --git a/libdrm.spec b/libdrm.spec index 26a613a8fa8ac468f799e6b3dc90a84d65ed37c7..7af3cc51c8f504fd7f00cfbb43ef2b9773052972 100644 --- a/libdrm.spec +++ b/libdrm.spec @@ -1,4 +1,4 @@ -%define anolis_release 1 +%define anolis_release 2 %define bcond_meson() %{lua: do local option = rpm.expand("%{1}") local with = rpm.expand("%{?with_" .. option .. "}") @@ -14,87 +14,75 @@ end} print(string.format("-D%s=%s", option, value)) end} -%ifarch x86_64 -%bcond_without intel -%else -%bcond_with intel -%endif %bcond_without radeon %bcond_without amdgpu %bcond_without nouveau %bcond_without vmwgfx %bcond_with omap +%bcond_with cairo_tests +%bcond_without man_pages +%bcond_with freedreno_kgsl +%bcond_without install_test_programs +%bcond_without udev +%ifarch x86_64 +%bcond_without intel +%else +%bcond_with intel +%endif %ifarch aarch64 -%bcond_without exynos -%bcond_without freedreno -%bcond_without tegra -%bcond_without vc4 %bcond_without etnaviv +%bcond_without vc4 +%bcond_without tegra +%bcond_without freedreno +%bcond_without exynos %else -%bcond_with exynos -%bcond_with freedreno -%bcond_with tegra -%bcond_with vc4 %bcond_with etnaviv +%bcond_with vc4 +%bcond_with tegra +%bcond_with freedreno +%bcond_with exynos %endif -%bcond_with cairo_tests -%bcond_without man_pages %ifarch %{valgrind_arches} %bcond_without valgrind %else %bcond_with valgrind %endif -%bcond_with freedreno_kgsl -%bcond_without install_test_programs -%bcond_without udev Name: libdrm Summary: Direct Rendering Manager runtime library Version: 2.4.115 Release: %{anolis_release}%{?dist} License: MIT - URL: https://dri.freedesktop.org Source0: https://dri.freedesktop.org/libdrm/%{name}-%{version}.tar.xz Source1: README.rst Source2: 91-drm-modeset.rules -BuildRequires: meson >= 0.43 -BuildRequires: gcc +BuildRequires: gcc kernel-headers BuildRequires: libatomic_ops-devel -BuildRequires: kernel-headers -%if %{with intel} -BuildRequires: pkgconfig(pciaccess) >= 0.10 +BuildRequires: chrpath meson >= 0.43 +%if %{with udev} +BuildRequires: pkgconfig(udev) %endif -#BuildRequires: pkgconfig(cunit) >= 2.1 -%if %{with cairo_tests} -BuildRequires: pkgconfig(cairo) +%if %{with valgrind} +BuildRequires: valgrind-devel %endif %if %{with man_pages} BuildRequires: python3-docutils %endif -%if %{with valgrind} -BuildRequires: valgrind-devel +%if %{with cairo_tests} +BuildRequires: pkgconfig(cairo) %endif -%if %{with udev} -BuildRequires: pkgconfig(udev) +%if %{with intel} +BuildRequires: pkgconfig(pciaccess) >= 0.10 %endif -BuildRequires: chrpath -Conflicts: libdrm-devel < 2.4.114 +Conflicts: libdrm-devel < 2.4.114 %description Direct Rendering Manager runtime library -%package doc -Summary: Documentation files for %{name} -Requires: %{name} = %{version}-%{release} -BuildArch: noarch - -%description doc -The %{name}-doc package contains documentation files for %{name}. - -%package devel +%package devel Summary: Direct Rendering Manager development package Requires: %{name} = %{version}-%{release} Requires: kernel-headers @@ -111,8 +99,16 @@ Requires: %{name} = %{version}-%{release} Utility programs for the kernel DRM interface. Will void your warranty. %endif +%package doc +Summary: Documentation files for %{name} +Requires: %{name} = %{version}-%{release} +BuildArch: noarch + +%description doc +The %{name}-doc package contains documentation files for %{name}. + %prep -%autosetup -p1 +%autosetup -p1 -n %{name}-%{version} %build %meson \ @@ -140,10 +136,10 @@ Utility programs for the kernel DRM interface. Will void your warranty. %meson_install %if %{with install_test_programs} chrpath -d %{_vpath_builddir}/tests/drmdevice -install -Dpm0755 -t %{buildroot}%{_bindir} %{_vpath_builddir}/tests/drmdevice +install -Dpm 0755 -t %{buildroot}%{_bindir} %{_vpath_builddir}/tests/drmdevice %endif %if %{with udev} -install -Dpm0644 -t %{buildroot}%{_udevrulesdir} %{S:2} +install -Dpm 0644 -t %{buildroot}%{_udevrulesdir} %{S:2} %endif mkdir -p %{buildroot}%{_docdir}/libdrm @@ -205,9 +201,6 @@ mkdir -p %{buildroot}%{_docdir}/libdrm %{_udevrulesdir}/91-drm-modeset.rules %endif -%files doc -%doc README.rst - %files devel %dir %{_includedir}/libdrm %{_includedir}/libdrm/drm.h @@ -303,7 +296,13 @@ mkdir -p %{buildroot}%{_docdir}/libdrm %{abidir}/vbltest-option.list %endif +%files doc +%doc README.rst + %changelog +* Wed Apr 12 2023 Guyu Wang - 2.4.115-2 +- optimise spec file + * Thu Feb 16 2023 Funda Wang - 2.4.115-1 - New version 2.4.115