1From 3396fc7a184293c23135161f034802062f7f3816 Mon Sep 17 00:00:00 2001 2From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <adraszik@tycoint.com> 3Date: Wed, 1 Nov 2017 11:41:48 +0000 4Subject: [PATCH] build: don't override --localstatedir --mandir --sysconfdir 5MIME-Version: 1.0 6Content-Type: text/plain; charset=UTF-8 7Content-Transfer-Encoding: 8bit 8 9It is currently impossible to override localstatedir, 10mandir and sysconfdir during ./configure, because they 11are being overriden unconditionally because of they 12way trousers is built using rpmbuild. 13 14If they need massaging for rpmbuild, the values should 15be specified inside the spec file, not in ./configure 16and thereby overriding user-requested values. 17 18With this patch it is now possible to set above 19locations as needed. The .spec file is being modified 20as well so as to restore previous behaviour. 21 22Signed-off-by: André Draszik <adraszik@tycoint.com> 23--- 24Upstream-Status: Submitted [https://sourceforge.net/p/trousers/mailman/message/36099290/] 25Signed-off-by: André Draszik <adraszik@tycoint.com> 26 configure.ac | 11 ++--------- 27 dist/trousers.spec.in | 2 +- 28 2 files changed, 3 insertions(+), 10 deletions(-) 29 30diff --git a/configure.ac b/configure.ac 31index b9626af..7fe5f8e 100644 32--- a/configure.ac 33+++ b/configure.ac 34@@ -376,16 +376,9 @@ CFLAGS="$CFLAGS -I../include \ 35 KERNEL_VERSION=`uname -r` 36 AC_SUBST(CFLAGS) 37 38-# When we build the rpms, prefix will be /usr. This'll do some things that make sense, 39-# like put our sbin stuff in /usr/sbin and our library in /usr/lib. It'll do some other 40-# things that don't make sense like put our config file in /usr/etc. So, I'll just hack 41-# it here. If the --prefix option isn't specified during configure, let it all go to 42+# If the --prefix option isn't specified during configure, let it all go to 43 # /usr/local, even /usr/local/etc. :-P 44-if test x"${prefix}" = x"/usr"; then 45- sysconfdir="/etc" 46- localstatedir="/var" 47- mandir="/usr/share/man" 48-elif test x"${prefix}" = x"NONE"; then 49+if test x"${prefix}" = x"NONE"; then 50 localstatedir="/usr/local/var" 51 fi 52 53diff --git a/dist/trousers.spec.in b/dist/trousers.spec.in 54index b298b0e..10ef178 100644 55--- a/dist/trousers.spec.in 56+++ b/dist/trousers.spec.in 57@@ -45,7 +45,7 @@ applications. 58 59 %build 60 %{?arch64:export PKG_CONFIG_PATH=%{pkgconfig_path}:$PKG_CONFIG_PATH} 61-./configure --prefix=/usr --libdir=%{_libdir} 62+./configure --prefix=/usr --libdir=%{_libdir} --sysconfdir=/etc --localstatedir=/var --mandir=/usr/share/man 63 make 64 65 %clean 66-- 672.15.0.rc1 68 69