From 9990264d87012d48e12b92280c0accdc937cf33a Mon Sep 17 00:00:00 2001 From: tron Date: Sat, 10 Mar 2001 15:26:15 +0000 Subject: Solve chicken and egg problem by using a bootstrap digest shell script used to verify the patch checksums of this package. --- pkgtools/digest/Makefile | 20 +++++++++++++------- pkgtools/digest/scripts/bootstrap-digest | 4 ++++ 2 files changed, 17 insertions(+), 7 deletions(-) create mode 100644 pkgtools/digest/scripts/bootstrap-digest (limited to 'pkgtools') diff --git a/pkgtools/digest/Makefile b/pkgtools/digest/Makefile index de26c8a80b5..cac5b46b80f 100644 --- a/pkgtools/digest/Makefile +++ b/pkgtools/digest/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.5 2001/03/10 11:18:09 tron Exp $ +# $NetBSD: Makefile,v 1.6 2001/03/10 15:26:15 tron Exp $ # # When adding new digest algorithms, please use rmd160 as the template, # and bump the VERSION definition. @@ -21,19 +21,25 @@ MANCOMPRESSED_IF_MANZ= YES PLIST_SRC= ${WRKDIR}/PLIST BUILD_DEFS+= MANINSTALL -MAKE_ENV+= BINDIR=${LOCALBASE}/bin MANDIR=${LOCALBASE}/man -MAKE_ENV+= CPPFLAGS="${CPPFLAGS} -DVERSION=${VERSION}" +DIGEST= ${WRKSRC}/bootstrap-digest +DIGEST_ALGORITHM= MD5 +MAKE_ENV+= BINDIR=${LOCALBASE}/bin MANDIR=${LOCALBASE}/man +MAKE_ENV+= CPPFLAGS="${CPPFLAGS} -DVERSION=${VERSION}" + +.include "../../mk/bsd.prefs.mk" + post-extract: - @for f in Makefile digest.c digest.1 \ + @for FILE in Makefile digest.c digest.1 \ md5c.c md5.h md5hl.c \ rmd160.c rmd160.h rmd160hl.c \ sha1.c sha1.h sha1hl.c \ ; do \ - ${CP} ${FILESDIR}/$$f ${WRKSRC}; \ + ${CP} ${FILESDIR}/$$FILE ${WRKSRC}; \ done - -.include "../../mk/bsd.prefs.mk" + @${SED} -e 's#$${PREFIX}#${PREFIX}#g' ${SCRIPTDIR}/bootstrap-digest \ + >${DIGEST} + @${CHMOD} +x ${DIGEST} pre-install: @${RM} -f ${PLIST_SRC} diff --git a/pkgtools/digest/scripts/bootstrap-digest b/pkgtools/digest/scripts/bootstrap-digest new file mode 100644 index 00000000000..e8cf09cce8e --- /dev/null +++ b/pkgtools/digest/scripts/bootstrap-digest @@ -0,0 +1,4 @@ +#!/bin/sh +PATH=/bin:/sbin:/usr/bin:${PREFIX}/bsd/bin; export PATH + +exec md5 -- cgit v1.2.3