.if defined(__MINIX)
${MAKEDIRTARGET} releasetools do-hdboot
.endif # defined(__MINIX)
-.if defined(DESTDIR) && ${DESTDIR} != "" && ${DESTDIR} != "/"
+.if defined(DESTDIR) && ${DESTDIR} != "" && ${DESTDIR} != "/" && ${CHECKFLIST:Uyes} == "yes"
${MAKEDIRTARGET} . postinstall-fix-obsolete
${MAKEDIRTARGET} distrib/sets checkflist
.endif
libexec d--755 0 0
- ld.elf_so ---755 0 0 /libexec/ld.elf_so
+ ld.elf_so ---755 0 0 /usr/libexec/ld.elf_so
$
usr d--755 0 0
lib d--755 0 0
- libc.so.0 ---755 0 0 /lib/libc.so.0
- libminlib.so.0 ---755 0 0 /lib/libminlib.so.0
- libcompat_minix.so.0 ---755 0 0 /lib/libcompat_minix.so.0
- libterminfo.so.0 ---755 0 0 /lib/libterminfo.so.0
+ libc.so.0 ---755 0 0 /usr/lib/libc.so.0
+ libminlib.so.0 ---755 0 0 /usr/lib/libminlib.so.0
+ libcompat_minix.so.0 ---755 0 0 /usr/lib/libcompat_minix.so.0
+ libterminfo.so.0 ---755 0 0 /usr/lib/libterminfo.so.0
$
$
# make bootable and place system images
bootable:
- exec su root mkboot bootable
+ exec su root mkboot bootable ${DESTDIR}
hdboot: services .WAIT do-hdboot
@if [ "${MKINSTALLBOOT:Uno}" != "no" ] ; then \
${STRIP} -s ${DESTDIR}/boot/minix/.temp/* ; \
gzip ${DESTDIR}/boot/minix/.temp/mod* ; \
- ${HOST_SH} mkboot hdboot; \
+ ${HOST_SH} mkboot hdboot ${DESTDIR}; \
${HOST_SH} ../commands/update_bootcfg/update_bootcfg.sh;\
else \
${INSTALL_DIR} ${DESTDIR}/multiboot; \
+++ /dev/null
-#!/bin/sh
-set -e
-export SHELL=/bin/sh
-cd /usr/src
-
-if [ $# -gt 0 ]
-then make $@
- exit $?
-fi
-make world
-cp /usr/mdec/boot_monitor /
-cp /boot/minix_latest/* /boot/minix_default/
-
-if [ $MAKEMAP -ne 0 ]; then
- find . -type f -perm 755 | xargs nm -n 2> /dev/null > symbols.txt
-fi
-make clean cleandepend
# Author: Kees J. Bot
usage() {
- echo "Usage: $0 [bootable | hdboot]" >&2
+ echo "Usage: $0 [bootable | hdboot] [DESTDIR]" >&2
exit 1
}
trap 'e=$?; rm -f /tmp/mkb.$$; exit $e' 0 2
mdec=/usr/mdec # bootstraps
-
+# If no DESTDIR specified, then act on / or on the current chroot
+DESTDIR=
# Check arguments.
case "$#:$1" in
1:bootable | 1:hdboot )
- action=$1 dev=$2 size=$3
+ # LSC Broken, if $# == 1, then $2,$3 are not set...
+ action=$1
+ ;;
+2:bootable | 2:hdboot )
+ action=$1 DESTDIR=$2
;;
*) usage
esac
target="${version}${rrevision}${gitrev}"
- rotate_oldest "$rootdir/boot/minix"
+ rotate_oldest "$DESTDIR/boot/minix"
# rotate system processes. We assume latest ones are in
# /boot/modules/.temp and we maintain /boot/modules/ by ourselves.
- [ -d /boot/minix/.temp ] || exit 1
- rm -rf /boot/minix/"$target"/
- mv /boot/minix/.temp /boot/minix/"$target"
- rm -f /boot/minix_latest
- ln -s minix/"$target" /boot/minix_latest
+ [ -d $DESTDIR/boot/minix/.temp ] || exit 1
+ rm -rf $DESTDIR/boot/minix/"$target"/
+ mv $DESTDIR/boot/minix/.temp $DESTDIR/boot/minix/"$target"
+ rm -f $DESTDIR/boot/minix_latest
+ ln -s minix/"$target" $DESTDIR/boot/minix_latest
# Save the revision number.
test "$revision" != "$oldrev" && echo $revision >revision
# SVN trunk repo
TRUNK=https://gforge.cs.vu.nl/svn/minix/trunk
-RELEASEDIR=/usr/r-staging
+export RELEASEDIR=/usr/r-staging
RELEASEMNTDIR=/usr/r
RELEASEPACKAGE=${RELEASEDIR}/usr/install/packages
fi
else
echo "Copying contents from current src dir."
- ( cd .. && make depend && make clean )
+ ( cd .. && make cleandir )
srcdir=/usr/$SRC
( cd $srcdir && tar --exclude .svn -cf - . ) | ( cd $RELEASEDIR/usr && mkdir $SRC && cd $SRC && tar xf - )
REVTAG=copy
cp $RELEASEDIR/usr/src/share/mk/* $RELEASEDIR/usr/share/mk/
chown -R root $RELEASEDIR/usr/share/mk
rm -f $RELEASEDIR/usr/$SRC/releasetools/revision
-cp chrootmake.sh $RELEASEDIR/usr/$SRC/releasetools/chrootmake.sh
mkdir -p $RELEASEDIR/etc
cp $RELEASEDIR/usr/src/etc/group $RELEASEDIR/etc
echo " * Make hierarchy"
-sh -c "$LD_LIB chroot $RELEASEDIR sh -c \"$BUILDENV sh -x /usr/$SRC/releasetools/chrootmake.sh etcfiles\"" || exit 1
for p in $PREINSTALLED_PACKAGES
do echo " * Pre-installing: $p from $PKG_ADD_URL"
echo " * Resetting timestamps"
find $RELEASEDIR | xargs touch
-echo " * Chroot build"
-sh -c "$LD_LIB MAKEMAP=$MAKEMAP chroot $RELEASEDIR sh -c \"$BUILDENV sh -x /usr/$SRC/releasetools/chrootmake.sh\"" || exit 1
+echo " * Build"
+
+cd $RELEASEDIR/usr/src
+make distribution DESTDIR=$RELEASEDIR CHECKFLIST=no
+make -C releasetools do-hdboot DESTDIR=$RELEASEDIR MKINSTALLBOOT=yes
+cp $RELEASEDIR/usr/mdec/boot_monitor $RELEASEDIR
+cp $RELEASEDIR/boot/minix_latest/* $RELEASEDIR/boot/minix_default/
+
+if [ $MAKEMAP -ne 0 ]; then
+ find . -type f -perm 755 | xargs nm -n 2> /dev/null > symbols.txt
+fi
+make cleandir
+
+cd -
+
echo " * Chroot build done"
echo " * Removing bootstrap files"
rm -rf $RELEASEDIR/$XBIN
.if ${HOST_OSTYPE:C/\-.*//:U} == "Minix"
HOST_CPP?= /usr/lib/cpp
+HOST_LDFLAGS?= -static
.endif
.if ${MKREPRO:Uno} == "yes"