Added support for using noarch packages.
--HG-- extra : convert_revision : a96166ddecb6efe65d35283f25e06a944cc4a038
This commit is contained in:
parent
4f6364a2bd
commit
6b6162bb44
10 changed files with 107 additions and 36 deletions
|
@ -32,6 +32,7 @@ xbps_write_metadata_pkg()
|
|||
local destdir=$XBPS_DESTDIR/$pkgname-$version
|
||||
local metadir=$destdir/var/db/xbps/metadata/$pkgname
|
||||
local prioinst=
|
||||
local arch=
|
||||
|
||||
if [ ! -d "$destdir" ]; then
|
||||
echo "ERROR: $pkgname not installed into destdir."
|
||||
|
@ -44,6 +45,12 @@ xbps_write_metadata_pkg()
|
|||
prioinst=0
|
||||
fi
|
||||
|
||||
if [ -n "$noarch" ]; then
|
||||
arch=noarch
|
||||
else
|
||||
arch=$xbps_machine
|
||||
fi
|
||||
|
||||
# Write the files list.
|
||||
local TMPFLIST=$(mktemp -t flist.XXXXXXXXXX) || exit 1
|
||||
# First add the regular files.
|
||||
|
@ -66,7 +73,7 @@ xbps_write_metadata_pkg()
|
|||
<key>version</key>
|
||||
<string>$version</string>
|
||||
<key>architecture</key>
|
||||
<string>$xbps_machine</string>
|
||||
<string>$arch</string>
|
||||
<key>priority</key>
|
||||
<integer>$prioinst</integer>
|
||||
<key>installed_size</key>
|
||||
|
@ -144,14 +151,24 @@ _EOF
|
|||
xbps_make_binpkg()
|
||||
{
|
||||
local destdir=$XBPS_DESTDIR/$pkgname-$version
|
||||
local binpkg=$pkgname-$version.$xbps_machine.xbps
|
||||
|
||||
local binpkg=
|
||||
local pkgdir=
|
||||
local arch=
|
||||
cd $destdir || exit 1
|
||||
|
||||
if [ -n "$noarch" ]; then
|
||||
arch=noarch
|
||||
else
|
||||
arch=$xbps_machine
|
||||
fi
|
||||
|
||||
binpkg=$pkgname-$version.$arch.xbps
|
||||
pkgdir=$XBPS_PACKAGESDIR/$arch
|
||||
|
||||
run_rootcmd tar cfjp $XBPS_DESTDIR/$binpkg .
|
||||
if [ $? -eq 0 ]; then
|
||||
[ ! -d $XBPS_PACKAGESDIR ] && mkdir -p $XBPS_PACKAGESDIR
|
||||
mv -f $XBPS_DESTDIR/$binpkg $XBPS_PACKAGESDIR
|
||||
[ ! -d $pkgdir ] && mkdir -p $pkgdir
|
||||
mv -f $XBPS_DESTDIR/$binpkg $pkgdir
|
||||
echo "=> Built package: $binpkg"
|
||||
fi
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue