Patchwork tcp-wrappers: fix do_install when $prefix == $base_prefix

login
register
mail settings
Submitter Koen Kooi
Date Aug. 4, 2014, 9:10 a.m.
Message ID <1407143402-6842-1-git-send-email-koen@dominion.thruhere.net>
Download mbox | patch
Permalink /patch/77179/
State Accepted
Commit 1d75145f98d534ca8372766f825e1dd3162d669c
Headers show

Comments

Koen Kooi - Aug. 4, 2014, 9:10 a.m.
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
---
 meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

Patch

diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb b/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb
index c7954e7..11cc243 100644
--- a/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb
@@ -87,10 +87,12 @@  do_install () {
 	oe_libinstall -a libwrap ${D}${libdir}
 	oe_libinstall -C shared -so libwrap ${D}${base_libdir}
 
-	rel_lib_prefix=`echo ${libdir} | sed 's,\(^/\|\)[^/][^/]*,..,g'`
-	libname=`readlink ${D}${base_libdir}/libwrap.so | xargs basename`
-	ln -s ${rel_lib_prefix}${base_libdir}/${libname} ${D}${libdir}/libwrap.so
-	rm -f ${D}${base_libdir}/libwrap.so
+	if [ "${libdir}" != "${base_libdir}" ] ; then
+		rel_lib_prefix=`echo ${libdir} | sed 's,\(^/\|\)[^/][^/]*,..,g'`
+		libname=`readlink ${D}${base_libdir}/libwrap.so | xargs basename`
+		ln -s ${rel_lib_prefix}${base_libdir}/${libname} ${D}${libdir}/libwrap.so
+		rm -f ${D}${base_libdir}/libwrap.so
+	fi
 
 	install -d ${D}${sbindir}
 	for b in ${BINS}; do