Date: Thu, 07 Dec 2006 22:22:13 -0800 From: Doug Barton <dougb@FreeBSD.org> To: Wesley Shields <wxs@atarininja.org> Cc: ports@freebsd.org Subject: Re: distfile belongs to? Message-ID: <45790495.6010403@FreeBSD.org> In-Reply-To: <45787EAD.4030104@FreeBSD.org> References: <45749998.3070308@FreeBSD.org> <20061204232125.GA42307@atarininja.org> <790a9fff0612050838s66c655fapfde80d4038f64ca2@mail.gmail.com> <20061205172803.GA51892@atarininja.org> <4575C568.70905@FreeBSD.org> <20061205194146.GC52966@atarininja.org> <20061205203120.GA53894@atarininja.org> <4575EBA8.3020601@FreeBSD.org> <BDBB52B0-3FB2-4C82-A507-4785183B3C1F@FreeBSD.org> <20061206014049.GA43656@atarininja.org> <20061207183103.GA73597@atarininja.org> <45787EAD.4030104@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --------------080806020304090104040301 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Doug Barton wrote: > Wesley Shields wrote: > >> Part 2 (the bsd.port.mk piece) is the patch posted by Doug with Ade's >> suggestions. > > You missed the second patch I sent with the ${file%:*} changes. One more for fun. :) I was looking through bsd.port.mk for another purpose tonight and came across ${ALLFILES}. Not only does it combine dist and patch files into one variable, it has the benefit of not adding the : stuff to the filenames in the first place. Learning as I go, Doug --------------080806020304090104040301 Content-Type: text/plain; name="package-distinfo.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="package-distinfo.diff" Index: bsd.port.mk =================================================================== RCS file: /usr/local/ncvs/ports/Mk/bsd.port.mk,v retrieving revision 1.544 diff -u -r1.544 bsd.port.mk --- bsd.port.mk 30 Sep 2006 19:25:45 -0000 1.544 +++ bsd.port.mk 8 Dec 2006 06:11:25 -0000 @@ -5395,11 +5395,20 @@ # files exist. .if !target(generate-plist) +.if defined(DIST_SUBDIR) +PDS= ${DIST_SUBDIR}/ +.endif generate-plist: @${ECHO_MSG} "===> Generating temporary packing list" @${MKDIR} `${DIRNAME} ${TMPPLIST}` @if [ ! -f ${DESCR} ]; then ${ECHO_CMD} "** Missing pkg-descr for ${PKGNAME}."; exit 1; fi @>${TMPPLIST} + @for file in ${ALLFILES}; do \ + distsize=`${GREP} "^SIZE (${PDS}$${file})" ${MD5_FILE} | ${CUT} -f4 -d' '`; \ + distsha256=`${GREP} "^SHA256 (${PDS}$${file})" ${MD5_FILE} | ${CUT} -f4 -d' '`; \ + distmd5=`${GREP} "^MD5 (${PDS}$${file})" ${MD5_FILE} | ${CUT} -f4 -d' '`; \ + ${ECHO_CMD} "@comment DISTFILE:${PDS}$${file}:SIZE=$${distsize}:SHA256=$${distsha256}:MD5=$${distmd5}" >> ${TMPPLIST}; \ + done @for file in ${PLIST_FILES}; do \ ${ECHO_CMD} $${file} | ${SED} ${PLIST_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} >> ${TMPPLIST}; \ done --------------080806020304090104040301--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?45790495.6010403>