naccyde / rpms / iproute

Forked from rpms/iproute 7 months ago
Clone

Blame SOURCES/0006-configure-add-the-prefix-option.patch

32391d
From 3be62dd57ef875f9cf4674f8665c5da48c4e2274 Mon Sep 17 00:00:00 2001
32391d
Message-Id: <3be62dd57ef875f9cf4674f8665c5da48c4e2274.1637678195.git.aclaudi@redhat.com>
32391d
In-Reply-To: <b30268eda844bdebbb8e5e4f5735e3b1bb666368.1637678195.git.aclaudi@redhat.com>
32391d
References: <b30268eda844bdebbb8e5e4f5735e3b1bb666368.1637678195.git.aclaudi@redhat.com>
32391d
From: Andrea Claudi <aclaudi@redhat.com>
32391d
Date: Tue, 23 Nov 2021 15:28:18 +0100
32391d
Subject: [PATCH] configure: add the --prefix option
32391d
32391d
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2016061
32391d
Upstream Status: iproute2.git commit 0ee1950b
32391d
32391d
commit 0ee1950b5c38986ea896606810231f5f9d761a00
32391d
Author: Andrea Claudi <aclaudi@redhat.com>
32391d
Date:   Thu Oct 14 10:50:54 2021 +0200
32391d
32391d
    configure: add the --prefix option
32391d
32391d
    This commit add the '--prefix' option to the iproute2 configure script.
32391d
32391d
    This mimics the '--prefix' option that autotools configure provides, and
32391d
    will be used later to allow users or packagers to set the lib directory.
32391d
32391d
    Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
32391d
    Acked-by: Phil Sutter <phil@nwl.cc>
32391d
    Signed-off-by: David Ahern <dsahern@kernel.org>
32391d
---
32391d
 configure | 8 ++++++++
32391d
 1 file changed, 8 insertions(+)
32391d
32391d
diff --git a/configure b/configure
32391d
index 9a2645d9..05e23eff 100755
32391d
--- a/configure
32391d
+++ b/configure
32391d
@@ -3,6 +3,7 @@
32391d
 # This is not an autoconf generated configure
32391d
 
32391d
 INCLUDE="$PWD/include"
32391d
+PREFIX="/usr"
32391d
 
32391d
 # Output file which is input to Makefile
32391d
 CONFIG=config.mk
32391d
@@ -490,6 +491,7 @@ Usage: $0 [OPTIONS]
32391d
 	--libbpf_force <on|off>		Enable/disable libbpf by force. Available options:
32391d
 					  on: require link against libbpf, quit config if no libbpf support
32391d
 					  off: disable libbpf probing
32391d
+	--prefix <dir>			Path prefix of the lib files to install
32391d
 	-h | --help			Show this usage info
32391d
 EOF
32391d
 	exit $1
32391d
@@ -516,6 +518,11 @@ else
32391d
 				LIBBPF_FORCE="$1" ;;
32391d
 			--libbpf_force=*)
32391d
 				LIBBPF_FORCE="${1#*=}" ;;
32391d
+			--prefix)
32391d
+				shift
32391d
+				PREFIX="$1" ;;
32391d
+			--prefix=*)
32391d
+				PREFIX="${1#*=}" ;;
32391d
 			-h | --help)
32391d
 				usage 0 ;;
32391d
 			--*)
32391d
@@ -536,6 +543,7 @@ if [ "${LIBBPF_FORCE-unused}" != "unused" ]; then
32391d
 		usage 1
32391d
 	fi
32391d
 fi
32391d
+[ -z "$PREFIX" ] && usage 1
32391d
 
32391d
 echo "# Generated config based on" $INCLUDE >$CONFIG
32391d
 quiet_config >> $CONFIG
32391d
-- 
32391d
2.31.1
32391d