diff --git a/SPECS/kmod-wireguard.spec b/SPECS/kmod-wireguard.spec index 711e9cf..f1b8965 100644 --- a/SPECS/kmod-wireguard.spec +++ b/SPECS/kmod-wireguard.spec @@ -1,17 +1,19 @@ +%global pkg wireguard + +%global kernel_version 4.18.0-315.el8 + %global _use_internal_dependency_generator 0 + %global debug_package %{nil} -%define __spec_install_post \ +%global __spec_install_post \ %{?__debug_package:%{__debug_install_post}} \ %{__arch_install_post} \ %{__os_install_post} \ %{__mod_compress_install_post} -%define __mod_compress_install_post find %{buildroot}/lib/modules -type f -name \*.ko -exec xz \{\} \\; +%global __mod_compress_install_post find %{buildroot}/lib/modules -type f -name \*.ko -exec xz \{\} \\; -%define pkg wireguard - -%define kernel_version 4.18.0-315.el8 Name: kmod-%{pkg} Version: 1.0.20210606 @@ -28,9 +30,11 @@ Patch1: 0001-compat-account-for-latest-c8s-backports.patch ExclusiveArch: x86_64 aarch64 BuildRequires: elfutils-libelf-devel +BuildRequires: gcc BuildRequires: kernel-devel = %{kernel_version} BuildRequires: kernel-rpm-macros BuildRequires: kmod +BuildRequires: make BuildRequires: redhat-rpm-config BuildRequires: xz @@ -43,11 +47,8 @@ Requires(postun): /usr/sbin/depmod Provides: kernel-modules = %{kernel_version}.%{_arch} Provides: %{name} = %{?epoch:%{epoch}:}%{version}-%{release} - -BuildRequires: gcc -BuildRequires: make - Supplements: wireguard-tools +Recommends: wireguard-tools %description @@ -72,7 +73,7 @@ popd %install %{__install} -D -t %{buildroot}/lib/modules/%{kernel_version}.%{_arch}/extra/drivers/net/%{pkg} src/%{pkg}.ko -# Temporarily executable for stripping +# Make .ko objects temporarily executable for automatic stripping find %{buildroot}/lib/modules -type f -name \*.ko -exec chmod u+x \{\} \+