Move private ldns library to /usr/lib/priv
authorJohn Marino <draco@marino.st>
Thu, 28 Jan 2016 11:18:46 +0000 (12:18 +0100)
committerJohn Marino <draco@marino.st>
Thu, 28 Jan 2016 11:22:29 +0000 (12:22 +0100)
It's been decided to relocate private libraries to either /lib/priv or
/usr/lib/priv.  This requires the use of the -rpath linker flag as the
libraries are no longer located in a standard search path.

discussed with: dillon, swildner

Makefile_upgrade.inc
etc/mtree/BSD.usr.dist
lib/libldns/Makefile
share/mk/bsd.libnames.mk
usr.bin/drill/Makefile

index 33b9413..89420da 100644 (file)
@@ -2278,6 +2278,8 @@ TO_REMOVE+=/usr/lib/profile/libedit.a
 TO_REMOVE+=/usr/lib/profile/libldns.a
 TO_REMOVE+=/usr/lib/profile/libssh.a
 TO_REMOVE+=/lib/libedit.so.5
+TO_REMOVE+=/usr/lib/libprivate_ldns.*
+TO_REMOVE+=/usr/lib/profile/libprivate_ldns.a
 
 .if !defined(WANT_INSTALLER)
 TO_REMOVE+=/usr/sbin/dfuibe_installer
index 63df7e1..323fa6f 100644 (file)
         ..
         i18n
         ..
+        priv
+            profile
+            ..
+        ..
         profile
         ..
         security
index 7442a74..a82eacf 100644 (file)
@@ -4,6 +4,8 @@ LDNS=           ${.CURDIR}/../../contrib/ldns
 
 LIB=           private_ldns
 SHLIB_MAJOR=   1
+SHLIBDIR?=     /usr/lib/priv
+PROFLIBDIR?=   ${SHLIBDIR}/profile
 
 SRCS  =                rdata.c util.c rr.c packet.c wire2host.c \
                host2str.c buffer.c str2host.c tsig.c resolver.c \
index deb4075..62a4c33 100644 (file)
@@ -45,7 +45,7 @@ LIBKICONV?=   ${DESTDIR}${LIBDIR}/libkiconv.a
 LIBKINFO?=     ${DESTDIR}${LIBDIR}/libkinfo.a
 LIBKVM?=       ${DESTDIR}${LIBDIR}/libkvm.a
 LIBL?=         ${DESTDIR}${LIBDIR}/libl.a
-LIBLDNS?=      ${DESTDIR}${LIBDIR}/libprivate_ldns.a
+LIBLDNS?=      ${DESTDIR}${LIBDIR}/priv/libprivate_ldns.a
 LIBLN?=                "don't use LIBLN, use LIBL"
 LIBLUKS?=      ${DESTDIR}${LIBDIR}/libluks.a
 LIBLVM?=       ${DESTDIR}${LIBDIR}/liblvm.a
index c7e11ac..77835ae 100644 (file)
@@ -10,5 +10,6 @@ WARNS?= 2
 LDADD+=        -lprivate_ldns -lcrypto
 DPADD+=        ${LIBLDNS} ${LIBCRYPTO}
 CFLAGS+=-I${.CURDIR} -I${LDNS} -I${LDNS}/drill -I${LDNSBASE}
+LDFLAGS+=      -rpath /usr/lib/priv
 
 .include <bsd.prog.mk>