From 87b097cb3fb0f87651bacd031b71e9faa26cb8c6 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Mon, 10 Dec 2018 10:03:37 +0100 Subject: [PATCH] Add nvidia_kmodsrc_version RPM macro --- xorg-x11-drv-nvidia.spec | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/xorg-x11-drv-nvidia.spec b/xorg-x11-drv-nvidia.spec index b88ee4c..cbe510c 100644 --- a/xorg-x11-drv-nvidia.spec +++ b/xorg-x11-drv-nvidia.spec @@ -307,6 +307,13 @@ mkdir -p %{buildroot}%{_sysconfdir}/nvidia mkdir -p %{buildroot}%{_datadir}/nvidia-kmod-%{version} tar Jcf %{buildroot}%{_datadir}/nvidia-kmod-%{version}/nvidia-kmod-%{version}-x86_64.tar.xz kernel +#RPM Macros support +mkdir -p %{buildroot}%{rpmmacrodir} +cat > %{buildroot}%{rpmmacrodir}/macros.%{name}-kmodsrc<< EOF +# nvidia_kmodsrc_version RPM Macro +%nvidia_kmodsrc_version %{version} +EOF + %if 0%{?fedora} >= 25 # install AppData and add modalias provides mkdir -p %{buildroot}%{_datadir}/appdata/ @@ -406,6 +413,7 @@ fi ||: %files kmodsrc %dir %{_datadir}/nvidia-kmod-%{version} +%{rpmmacrodir}/macros.%{name}-kmodsrc %{_datadir}/nvidia-kmod-%{version}/nvidia-kmod-%{version}-x86_64.tar.xz %endif