Subject: moving md5 and patch-sum from files/ to pkg/
To: None <tech-pkg@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 03/15/2001 13:13:57
It seems like I read some discussion about this before.
Why don't we put the md5 and patch-sum files into a package source pkg/
directory instead of the files/ directory?
Then the files directory won't exist (unless really needed).
I have a simple patch below (which also adds one comment).
And I did a couple tests and it seems to work, such as:
make makesum
make patchsum
make
--- pkgsrc/mk/bsd.pkg.mk.orig Thu Mar 15 12:53:38 2001
+++ pkgsrc/mk/bsd.pkg.mk Thu Mar 15 13:10:15 2001
@@ -270,8 +270,8 @@
# Miscellaneous overridable commands:
SHCOMMENT?= ${ECHO_MSG} >/dev/null '***'
-DIGEST_FILE?= ${FILESDIR}/md5
-PATCH_SUM_FILE?= ${FILESDIR}/patch-sum
+DIGEST_FILE?= ${PKGDIR}/md5
+PATCH_SUM_FILE?= ${PKGDIR}/patch-sum
.if exists(/usr/bin/m4)
M4?= /usr/bin/m4
@@ -1512,6 +1512,7 @@
if [ "X$$fail" != "X" ]; then \
${ECHO_MSG} "Patching failed due to modified patch file(s): $$fail"; \
exit 1; \
+ else ${ECHO_MSG} "===> Checksum OK for patches"; \
fi; \
fi; \
fi
@@ -2445,7 +2446,7 @@
.if !target(makesum)
makesum: fetch uptodate-digest
- ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${FILESDIR}
+ ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${PKGDIR}
${_PKG_SILENT}${_PKG_DEBUG}if [ -f ${DIGEST_FILE} ]; then ${RM} -f ${DIGEST_FILE}; fi
@${ECHO} -n "$$" > ${DIGEST_FILE}; \
${ECHO} -n "NetBSD" >> ${DIGEST_FILE}; \
@@ -2466,7 +2467,7 @@
.if !target(makepatchsum)
makepatchsum mps: uptodate-digest
${_PKG_SILENT}${_PKG_DEBUG} \
- (${MKDIR} ${FILESDIR}; \
+ (${MKDIR} ${PKGDIR}; \
${ECHO_MSG} "${_PKGSRC_IN}> Making patch checksums"; \
if [ -f "${PATCH_SUM_FILE}" ]; then \
${AWK} -- '{print ; exit}' < ${PATCH_SUM_FILE} > ${PATCH_SUM_FILE}.new; \
Jeremy C. Reed
http://www.reedmedia.net/