diff options
author | asami <asami@FreeBSD.org> | 2000-12-18 09:54:19 +0800 |
---|---|---|
committer | asami <asami@FreeBSD.org> | 2000-12-18 09:54:19 +0800 |
commit | 4734ba64cfc3a8a920ec726b49588e0dbb674d8f (patch) | |
tree | 8fd9d59b40924b66f7ed055b6af8f0267e962ed4 /Tools/portbuild | |
parent | ca275f1673aad19ff5738cca6dfc9ac299ebdc94 (diff) | |
download | freebsd-ports-gnome-4734ba64cfc3a8a920ec726b49588e0dbb674d8f.tar.gz freebsd-ports-gnome-4734ba64cfc3a8a920ec726b49588e0dbb674d8f.tar.zst freebsd-ports-gnome-4734ba64cfc3a8a920ec726b49588e0dbb674d8f.zip |
Combine the scripts for building the bundist tarballs. The per-branch
specifics are in mkbindist.conf under ${portbuilddir}/${branch}.
Diffstat (limited to 'Tools/portbuild')
-rwxr-xr-x | Tools/portbuild/scripts/mkbindist | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/Tools/portbuild/scripts/mkbindist b/Tools/portbuild/scripts/mkbindist new file mode 100755 index 000000000000..82a36f5f0b08 --- /dev/null +++ b/Tools/portbuild/scripts/mkbindist @@ -0,0 +1,70 @@ +#!/bin/sh +here=$(pwd) +. ${here}/mkbindist.conf +chrootdir=/var/chroot +tmpdir=${here}/tmp +# just in case +umount -f ${tmpdir}/usr/src 2>/dev/null +rm -rf ${tmpdir} 2>/dev/null +if [ -d ${tmpdir} ]; then + chflags -R noschg ${tmpdir} + rm -rf ${tmpdir} +fi +mkdir -p ${tmpdir} +if [ "${ftp}" != 0 ]; then + rm -rf bindist/ftp + mkdir -p bindist/ftp + cd bindist/ftp + for i in ${ftpdists}; do + /usr/bin/ftp -a "ftp://${ftpserver}/pub/FreeBSD/snapshots/i386/${rel}/$i.??" + done + cd ${here} +fi +cd ${tmpdir} +if [ "${useworld}" = 1 ]; then + (cd ${chrootdir}; find -dx . | \ + grep -v -E '^./usr/(X11R6|local|obj|opt|ports|src)' | \ + grep -v '^./home' | \ + grep -v '^./var/db/pkg' | \ + cpio -dump ${tmpdir}) +else + for i in ${ftpdists}; do + cat ${here}/bindist/ftp/$(basename $i).?? | tar --unlink -xzpf - + done +fi +rm -rf $(cat ${here}/bindist/delete) +mkdir -p $(cat ${here}/bindist/dirlist) +(cd ${here}/bindist/files; find -dx . | cpio -dump ${tmpdir}) +#echo "HAVE_MOTIF=t" >> etc/make.conf +#echo "MOTIF_STATIC=t" >> etc/make.conf +#echo "LOADER_TFTP_SUPPORT=YES" >> etc/make.conf +date '+%Y%m%d' > var/db/port.mkversion +#if [ -f kernel.GENERIC -a ! -f kernel ]; then +# mv kernel.GENERIC kernel +#fi +rm -f kernel.GENERIC +rm -f /usr/lib/aout/lib*_p.a +mkdir ${tmpdir}/var/run +chroot ${tmpdir} /sbin/ldconfig /usr/lib +chroot ${tmpdir} /sbin/ldconfig -aout /usr/lib/aout +#sed -e "s/%%KERNEL%%/${kernel}/g" ${here}/dokernel > ${tmpdir}/dokernel +mount localhost:${here}/src ${tmpdir}/usr/src +sleep 5 +chroot ${tmpdir} sh -c "cd /usr/src/sys/i386/conf && config ${kernel} && cd /sys/compile/${kernel} && make depend && make all install" +#chroot ${tmpdir} sh -c "cd /usr/src/sys/boot && make obj && make depend && make all install" +umount -f ${tmpdir}/usr/src +rm -rf ${tmpdir}/kernel.old ${tmpdir}/modules.old ${tmpdir}/boot/kernel.old +if [ -f ${here}/src/etc/MAKEDEV ]; then + cp ${here}/src/etc/MAKEDEV ${tmpdir}/dev +else + cp ${here}/src/etc/etc.$(uname -m)/MAKEDEV ${tmpdir}/dev +fi +mkdir -p ${here}/tarballs +tar cf ${here}/tarballs/bindist.tar.new . +mv -f ${here}/tarballs/bindist.tar.new ${here}/tarballs/bindist.tar +cd ${here} +rm -rf ${tmpdir} 2>/dev/null +if [ -d ${tmpdir} ]; then + chflags -R noschg ${tmpdir} + rm -rf ${tmpdir} +fi |