Added a new conf option: XBPS_PACKAGESDIR.

This is to specify where to store the binary packages.

--HG--
extra : convert_revision : 16d810d058b78662a33d8492caf7981e0700808e
This commit is contained in:
Juan RP 2008-12-13 07:04:53 +01:00
parent 8df4138beb
commit e817d470ab
4 changed files with 17 additions and 7 deletions

View file

@ -100,13 +100,12 @@ _EOF
xbps_make_binpkg()
{
local destdir=$XBPS_DESTDIR/$pkgname-$version
local pkgsdir=$XBPS_DISTRIBUTIONDIR/packages
cd $destdir || exit 1
run_rootcmd tar cfjp $destdir-xbps.tbz2 .
[ ! -d $pkgsdir ] && mkdir -p $pkgsdir
mv -f $destdir-xbps.tbz2 $pkgsdir
[ ! -d $XBPS_PACKAGESDIR ] && mkdir -p $XBPS_PACKAGESDIR
mv -f $destdir-xbps.tbz2 $XBPS_PACKAGESDIR
echo "=> Built package: $pkgname-$version-xbps.tbz2."
}

View file

@ -61,7 +61,8 @@ else
msg_normal "Entering into the chroot on $XBPS_MASTERDIR."
fi
EXTDIRS="xbps xbps_builddir xbps_destdir xbps_srcdistdir xbps_crossdir"
EXTDIRS="xbps xbps_builddir xbps_destdir xbps_packagesdir \
xbps_srcdistdir xbps_crossdir"
REQDIRS="bin sbin tmp var sys proc dev ${EXTDIRS}"
for f in ${REQDIRS}; do
[ ! -d $XBPS_MASTERDIR/$f ] && mkdir -p $XBPS_MASTERDIR/$f
@ -71,6 +72,7 @@ unset f REQDIRS
echo "XBPS_DISTRIBUTIONDIR=/xbps" > $XBPS_MASTERDIR/etc/xbps.conf
echo "XBPS_MASTERDIR=/" >> $XBPS_MASTERDIR/etc/xbps.conf
echo "XBPS_DESTDIR=/xbps_destdir" >> $XBPS_MASTERDIR/etc/xbps.conf
echo "XBPS_PACKAGESDIR=/xbps_packagesdir" >> $XBPS_MASTERDIR/etc/xbps.conf
echo "XBPS_BUILDDIR=/xbps_builddir" >> $XBPS_MASTERDIR/etc/xbps.conf
echo "XBPS_SRCDISTDIR=/xbps_srcdistdir" >> $XBPS_MASTERDIR/etc/xbps.conf
echo "XBPS_CFLAGS=\"$XBPS_CFLAGS\"" >> $XBPS_MASTERDIR/etc/xbps.conf
@ -121,7 +123,8 @@ mount_chroot_fs()
{
local cnt=
REQFS="sys proc dev xbps xbps_builddir xbps_destdir xbps_srcdistdir"
REQFS="sys proc dev xbps xbps_builddir xbps_destdir \
xbps_packagesdir xbps_srcdistdir"
if [ -d "$XBPS_CROSS_DIR" ]; then
local cross=yes
REQFS="$REQFS xbps_crossdir"
@ -136,6 +139,7 @@ mount_chroot_fs()
xbps_builddir) blah=$XBPS_BUILDDIR;;
xbps_destdir) blah=$XBPS_DESTDIR;;
xbps_srcdistdir) blah=$XBPS_SRCDISTDIR;;
xbps_packagesdir) blah=$XBPS_PACKAGESDIR;;
xbps_crossdir)
[ -n $cross ] && blah=$XBPS_CROSS_DIR
;;

View file

@ -273,7 +273,7 @@ list_pkgs_in_dict(prop_dictionary_t dict)
prop_dictionary_get_cstring_nocopy(obj, "version", &version);
prop_dictionary_get_cstring_nocopy(obj, "short_desc", &short_desc);
if (pkgname && version && short_desc)
printf("%s-%s\t%s\n", pkgname, version, short_desc);
printf("%s (%s)\t%s\n", pkgname, version, short_desc);
}
prop_object_iterator_release(iter);
}

View file

@ -15,10 +15,17 @@ XBPS_DISTRIBUTIONDIR=$HOME/xbps
XBPS_MASTERDIR=$XBPS_DISTRIBUTIONDIR/depot
#
# Destination directory: this is where all packages will be installed.
# Destination directory: this is where all package files will be
# installed.
#
XBPS_DESTDIR=$XBPS_DISTRIBUTIONDIR/destdir
#
# Binary packages directory: this is where the binary packages will
# be created to.
#
XBPS_PACKAGESDIR=$XBPS_DISTRIBUTIONDIR/packages
#
# Directory where source files will be extracted to.
#