xbps-triggers: use host utils if XBPS_TARGET_ARCH != host arch.

This commit is contained in:
Juan RP 2013-02-25 19:13:44 +01:00
parent 786d014ba9
commit 41ec5ed392
3 changed files with 19 additions and 2 deletions

View file

@ -31,6 +31,8 @@ run)
exit 1 exit 1
fi fi
HOSTARCH=$(uname -m)
for f in ${info_files}; do for f in ${info_files}; do
[ "$f" = "/usr/share/info/dir" ] && continue [ "$f" = "/usr/share/info/dir" ] && continue
@ -44,6 +46,10 @@ run)
;; ;;
esac esac
if [ "$XBPS_TARGET_ARCH" != "$HOST_ARCH" ]; then
# Use host utility
installinfo=install-info
fi
$installinfo $infoargs ./$f $infodir/dir 2>/dev/null $installinfo $infoargs ./$f $infodir/dir 2>/dev/null
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
echo "done." echo "done."

View file

@ -51,6 +51,17 @@ run)
exit 0 exit 0
fi fi
HOST_ARCH=$(uname -m)
if [ "$XBPS_TARGET_ARCH" != "$HOST_ARCH" ]; then
USERADD=useradd
USERDEL=userdel
GROUPADD=groupadd
GROUPDEL=groupdel
PASSWD=passwd
GETENT=getent
fi
case "$TARGET" in case "$TARGET" in
post-install) post-install)
# System groups required by a package. # System groups required by a package.

View file

@ -1,8 +1,8 @@
# Template file for 'xbps-triggers' # Template file for 'xbps-triggers'
pkgname=xbps-triggers pkgname=xbps-triggers
version=0.58 version=0.59
revision=1 revision=1
short_desc="XBPS triggers" short_desc="The XBPS triggers for Void Linux"
maintainer="Juan RP <xtraeme@gmail.com>" maintainer="Juan RP <xtraeme@gmail.com>"
homepage="http://code.google.com/p/xbps" homepage="http://code.google.com/p/xbps"
license="Simplified BSD" license="Simplified BSD"