Create binpkgs for meta-template packages.
--HG-- extra : convert_revision : fdf26fe45ee1b5ecb2d32a7e72e2b83c8ee02f5a
This commit is contained in:
parent
8df38b299b
commit
a31a003a63
4 changed files with 11 additions and 32 deletions
|
@ -62,6 +62,12 @@ xbps_write_metadata_pkg()
|
|||
<string>$(uname -m)</string>
|
||||
<key>installed_size</key>
|
||||
<integer>$(du -sb $destdir|awk '{print $1}')</integer>
|
||||
<key>maintainer</key>
|
||||
<string>$maintainer</string>
|
||||
<key>short_desc</key>
|
||||
<string>$short_desc</key>
|
||||
<key>long_desc</key>
|
||||
<string>$long_desc</string>
|
||||
_EOF
|
||||
# Dependencies
|
||||
if [ -n "$run_depends" ]; then
|
||||
|
|
|
@ -108,19 +108,6 @@ install_pkg()
|
|||
. $XBPS_SHUTILSDIR/install_funcs.sh
|
||||
install_src_phase
|
||||
|
||||
#
|
||||
# Just register meta-template and exit.
|
||||
#
|
||||
if [ "$build_style" = "meta-template" ]; then
|
||||
$XBPS_PKGDB_CMD register $pkgname $version "$short_desc"
|
||||
if [ $? -eq 0 ]; then
|
||||
msg_normal "Installed meta-template: $pkg."
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
# Do not stow package if it wasn't requested.
|
||||
#
|
||||
|
@ -162,15 +149,6 @@ remove_pkg()
|
|||
|
||||
. $XBPS_TEMPLATESDIR/$pkg.tmpl
|
||||
|
||||
#
|
||||
# If it's a meta-template, just unregister it from the db.
|
||||
#
|
||||
if [ "$build_style" = "meta-template" ]; then
|
||||
$XBPS_PKGDB_CMD unregister $pkgname $version
|
||||
[ $? -eq 0 ] && msg_normal "Removed meta-template: $pkg."
|
||||
return $?
|
||||
fi
|
||||
|
||||
ver=$($XBPS_PKGDB_CMD version $pkg)
|
||||
[ -z "$ver" ] && msg_error "$pkg is not installed."
|
||||
|
||||
|
|
|
@ -34,16 +34,17 @@ stow_pkg()
|
|||
|
||||
[ -z "$pkg" ] && return 2
|
||||
|
||||
if [ "$build_style" = "meta-template" ]; then
|
||||
[ ! -d $XBPS_DESTDIR/$pkgname-$version ] && \
|
||||
mkdir -p $XBPS_DESTDIR/$pkgname-$version
|
||||
fi
|
||||
|
||||
if [ -n "$stow_flag" ]; then
|
||||
pkg=$XBPS_TEMPLATESDIR/$pkg.tmpl
|
||||
if [ "$pkgname" != "$pkg" ]; then
|
||||
. $pkg
|
||||
fi
|
||||
pkg=$pkgname-$version
|
||||
#
|
||||
# You cannot stow a meta-template.
|
||||
#
|
||||
[ "$build_style" = "meta-template" ] && return 0
|
||||
fi
|
||||
|
||||
cd $XBPS_DESTDIR/$pkgname-$version || exit 1
|
||||
|
@ -103,11 +104,6 @@ unstow_pkg()
|
|||
msg_error "$pkg is not installed."
|
||||
fi
|
||||
|
||||
#
|
||||
# You cannot unstow a meta-template.
|
||||
#
|
||||
[ "$build_style" = "meta-template" ] && return 0
|
||||
|
||||
cd $XBPS_PKGMETADIR/$pkgname-$version || exit 1
|
||||
if [ ! -f flist ]; then
|
||||
msg_error "$pkg is incomplete, missing flist."
|
||||
|
|
1
xbps.sh
1
xbps.sh
|
@ -278,7 +278,6 @@ build-pkg)
|
|||
if [ "$2" = "all" ]; then
|
||||
for f in $($XBPS_PKGDB_CMD list|awk '{print $1}'); do
|
||||
setup_tmpl $f
|
||||
[ "$build_style" = "meta-template" ] && continue
|
||||
xbps_make_binpkg
|
||||
reset_tmpl_vars
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue