1 # nothing to be placed to debuginfo package
2 %define _enable_debug_packages 0
5 Summary: WireGuard is an extremely simple yet fast and modern VPN that utilizes state-of-the-art cryptography
6 Name: WireGuard%{_alt_kernel}
8 Release: %{rel}@%{_kernel_ver_str}
10 Group: Networking/Daemons
11 Source0: https://git.zx2c4.com/wireguard-linux-compat/snapshot/wireguard-linux-compat-%{version}.tar.xz
12 # Source0-md5: 8f284b4816ed0a8da20a6c91cdc5499e
13 URL: https://www.wireguard.com/
14 %{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:3.10}
15 BuildRequires: rpmbuild(macros) >= 1.701
16 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19 WireGuard is an extremely simple yet fast and modern VPN that utilizes
20 state-of-the-art cryptography. It aims to be faster, simpler, leaner,
21 and more useful than IPSec, while avoiding the massive headache. It
22 intends to be considerably more performant than OpenVPN. WireGuard is
23 designed as a general purpose VPN for running on embedded interfaces
24 and super computers alike, fit for many different circumstances.
27 %package -n kernel%{_alt_kernel}-misc-wireguard\
28 Summary: WireGuard kernel module\
29 Release: %{rel}@%{_kernel_ver_str}\
31 Requires(post,postun): /sbin/depmod\
32 %requires_releq_kernel\
33 Requires(postun): %releq_kernel\
35 %description -n kernel%{_alt_kernel}-misc-wireguard\
36 WireGuard kernel module.\
38 %files -n kernel%{_alt_kernel}-misc-wireguard\
39 %defattr(644,root,root,755)\
40 /lib/modules/%{_kernel_ver}/misc/*.ko*\
42 %post -n kernel%{_alt_kernel}-misc-wireguard\
43 %depmod %{_kernel_ver}\
45 %postun -n kernel%{_alt_kernel}-misc-wireguard\
46 %depmod %{_kernel_ver}\
49 %define build_kernel_pkg()\
50 %build_kernel_modules -C src -m wireguard\
51 %install_kernel_modules -D installed -m src/wireguard -d misc\
54 %{expand:%create_kernel_packages}
57 %setup -q -n wireguard-linux-compat-%{version}
60 %{expand:%build_kernel_packages}
63 rm -rf $RPM_BUILD_ROOT
65 install -d $RPM_BUILD_ROOT
66 cp -a installed/* $RPM_BUILD_ROOT
69 rm -rf $RPM_BUILD_ROOT