diff --git a/secure/Makefile b/secure/Makefile index b1683915b591..2ee6067cf6c8 100644 --- a/secure/Makefile +++ b/secure/Makefile @@ -4,7 +4,7 @@ SUBDIR= lib libexec usr.bin usr.sbin # These are programs which depend on crypto, but not Kerberos. SPROGS= bin/ed usr.sbin/ppp usr.sbin/pppd usr.sbin/tcpdump/tcpdump \ - lib/libfetch usr.bin/fetch \ + lib/libfetch usr.bin/fetch usr.sbin/pkg_install \ lib/libtelnet libexec/telnetd usr.bin/telnet .if !defined(NO_SENDMAIL) SPROGS+=usr.sbin/sendmail diff --git a/usr.sbin/pkg_install/Makefile b/usr.sbin/pkg_install/Makefile index f93fadbdcc33..ee4019b83749 100644 --- a/usr.sbin/pkg_install/Makefile +++ b/usr.sbin/pkg_install/Makefile @@ -1,10 +1,9 @@ # $FreeBSD$ -SUBDIR= lib add create delete info version +SUBDIR= lib add create delete info ${_sign} version .if !defined(NOCRYPT) && !defined(NO_OPENSSL) -DISTRIBUTION= crypto -SUBDIR+= sign +_sign= sign .endif .include diff --git a/usr.sbin/pkg_install/Makefile.inc b/usr.sbin/pkg_install/Makefile.inc index 6dc305d25a57..e6715ce30f38 100644 --- a/usr.sbin/pkg_install/Makefile.inc +++ b/usr.sbin/pkg_install/Makefile.inc @@ -6,6 +6,13 @@ LIBINSTALL= ${.OBJDIR}/../lib/libinstall.a LIBINSTALL= ${.CURDIR}/../lib/libinstall.a .endif +.if !defined(NOCRYPT) && !defined(NO_OPENSSL) && \ + defined(LDADD) && ${LDADD:M-lfetch} != "" +DISTRIBUTION= crypto +DPADD+= ${LIBSSL} ${LIBCRYPTO} +LDADD+= -lssl -lcrypto +.endif + # Inherit BINDIR from one level up. .if exists(${.CURDIR}/../../Makefile.inc) .include "${.CURDIR}/../../Makefile.inc" diff --git a/usr.sbin/pkg_install/add/Makefile b/usr.sbin/pkg_install/add/Makefile index 55c538827a51..b72511ad5304 100644 --- a/usr.sbin/pkg_install/add/Makefile +++ b/usr.sbin/pkg_install/add/Makefile @@ -10,9 +10,4 @@ WARNS?= 2 DPADD= ${LIBINSTALL} ${LIBFETCH} ${LIBMD} LDADD= ${LIBINSTALL} -lfetch -lmd -.if !defined(NOCRYPT) && !defined(NO_OPENSSL) -DPADD+= ${LIBSSL} ${LIBCRYPTO} -LDADD+= -lssl -lcrypto -.endif - .include diff --git a/usr.sbin/pkg_install/create/Makefile b/usr.sbin/pkg_install/create/Makefile index e6c252b209ac..59197697be50 100644 --- a/usr.sbin/pkg_install/create/Makefile +++ b/usr.sbin/pkg_install/create/Makefile @@ -10,9 +10,4 @@ WARNS?= 2 DPADD= ${LIBINSTALL} ${LIBMD} LDADD= ${LIBINSTALL} -lmd -.if !defined(NOCRYPT) && !defined(NO_OPENSSL) -DPADD+= ${LIBSSL} ${LIBCRYPTO} -LDADD+= -lssl -lcrypto -.endif - .include diff --git a/usr.sbin/pkg_install/delete/Makefile b/usr.sbin/pkg_install/delete/Makefile index 39bd1f457604..5c19dba945a7 100644 --- a/usr.sbin/pkg_install/delete/Makefile +++ b/usr.sbin/pkg_install/delete/Makefile @@ -10,9 +10,4 @@ WARNS?= 4 DPADD= ${LIBINSTALL} ${LIBMD} LDADD= ${LIBINSTALL} -lmd -.if !defined(NOCRYPT) && !defined(NO_OPENSSL) -DPADD+= ${LIBSSL} ${LIBCRYPTO} -LDADD+= -lssl -lcrypto -.endif - .include diff --git a/usr.sbin/pkg_install/info/Makefile b/usr.sbin/pkg_install/info/Makefile index 76f98645bf24..bc9001352873 100644 --- a/usr.sbin/pkg_install/info/Makefile +++ b/usr.sbin/pkg_install/info/Makefile @@ -10,9 +10,4 @@ WARNS?= 2 DPADD= ${LIBINSTALL} ${LIBFETCH} ${LIBMD} LDADD= ${LIBINSTALL} -lfetch -lmd -.if !defined(NOCRYPT) && !defined(NO_OPENSSL) -DPADD+= ${LIBSSL} ${LIBCRYPTO} -LDADD+= -lssl -lcrypto -.endif - .include diff --git a/usr.sbin/pkg_install/sign/Makefile b/usr.sbin/pkg_install/sign/Makefile index a7b354c69d2c..a8484417b92e 100644 --- a/usr.sbin/pkg_install/sign/Makefile +++ b/usr.sbin/pkg_install/sign/Makefile @@ -7,6 +7,7 @@ MLINKS= pkg_sign.1 pkg_check.1 SRCS= main.c check.c common.c gzip.c pgp_check.c pgp_sign.c \ sha1.c sign.c stand.c x509.c +DISTRIBUTION= crypto DPADD= ${LIBINSTALL} ${LIBCRYPTO} LDADD= ${LIBINSTALL} -lcrypto diff --git a/usr.sbin/pkg_install/version/Makefile b/usr.sbin/pkg_install/version/Makefile index 8a80e49e5d83..b097a3aae745 100644 --- a/usr.sbin/pkg_install/version/Makefile +++ b/usr.sbin/pkg_install/version/Makefile @@ -10,11 +10,6 @@ WARNS?= 2 DPADD= ${LIBINSTALL} ${LIBFETCH} ${LIBMD} LDADD= ${LIBINSTALL} -lfetch -lmd -.if !defined(NOCRYPT) && !defined(NO_OPENSSL) -DPADD+= ${LIBSSL} ${LIBCRYPTO} -LDADD+= -lssl -lcrypto -.endif - test: ./test-pkg_version.sh