Update to the new and brighter pkg world
This commit is contained in:
parent
bf1e95a21c
commit
efe3d4d7c9
@ -225,37 +225,49 @@ ports_build() (
|
|||||||
# Now build & install them
|
# Now build & install them
|
||||||
for p in `cat /tmp/_.plist`
|
for p in `cat /tmp/_.plist`
|
||||||
do
|
do
|
||||||
|
b=`echo $p | tr / _`
|
||||||
t=`echo $p | sed 's,/usr/ports/,,'`
|
t=`echo $p | sed 's,/usr/ports/,,'`
|
||||||
pn=`cd $p && make package-name`
|
pn=`cd $p && make package-name`
|
||||||
if [ "x${PKG_DIR}" != "x" -a -f ${PKG_DIR}/$pn.tbz ] ; then
|
|
||||||
|
if pkg info $pn > /dev/null 2>&1 ; then
|
||||||
|
log_it "Already installed: $t ($pn)"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "x$p" == "x/usr/ports/ports-mgmt/pkg" ] ; then
|
||||||
|
log_it "Very Special: $t ($pn)"
|
||||||
|
(
|
||||||
|
cd $p
|
||||||
|
make clean all install ${PORTS_OPTS}
|
||||||
|
) > _.$b 2>&1 < /dev/null
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "x${PKG_DIR}" != "x" -a -f ${PKG_DIR}/$pn.txz ] ; then
|
||||||
if [ "x$use_pkg" = "x-p" ] ; then
|
if [ "x$use_pkg" = "x-p" ] ; then
|
||||||
log_it "install $p from ${PKG_DIR}/$pn.tbz"
|
log_it "Install $t ($pn)"
|
||||||
pkg_add ${PKG_DIR}/$pn.tbz
|
(
|
||||||
|
set +e
|
||||||
|
pkg add ${PKG_DIR}/$pn.txz || true
|
||||||
|
) > _.$b 2>&1 < /dev/null
|
||||||
|
continue
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
i=`pkg_info -qO $t`
|
|
||||||
if [ -z "$i" ] ; then
|
log_it "build $pn ($p)"
|
||||||
log_it "build $p"
|
(
|
||||||
b=`echo $p | tr / _`
|
set +e
|
||||||
(
|
cd $p
|
||||||
set -x
|
make clean ${PORTS_OPTS}
|
||||||
cd /usr/ports
|
if make install ${PORTS_OPTS} ; then
|
||||||
cd $p
|
if [ "x${PKG_DIR}" != "x" ] ; then
|
||||||
set +e
|
make package ${PORTS_OPTS}
|
||||||
make clean ${PORTS_OPTS}
|
|
||||||
if make install ${PORTS_OPTS} ; then
|
|
||||||
if [ "x${PKG_DIR}" != "x" ] ; then
|
|
||||||
make package ${PORTS_OPTS}
|
|
||||||
mkdir -p ${PKG_DIR}
|
|
||||||
mv *.tbz ${PKG_DIR}
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
log_it FAIL build $p
|
|
||||||
fi
|
fi
|
||||||
make clean
|
else
|
||||||
) > _.$b 2>&1 < /dev/null
|
log_it FAIL build $p
|
||||||
date
|
fi
|
||||||
fi
|
make clean
|
||||||
|
) > _.$b 2>&1 < /dev/null
|
||||||
done
|
done
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -463,7 +475,7 @@ export PORTS_OPTS
|
|||||||
#######################################################################
|
#######################################################################
|
||||||
|
|
||||||
log_it Prepare destination partition
|
log_it Prepare destination partition
|
||||||
newfs -O2 -U /dev/${TARGET_PART} > /dev/null
|
newfs -t -E -O2 -U /dev/${TARGET_PART} > /dev/null
|
||||||
mount /dev/${TARGET_PART} ${SBMNT}
|
mount /dev/${TARGET_PART} ${SBMNT}
|
||||||
mkdir -p ${SBMNT}/dev
|
mkdir -p ${SBMNT}/dev
|
||||||
mount -t devfs devfs ${SBMNT}/dev
|
mount -t devfs devfs ${SBMNT}/dev
|
||||||
@ -564,7 +576,7 @@ sed "/[ ]\/[ ]/s;^[^ ]*[ ];/dev/${TARGET_PART} ;" \
|
|||||||
/etc/fstab > ${SBMNT}/etc/fstab
|
/etc/fstab > ${SBMNT}/etc/fstab
|
||||||
|
|
||||||
log_it build ports
|
log_it build ports
|
||||||
pwd
|
|
||||||
cp $0 ${SBMNT}/root
|
cp $0 ${SBMNT}/root
|
||||||
cp /tmp/_sb_log ${SBMNT}/tmp
|
cp /tmp/_sb_log ${SBMNT}/tmp
|
||||||
b=`basename $0`
|
b=`basename $0`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user