From 41ec5ed3924a6124a6bc3b0765d68bee622ff67b Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 25 Feb 2013 19:13:44 +0100 Subject: [PATCH] xbps-triggers: use host utils if XBPS_TARGET_ARCH != host arch. --- srcpkgs/xbps-triggers/files/info-files | 6 ++++++ srcpkgs/xbps-triggers/files/system-accounts | 11 +++++++++++ srcpkgs/xbps-triggers/template | 4 ++-- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/srcpkgs/xbps-triggers/files/info-files b/srcpkgs/xbps-triggers/files/info-files index aac27dcf0a1..96e2f6d4049 100755 --- a/srcpkgs/xbps-triggers/files/info-files +++ b/srcpkgs/xbps-triggers/files/info-files @@ -31,6 +31,8 @@ run) exit 1 fi + HOSTARCH=$(uname -m) + for f in ${info_files}; do [ "$f" = "/usr/share/info/dir" ] && continue @@ -44,6 +46,10 @@ run) ;; esac + if [ "$XBPS_TARGET_ARCH" != "$HOST_ARCH" ]; then + # Use host utility + installinfo=install-info + fi $installinfo $infoargs ./$f $infodir/dir 2>/dev/null if [ $? -eq 0 ]; then echo "done." diff --git a/srcpkgs/xbps-triggers/files/system-accounts b/srcpkgs/xbps-triggers/files/system-accounts index dc2e56d1471..7bed1538c0f 100755 --- a/srcpkgs/xbps-triggers/files/system-accounts +++ b/srcpkgs/xbps-triggers/files/system-accounts @@ -51,6 +51,17 @@ run) exit 0 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 post-install) # System groups required by a package. diff --git a/srcpkgs/xbps-triggers/template b/srcpkgs/xbps-triggers/template index 7ea68c3d08f..22ddbe9d6ba 100644 --- a/srcpkgs/xbps-triggers/template +++ b/srcpkgs/xbps-triggers/template @@ -1,8 +1,8 @@ # Template file for 'xbps-triggers' pkgname=xbps-triggers -version=0.58 +version=0.59 revision=1 -short_desc="XBPS triggers" +short_desc="The XBPS triggers for Void Linux" maintainer="Juan RP " homepage="http://code.google.com/p/xbps" license="Simplified BSD"