[Openbsdbinpatch-misc] "combo" diff
Brought to you by:
convexo
From: Mike E. <mi...@er...> - 2008-04-21 18:53:41
|
Below is a diff to bsd.binpatch.mk that adds a "combo" target. It iterates through the binpatch packages <= ${PATCH} untarring them to a temporary location. Then creates an "upto${PATCH}" tarball. Thoughts? -ME --- bsd.binpatch.mk Mon Mar 31 01:40:25 2008 +++ bsd.binpatch.mk Mon Mar 31 01:51:57 2008 @@ -257,6 +257,26 @@ package: build @echo "|" @echo "+-------------------------" +${PACKAGEDIR}/${DISTNAME}-${ARCH}-upto${PATCH}.tgz: ${PACKAGEDIR}/${FULLPKGNAME}.tgz + @echo "===> Building combination package for ${PATCH}" + @rm -Rf ${.CURDIR}/.combo_pkg + @mkdir -p ${.CURDIR}/.combo_pkg + @count=0;\ + while [ $$count -lt ${PATCH} ]; do \ + count=`expr $$count + 1`;\ + mypkg=${DISTNAME}-${ARCH}-`printf "%03d\n" $$count`.tgz; \ + if [ -f ${PACKAGEDIR}/$$mypkg ]; then \ + echo "======> Extracting $$mypkg"; \ + tar -C ${.CURDIR}/.combo_pkg/ -xzphf ${PACKAGEDIR}/$$mypkg; \ + fi; \ + done + @echo "======> Creating ${DISTNAME}-${ARCH}-upto${PATCH}.tgz" + @tar -C ${WRKINST} -czpf ${PACKAGEDIR}/${DISTNAME}-${ARCH}-upto${PATCH}.tgz \ + `(cd ${.CURDIR}/.combo_pkg && find . -type f)` + @rm -Rf ${.CURDIR}/.combo_pkg + +combo: ${PACKAGEDIR}/${DISTNAME}-${ARCH}-upto${PATCH}.tgz + # Installs the binary patch install: tar xzpf ${PACKAGEDIR}/${FULLPKGNAME}.tgz -C / |