[packages/ipsec-tools] - added libdir patch to kill unwanted -L/lib - proper BR for libradius

qboosh qboosh at pld-linux.org
Sat Jun 20 22:30:27 CEST 2020


commit 9284ed40e26968c1ca7ac5325abf3bb8d5f36813
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Jun 20 22:31:28 2020 +0200

    - added libdir patch to kill unwanted -L/lib
    - proper BR for libradius

 ipsec-tools-libdir.patch | 77 ++++++++++++++++++++++++++++++++++++++++++++++++
 ipsec-tools.spec         | 15 +++++-----
 2 files changed, 84 insertions(+), 8 deletions(-)
---
diff --git a/ipsec-tools.spec b/ipsec-tools.spec
index a5c591f..be403a6 100644
--- a/ipsec-tools.spec
+++ b/ipsec-tools.spec
@@ -3,10 +3,10 @@
 #
 
 # Conditional build:
-%bcond_without	kerberos5	# build with GSSAPI support
-%bcond_without	ldap		# build with LDAP support
-%bcond_with	radius		# build with radius support
-%bcond_with	hip		# build with Host Identity Protocol support
+%bcond_without	kerberos5	# GSSAPI support
+%bcond_without	ldap		# LDAP support
+%bcond_with	radius		# RADIUS support
+%bcond_with	hip		# Host Identity Protocol support
 #
 Summary:	User-space IPsec tools for the Linux IPsec implementation
 Summary(pl.UTF-8):	Narzędzia przestrzeni użytkownika dla linuksowej implementacji IPsec
@@ -28,6 +28,7 @@ Patch2:		%{name}-support-glibc-2.20.patch
 Patch3:		%{name}-link.patch
 Patch4:		no-sysctl.patch
 Patch5:		%{name}-openssl-1.1.patch
+Patch6:		%{name}-libdir.patch
 BuildRequires:	autoconf >= 2.52
 BuildRequires:	automake
 BuildRequires:	bison
@@ -39,8 +40,7 @@ BuildRequires:	linux-libc-headers >= 7:2.6
 %{?with_ldap:BuildRequires:	openldap-devel >= 2.4.6}
 BuildRequires:	openssl-devel >= 0.9.8s
 BuildRequires:	pam-devel
-# http://portal-to-web.de/tacacs/libradius.php ?
-%{?with_radius:BuildRequires:	libradius-devel}
+%{?with_radius:BuildRequires:	libradius-linux-devel}
 BuildRequires:	readline-devel
 BuildRequires:	sed >= 4.0
 Requires(post,preun):	/sbin/chkconfig
@@ -110,10 +110,10 @@ Biblioteki statyczne libipsec i libracoon.
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
+%patch6 -p1
 
 %{__sed} -i 's!@INCLUDE_GLIBC@!!g' src/Makefile.am
 %{__sed} -i 's/-Werror//' configure.ac
-%{__sed} -i 's/-R\$[^ ]*\/lib//' configure.ac
 
 %build
 %{__libtoolize}
@@ -121,7 +121,6 @@ Biblioteki statyczne libipsec i libracoon.
 %{__autoconf}
 %{__autoheader}
 %{__automake}
-
 %configure \
 	--enable-adminport \
 	--enable-dpd \
diff --git a/ipsec-tools-libdir.patch b/ipsec-tools-libdir.patch
new file mode 100644
index 0000000..b26105c
--- /dev/null
+++ b/ipsec-tools-libdir.patch
@@ -0,0 +1,77 @@
+--- ipsec-tools-0.8.2/configure.ac.orig	2014-02-27 09:44:18.000000000 +0100
++++ ipsec-tools-0.8.2/configure.ac	2020-06-20 22:20:33.797188479 +0200
+@@ -305,6 +305,7 @@
+ 	fi;
+ 	if test "x$libiconv_dir" = "x"; then
+ 		RACOON_PATH_LIBS([iconv_open], [iconv])
++		LIBS="$LIBS -liconv"
+ 	else
+ 		if test -d "$libiconv_dir/lib" -a \
+ 		    -d "$libiconv_dir/include" ; then
+@@ -313,8 +314,8 @@
+ 		else
+ 			AC_MSG_ERROR([ICONV libs or includes not found. Aborting.])
+ 	  	fi
++		LIBS="$LIBS -L$libiconv_dir/lib -liconv"
+ 	fi
+-	LIBS="$LIBS -L$libiconv_dir/lib -R$libiconv_dir/lib -liconv"
+ 	AC_CHECK_FUNCS(iconv_open)
+ fi
+ 
+@@ -368,6 +369,7 @@
+ 	fi;
+ 	if test "x$libradius_dir" = "x"; then
+ 		RACOON_PATH_LIBS([rad_create_request], [radius])
++		LIBS="$LIBS -lradius"
+ 	else
+ 		if test -d "$libradius_dir/lib" -a \
+ 		    -d "$libradius_dir/include" ; then
+@@ -376,9 +378,9 @@
+ 		else
+ 			AC_MSG_ERROR([RADIUS libs or includes not found. Aborting.])
+ 	  	fi
++		LIBS="$LIBS -L$libradius_dir/lib -lradius"
+ 	fi
+ 	AC_DEFINE([HAVE_LIBRADIUS], [], [Hybrid authentication uses RADIUS])
+-	LIBS="$LIBS -L$libradius_dir/lib -R$libradius_dir/lib -lradius"
+ 	AC_CHECK_FUNCS(rad_create_request)
+ fi
+ 
+@@ -394,6 +396,7 @@
+ 	fi;
+ 	if test "x$libpam_dir" = "x"; then
+ 		RACOON_PATH_LIBS([pam_start], [pam])
++		LIBS="$LIBS -lpam"
+ 	else
+ 		if test -d "$libpam_dir/lib" -a \
+ 		    -d "$libpam_dir/include" ; then
+@@ -402,9 +405,9 @@
+ 		else
+ 			AC_MSG_ERROR([PAM libs or includes not found. Aborting.])
+ 	  	fi
++		LIBS="$LIBS -L$libpam_dir/lib -lpam"
+ 	fi
+ 	AC_DEFINE([HAVE_LIBPAM], [], [Hybrid authentication uses PAM])
+-	LIBS="$LIBS -L$libpam_dir/lib -R$libpam_dir/lib -lpam"
+ 	AC_CHECK_FUNCS(pam_start)
+ fi
+ 
+@@ -420,6 +423,7 @@
+ 	fi;
+ 	if test "x$libldap_dir" = "x"; then
+ 		RACOON_PATH_LIBS([ldap_init], [ldap])
++		LIBS="$LIBS -lldap"
+ 	else
+ 		if test -d "$libldap_dir/lib" -a \
+ 		    -d "$libldap_dir/include" ; then
+@@ -428,9 +432,9 @@
+ 		else
+ 			AC_MSG_ERROR([LDAP libs or includes not found. Aborting.])
+ 	  	fi
++		LIBS="$LIBS -L$libldap_dir/lib -lldap"
+ 	fi
+ 	AC_DEFINE([HAVE_LIBLDAP], [], [Hybrid authentication uses LDAP])
+-	LIBS="$LIBS -L$libldap_dir/lib -R$libldap_dir/lib -lldap"
+ 
+ 	saved_CFLAGS=$CFLAGS
+ 	CFLAGS="$CFLAGS -Wall -Werror"
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ipsec-tools.git/commitdiff/9284ed40e26968c1ca7ac5325abf3bb8d5f36813



More information about the pld-cvs-commit mailing list