[BACK]Return to Makefile CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / security / bearssl

File: [cvs.NetBSD.org] / pkgsrc / security / bearssl / Makefile (download)

Revision 1.9, Fri Nov 27 19:52:11 2020 UTC (7 weeks, 3 days ago) by schmonz
Branch: MAIN
CVS Tags: pkgsrc-2020Q4-base, pkgsrc-2020Q4, HEAD
Changes since 1.8: +18 -12 lines

Quell packaging warning by installing the shlib with ${INSTALL_LIB}.

# $NetBSD: Makefile,v 1.9 2020/11/27 19:52:11 schmonz Exp $

DISTNAME=		bearssl-0.6
PKGREVISION=		1
CATEGORIES=		security
MASTER_SITES=		${HOMEPAGE}

MAINTAINER=		pkgsrc-users@NetBSD.org
HOMEPAGE=		https://bearssl.org/
COMMENT=		Implementation of the SSL/TLS protocol (RFC 5246)
LICENSE=		mit

INSTALLATION_DIRS=	bin include lib

LDFLAGS.SunOS+=		-lsocket -lnsl

OPSYSVARS+=		SOEXT
SOEXT.Darwin=		dylib
SOEXT.*=		so
PLIST_SUBST+=		SOEXT=${SOEXT}

pre-build:
	${MKDIR} ${WRKSRC}/build/obj

do-install:
	cd ${WRKSRC}/build && \
		${INSTALL_PROGRAM} brssl ${DESTDIR}${PREFIX}/bin
	cd ${WRKSRC}/inc && \
		${INSTALL_DATA} *.h ${DESTDIR}${PREFIX}/include
	cd ${WRKSRC}/build && \
		${INSTALL_DATA} libbearssl.a ${DESTDIR}${PREFIX}/lib && \
		${INSTALL_LIB} libbearssl.${SOEXT} ${DESTDIR}${PREFIX}/lib

do-test:
	cd ${WRKSRC} && \
		./build/testcrypto all && \
		./build/testspeed all && \
		./build/testx509

.include "../../mk/bsd.prefs.mk"

.if ${OPSYS} == "Darwin"

SUBST_CLASSES+=		dylib
SUBST_STAGE.dylib=	pre-configure
SUBST_FILES.dylib=	conf/Unix.mk
SUBST_SED.dylib=	-e 's|\.so|.dylib|g'

.PHONY: fix-darwin-install-name
post-install: fix-darwin-install-name
fix-darwin-install-name:
	for f in ${DESTDIR}${PREFIX}/lib/lib*.dylib; do \
	    install_name_tool -id `${ECHO} $$f | ${SED} -e 's,${DESTDIR},,g'` $$f; \
	done

.endif

.include "../../mk/bsd.pkg.mk"