diff options
author | Linus Yang <laokongzi@gmail.com> | 2014-06-25 13:30:18 +0200 |
---|---|---|
committer | Memphiz <memphis@machzwo.de> | 2014-06-25 18:13:20 +0200 |
commit | d82db3effe66c264596bd21f7755074046059d0c (patch) | |
tree | 3e6db910223108658ca8f99cafe1eed86d7dce67 /tools/darwin | |
parent | 4a38632a9bef921ce0d45073da7176b7fae69fa9 (diff) |
[ios/packaging] - use fakeroot for packaging deb without root privileges
Diffstat (limited to 'tools/darwin')
-rw-r--r-- | tools/darwin/packaging/xbmc-atv2/mkdeb-xbmc-atv2.sh.in | 7 | ||||
-rw-r--r-- | tools/darwin/packaging/xbmc-ios/mkdeb-xbmc-ios.sh.in | 7 |
2 files changed, 10 insertions, 4 deletions
diff --git a/tools/darwin/packaging/xbmc-atv2/mkdeb-xbmc-atv2.sh.in b/tools/darwin/packaging/xbmc-atv2/mkdeb-xbmc-atv2.sh.in index ec15372fd9..486e449c33 100644 --- a/tools/darwin/packaging/xbmc-atv2/mkdeb-xbmc-atv2.sh.in +++ b/tools/darwin/packaging/xbmc-atv2/mkdeb-xbmc-atv2.sh.in @@ -32,7 +32,9 @@ if [ ! -d $XBMC ]; then echo "XBMC.frappliance not found! are you sure you built $1 target?" exit 1 fi -if [ -f "/usr/libexec/fauxsu/libfauxsu.dylib" ]; then +if [ -f "$XBMC_DEPENDS_ROOT/buildtools-native/bin/fakeroot" ]; then + SUDO="$XBMC_DEPENDS_ROOT/buildtools-native/bin/fakeroot" +elif [ -f "/usr/libexec/fauxsu/libfauxsu.dylib" ]; then export DYLD_INSERT_LIBRARIES=/usr/libexec/fauxsu/libfauxsu.dylib elif [ -f "/usr/bin/sudo" ]; then SUDO="/usr/bin/sudo" @@ -115,7 +117,8 @@ echo Packaging $PACKAGE export COPYFILE_DISABLE=true export COPY_EXTENDED_ATTRIBUTES_DISABLE=true # -dpkg-deb -b $DIRNAME/$PACKAGE $DIRNAME/$ARCHIVE +${SUDO} dpkg-deb -b $DIRNAME/$PACKAGE $DIRNAME/$ARCHIVE +${SUDO} chown 501:20 $DIRNAME/$ARCHIVE dpkg-deb --info $DIRNAME/$ARCHIVE dpkg-deb --contents $DIRNAME/$ARCHIVE diff --git a/tools/darwin/packaging/xbmc-ios/mkdeb-xbmc-ios.sh.in b/tools/darwin/packaging/xbmc-ios/mkdeb-xbmc-ios.sh.in index be99c0cb79..4a6a4c5d22 100644 --- a/tools/darwin/packaging/xbmc-ios/mkdeb-xbmc-ios.sh.in +++ b/tools/darwin/packaging/xbmc-ios/mkdeb-xbmc-ios.sh.in @@ -33,7 +33,9 @@ if [ ! -d $XBMC ]; then echo "XBMC.app not found! are you sure you built $1 target?" exit 1 fi -if [ -f "/usr/libexec/fauxsu/libfauxsu.dylib" ]; then +if [ -f "${XBMC_DEPENDS_ROOT}/buildtools-native/bin/fakeroot" ]; then + SUDO="${XBMC_DEPENDS_ROOT}/buildtools-native/bin/fakeroot" +elif [ -f "/usr/libexec/fauxsu/libfauxsu.dylib" ]; then export DYLD_INSERT_LIBRARIES=/usr/libexec/fauxsu/libfauxsu.dylib elif [ -f "/usr/bin/sudo" ]; then SUDO="/usr/bin/sudo" @@ -96,7 +98,8 @@ echo Packaging $PACKAGE export COPYFILE_DISABLE=true export COPY_EXTENDED_ATTRIBUTES_DISABLE=true # -dpkg-deb -b $DIRNAME/$PACKAGE $DIRNAME/$ARCHIVE +${SUDO} dpkg-deb -b $DIRNAME/$PACKAGE $DIRNAME/$ARCHIVE +${SUDO} chown 501:20 $DIRNAME/$ARCHIVE dpkg-deb --info $DIRNAME/$ARCHIVE dpkg-deb --contents $DIRNAME/$ARCHIVE |