mirror of
https://github.com/amnezia-vpn/amneziawg-linux-kernel-module.git
synced 2026-05-17 00:16:14 +03:00
set version in Makefile.
Fix kernel source directory
This commit is contained in:
committed by
Iurii Egorov
parent
52e4134b4d
commit
85d637ea55
@@ -40,6 +40,11 @@ many different circumstances. It runs over UDP.
|
||||
# Fix the Makefile for CentOS7 since it ships coreutils from 2013.
|
||||
sed -i 's/install .* -D -t\(.\+\) /mkdir -p \1 \&\& \0/' %{_builddir}/amneziawg-linux-kernel-module-%{version}/src/Makefile
|
||||
|
||||
# Set version in dkms.conf and Makefile
|
||||
sed -i "s/^PACKAGE_VERSION=.*/PACKAGE_VERSION=\"%{version}\"/" %{_builddir}/amneziawg-linux-kernel-module-%{version}/src/dkms.conf
|
||||
sed -i "s/^MAKE\[0\]=\"make -C \/var\/lib\/dkms\/amneziawg\/.*/MAKE[0]=\"make -C \/var\/lib\/dkms\/amneziawg\/%{version}\/build\"/" %{_builddir}/amneziawg-linux-kernel-module-%{version}/src/dkms.conf
|
||||
sed -i "s/^WIREGUARD_VERSION = .*/WIREGUARD_VERSION = %{version}/" %{_builddir}/amneziawg-linux-kernel-module-%{version}/src/Makefile
|
||||
|
||||
|
||||
%build
|
||||
|
||||
|
||||
@@ -81,9 +81,11 @@ else
|
||||
rm -rf "${HOME}/.rpmmacros"
|
||||
[ -f "${HOME}/.rpmmacros.orig" ] && mv "${HOME}/.rpmmacros.orig" "${HOME}/.rpmmacros"
|
||||
cd ../BUILD || exit 255
|
||||
cd "$(ls -d */)" || exit 255
|
||||
cd "$(ls -d */)" || exit 255
|
||||
fi
|
||||
|
||||
KERNEL_PATH=$(pwd)
|
||||
KERNEL_PATH="$(pwd)"
|
||||
popd > /dev/null 2>&1 || exit 1
|
||||
[ -e kernel ] && rm -f kernel
|
||||
ln -s "${KERNEL_PATH}" kernel
|
||||
|
||||
Reference in New Issue
Block a user