[darwin] fix building from user set prefix path. move XBMC_DEPENDS_ROOT to xconfig...
authorS. Davilla <davilla@4pi.com>
Sun, 18 May 2014 18:48:56 +0000 (14:48 -0400)
committerS. Davilla <davilla@4pi.com>
Sun, 18 May 2014 20:10:32 +0000 (16:10 -0400)
13 files changed:
.gitignore
XBMC.xcodeproj/project.pbxproj
configure.in
tools/buildsteps/atv2/package
tools/buildsteps/ios/package
tools/darwin/Configurations/App.xcconfig [deleted file]
tools/darwin/Configurations/App.xcconfig.in [new file with mode: 0644]
tools/darwin/Configurations/Common.xcconfig [deleted file]
tools/darwin/Configurations/Common.xcconfig.in [new file with mode: 0644]
tools/darwin/packaging/xbmc-atv2/mkdeb-xbmc-atv2.sh [deleted file]
tools/darwin/packaging/xbmc-atv2/mkdeb-xbmc-atv2.sh.in [new file with mode: 0644]
tools/darwin/packaging/xbmc-ios/mkdeb-xbmc-ios.sh [deleted file]
tools/darwin/packaging/xbmc-ios/mkdeb-xbmc-ios.sh.in [new file with mode: 0644]

index ee92758..2e14583 100644 (file)
@@ -516,6 +516,12 @@ lib/cpluff/stamp-h1
 /tools/EventClients/Clients/OSXRemote/build/
 /tools/EventClients/Clients/WiiRemote/WiiRemote
 
+# /tools/darwin/
+/tools/darwin/Configurations/App.xcconfig
+/tools/darwin/Configurations/Common.xcconfig
+/tools/darwin/packaging/xbmc-ios/mkdeb-xbmc-ios.sh
+/tools/darwin/packaging/xbmc-atv2/mkdeb-xbmc-atv2.sh
+
 # /tools/Linux/
 /tools/Linux/xbmc.sh
 /tools/Linux/xbmc-standalone.sh
index 0f052a7..5e32a35 100644 (file)
                                USE_HEADERMAP = NO;
                                WARNING_CFLAGS = "";
                                XBMC_DEPENDS = "$(XBMC_DEPENDS_ROOT)/$(SDK_NAME)_$(CURRENT_ARCH)-target";
-                               XBMC_DEPENDS_ROOT = "/Users/Shared/xbmc-depends";
                                ZERO_LINK = NO;
                        };
                        name = Debug;
                                USE_HEADERMAP = NO;
                                WARNING_CFLAGS = "";
                                XBMC_DEPENDS = "$(XBMC_DEPENDS_ROOT)/$(SDK_NAME)_$(CURRENT_ARCH)-target";
-                               XBMC_DEPENDS_ROOT = "/Users/Shared/xbmc-depends";
                                ZERO_LINK = NO;
                        };
                        name = Release;
                                PRODUCT_NAME = XBMC.app;
                                SDKROOT = macosx;
                                XBMC_DEPENDS = "$(XBMC_DEPENDS_ROOT)/$(SDK_NAME)_$(CURRENT_ARCH)-target";
-                               XBMC_DEPENDS_ROOT = "/Users/Shared/xbmc-depends";
                        };
                        name = Debug;
                };
                                PRODUCT_NAME = XBMC.app;
                                SDKROOT = macosx;
                                XBMC_DEPENDS = "$(XBMC_DEPENDS_ROOT)/$(SDK_NAME)_$(CURRENT_ARCH)-target";
-                               XBMC_DEPENDS_ROOT = "/Users/Shared/xbmc-depends";
                                ZERO_LINK = NO;
                        };
                        name = Release;
                                VALID_ARCHS = armv7;
                                WRAPPER_EXTENSION = frappliance;
                                XBMC_DEPENDS = "$(XBMC_DEPENDS_ROOT)/$(SDK_NAME)_$(CURRENT_ARCH)-target";
-                               XBMC_DEPENDS_ROOT = "/Users/Shared/xbmc-depends";
                        };
                        name = Debug;
                };
                                VALID_ARCHS = armv7;
                                WRAPPER_EXTENSION = frappliance;
                                XBMC_DEPENDS = "$(XBMC_DEPENDS_ROOT)/$(SDK_NAME)_$(ARCHS)-target";
-                               XBMC_DEPENDS_ROOT = "/Users/Shared/xbmc-depends";
                                ZERO_LINK = NO;
                        };
                        name = Release;
index 3c026ea..8adde48 100644 (file)
@@ -626,11 +626,15 @@ case $host in
      PYTHON_CPPFLAGS="-I${prefix}/include/python2.6"
      PYTHON_SITE_PKG="${prefix}/lib/python2.6/site-packages"
      PYTHON_NOVERSIONCHECK="no-check"
+     DEPENDS_ROOT_FOR_XCODE=$(echo ${prefix%/*})
+     AC_SUBST([DEPENDS_ROOT_FOR_XCODE])
      ;;
   *86*-apple-darwin*)
      use_joystick=no
      use_vtbdecoder=no
      ARCH="x86-osx"
+     DEPENDS_ROOT_FOR_XCODE=$(echo ${prefix%/*})
+     AC_SUBST([DEPENDS_ROOT_FOR_XCODE])
      ;;
   powerpc-apple-darwin*)
      use_joystick=no
@@ -638,6 +642,8 @@ case $host in
      use_crystalhd=no
      ARCH="powerpc-osx"
      use_arch="ppc"
+     DEPENDS_ROOT_FOR_XCODE=$(echo ${prefix%/*})
+     AC_SUBST([DEPENDS_ROOT_FOR_XCODE])
      ;;
   powerpc-*-linux-gnu*|powerpc-*-linux-uclibc*)
      ARCH="powerpc-linux"
@@ -2558,6 +2564,10 @@ OUTPUT_FILES="Makefile \
     xbmc/android/jni/Makefile \
     xbmc/utils/Makefile \
     xbmc/main/Makefile \
+    tools/darwin/Configurations/App.xcconfig \
+    tools/darwin/Configurations/Common.xcconfig \
+    tools/darwin/packaging/xbmc-ios/mkdeb-xbmc-ios.sh \
+    tools/darwin/packaging/xbmc-atv2/mkdeb-xbmc-atv2.sh \
     project/cmake/xbmc-config.cmake"
 
 if test "$use_wayland" = "yes"; then
index d357e36..2fa40de 100755 (executable)
@@ -5,7 +5,7 @@ XBMC_PLATFORM_DIR=atv2
 #ensure that dpkg tools are used from our toolchain
 export PATH=$XBMC_DEPENDS_ROOT/buildtools-native/bin/:$PATH
 
-cd $WORKSPACE/tools/darwin/packaging/xbmc-atv2/;./mkdeb-xbmc-atv2.sh $Configuration
+cd $WORKSPACE/tools/darwin/packaging/xbmc-atv2/;sh mkdeb-xbmc-atv2.sh $Configuration
 
 #rename for upload
 #e.x. xbmc-20130314-8c2fb31-Frodo-atv2.deb
index 0b4830d..f6c9c22 100755 (executable)
@@ -5,7 +5,7 @@ XBMC_PLATFORM_DIR=ios
 #ensure that dpkg tools are used from our toolchain
 export PATH=$XBMC_DEPENDS_ROOT/buildtools-native/bin/:$PATH
 
-cd $WORKSPACE/tools/darwin/packaging/xbmc-ios/;./mkdeb-xbmc-ios.sh $Configuration
+cd $WORKSPACE/tools/darwin/packaging/xbmc-ios/;sh mkdeb-xbmc-ios.sh $Configuration
 
 #rename for upload
 #e.x. xbmc-20130314-8c2fb31-Frodo-ios.deb
diff --git a/tools/darwin/Configurations/App.xcconfig b/tools/darwin/Configurations/App.xcconfig
deleted file mode 100644 (file)
index e55bd4f..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-//
-//      Copyright (C) 2012-2013 Team XBMC
-//      http://xbmc.org
-//
-//  This Program is free software; you can redistribute it and/or modify
-//  it under the terms of the GNU General Public License as published by
-//  the Free Software Foundation; either version 2, or (at your option)
-//  any later version.
-//
-//  This Program is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-//  GNU General Public License for more details.
-//
-//  You should have received a copy of the GNU General Public License
-//  along with XBMC; see the file COPYING.  If not, see
-//  <http://www.gnu.org/licenses/>.
-//
-//
-
-XBMC_DEPENDS_ROOT = /Users/Shared/xbmc-depends
-
-HEADER_SEARCH_PATHS = $(inherited) $SRCROOT xbmc xbmc/linux xbmc/osx xbmc/cores/dvdplayer lib $XBMC_DEPENDS/include $XBMC_DEPENDS/include/libcec $XBMC_DEPENDS/include/mysql $XBMC_DEPENDS/include/freetype2 $XBMC_DEPENDS/include/python2.6
-
-LIBRARY_SEARCH_PATHS = $(inherited) $(SRCROOT) $(SRCROOT)/lib/libRTV $(SRCROOT)/lib/libXDAAP $(SRCROOT)/lib/cmyth/libcmyth $(SRCROOT)/lib/cmyth/librefmem $(SRCROOT)/lib/libsquish $(SRCROOT)/lib/SlingboxLib $(SRCROOT)/xbmc/interfaces/json-rpc "$(SRCROOT)/xbmc/interfaces/python" "$(SRCROOT)/xbmc/interfaces/legacy"
-FRAMEWORK_SEARCH_PATHS = $(inherited) "$(SDKROOT)/System/Library/PrivateFrameworks/" "$(SDKROOT)/System/Library/Frameworks/"
-
-XBMC_OTHER_LDFLAGS_COMMON = $(inherited) -Wl,-headerpad_max_install_names -Wl,-all_load -L$XBMC_DEPENDS/lib -lbz2 -lintl -lexpat -lssl -lgpg-error -lresolv -lffi -lssh -llzo2 -lpcre -lpcrecpp -lfribidi -lfreetype -lfontconfig -lsqlite3 -ltinyxml -lmicrohttpd -lsmbclient -lpython2.6 -lyajl -ljpeg -lcrypto -lgcrypt -lavdevice -lavfilter -lavcodec -lavformat -lpostproc -lavutil -lswresample -lswscale -ltag -L$XBMC_DEPENDS/lib/mysql -lmysqlclient -lxml2 -lxslt
-
-
diff --git a/tools/darwin/Configurations/App.xcconfig.in b/tools/darwin/Configurations/App.xcconfig.in
new file mode 100644 (file)
index 0000000..936815c
--- /dev/null
@@ -0,0 +1,30 @@
+//
+//      Copyright (C) 2012-2013 Team XBMC
+//      http://xbmc.org
+//
+//  This Program is free software; you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation; either version 2, or (at your option)
+//  any later version.
+//
+//  This Program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with XBMC; see the file COPYING.  If not, see
+//  <http://www.gnu.org/licenses/>.
+//
+//
+
+XBMC_DEPENDS_ROOT = @DEPENDS_ROOT_FOR_XCODE@
+
+HEADER_SEARCH_PATHS = $(inherited) $SRCROOT xbmc xbmc/linux xbmc/osx xbmc/cores/dvdplayer lib $XBMC_DEPENDS/include $XBMC_DEPENDS/include/libcec $XBMC_DEPENDS/include/mysql $XBMC_DEPENDS/include/freetype2 $XBMC_DEPENDS/include/python2.6
+
+LIBRARY_SEARCH_PATHS = $(inherited) $(SRCROOT) $(SRCROOT)/lib/libRTV $(SRCROOT)/lib/libXDAAP $(SRCROOT)/lib/cmyth/libcmyth $(SRCROOT)/lib/cmyth/librefmem $(SRCROOT)/lib/libsquish $(SRCROOT)/lib/SlingboxLib $(SRCROOT)/xbmc/interfaces/json-rpc "$(SRCROOT)/xbmc/interfaces/python" "$(SRCROOT)/xbmc/interfaces/legacy"
+FRAMEWORK_SEARCH_PATHS = $(inherited) "$(SDKROOT)/System/Library/PrivateFrameworks/" "$(SDKROOT)/System/Library/Frameworks/"
+
+XBMC_OTHER_LDFLAGS_COMMON = $(inherited) -Wl,-headerpad_max_install_names -Wl,-all_load -L$XBMC_DEPENDS/lib -lbz2 -lintl -lexpat -lssl -lgpg-error -lresolv -lffi -lssh -llzo2 -lpcre -lpcrecpp -lfribidi -lfreetype -lfontconfig -lsqlite3 -ltinyxml -lmicrohttpd -lsmbclient -lpython2.6 -lyajl -ljpeg -lcrypto -lgcrypt -lavdevice -lavfilter -lavcodec -lavformat -lpostproc -lavutil -lswresample -lswscale -ltag -L$XBMC_DEPENDS/lib/mysql -lmysqlclient -lxml2 -lxslt
+
+
diff --git a/tools/darwin/Configurations/Common.xcconfig b/tools/darwin/Configurations/Common.xcconfig
deleted file mode 100644 (file)
index 353d798..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-//
-//      Copyright (C) 2012-2013 Team XBMC
-//      http://xbmc.org
-//
-//  This Program is free software; you can redistribute it and/or modify
-//  it under the terms of the GNU General Public License as published by
-//  the Free Software Foundation; either version 2, or (at your option)
-//  any later version.
-//
-//  This Program is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-//  GNU General Public License for more details.
-//
-//  You should have received a copy of the GNU General Public License
-//  along with XBMC; see the file COPYING.  If not, see
-//  <http://www.gnu.org/licenses/>.
-//
-//
-
-XBMC_GCC_PREPROCESSOR_DEFINITIONS_COMMON = TARGET_POSIX TARGET_DARWIN _LINUX _REENTRANT _FILE_DEFINED _FILE_OFFSET_BITS=64 _LARGEFILE64_SOURCE __STDC_CONSTANT_MACROS HAVE_CONFIG_H HAS_SPC_CODEC NPT_CONFIG_ENABLE_LOGGING
-
-DEBUG_INFORMATION_FORMAT = dwarf-with-dsym
diff --git a/tools/darwin/Configurations/Common.xcconfig.in b/tools/darwin/Configurations/Common.xcconfig.in
new file mode 100644 (file)
index 0000000..e8b0db1
--- /dev/null
@@ -0,0 +1,25 @@
+//
+//      Copyright (C) 2012-2013 Team XBMC
+//      http://xbmc.org
+//
+//  This Program is free software; you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation; either version 2, or (at your option)
+//  any later version.
+//
+//  This Program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with XBMC; see the file COPYING.  If not, see
+//  <http://www.gnu.org/licenses/>.
+//
+//
+
+XBMC_DEPENDS_ROOT = @DEPENDS_ROOT_FOR_XCODE@
+
+XBMC_GCC_PREPROCESSOR_DEFINITIONS_COMMON = TARGET_POSIX TARGET_DARWIN _LINUX _REENTRANT _FILE_DEFINED _FILE_OFFSET_BITS=64 _LARGEFILE64_SOURCE __STDC_CONSTANT_MACROS HAVE_CONFIG_H HAS_SPC_CODEC NPT_CONFIG_ENABLE_LOGGING
+
+DEBUG_INFORMATION_FORMAT = dwarf-with-dsym
diff --git a/tools/darwin/packaging/xbmc-atv2/mkdeb-xbmc-atv2.sh b/tools/darwin/packaging/xbmc-atv2/mkdeb-xbmc-atv2.sh
deleted file mode 100755 (executable)
index 9a1e262..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
-#!/bin/sh
-# usage: ./mkdeb-xbmc-atv2.sh release/debug (case insensitive)
-# Allows us to run mkdeb-xbmc-atv2.sh from anywhere in the three, rather than the tools/darwin/packaging/xbmc-atv2 folder only
-SWITCH=`echo $1 | tr [A-Z] [a-z]`
-DIRNAME=`dirname $0`
-DSYM_TARGET_DIR=/Users/Shared/xbmc-depends/dSyms
-DSYM_FILENAME=XBMC.frappliance.dSYM
-
-if [ ${SWITCH:-""} = "debug" ]; then
-  echo "Packaging Debug target for ATV2"
-  XBMC="$DIRNAME/../../../../build/Debug-iphoneos/XBMC.frappliance"
-  DSYM="$DIRNAME/../../../../build/Debug-iphoneos/$DSYM_FILENAME"
-elif [ ${SWITCH:-""} = "release" ]; then
-  echo "Packaging Release target for ATV2"
-  XBMC="$DIRNAME/../../../../build/Release-iphoneos/XBMC.frappliance"
-  DSYM="$DIRNAME/../../../../build/Release-iphoneos/$DSYM_FILENAME"  
-  echo $XBMC
-else
-  echo "You need to specify the build target"
-  exit 1 
-fi 
-
-#copy bzip2 of dsym to xbmc-depends install dir
-if [ -d $DSYM ]; then
-  if [ -d $DSYM_TARGET_DIR ]; then
-    tar -C $DSYM/.. -c $DSYM_FILENAME/ | bzip2 > $DSYM_TARGET_DIR/`$DIRNAME/../gitrev-posix`-${DSYM_FILENAME}.tar.bz2
-  fi
-fi
-
-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
-  export DYLD_INSERT_LIBRARIES=/usr/libexec/fauxsu/libfauxsu.dylib
-elif [ -f "/usr/bin/sudo" ]; then
-  SUDO="/usr/bin/sudo"
-fi
-if [ -f "/Users/Shared/xbmc-depends/buildtools-native/bin/dpkg-deb" ]; then
-  # make sure we pickup our tar, gnutar will fail when dpkg -i
-  bin_path=$(cd /Users/Shared/xbmc-depends/buildtools-native/bin; pwd)
-  export PATH=${bin_path}:${PATH}
-fi
-
-PACKAGE=org.xbmc.xbmc-atv2
-
-VERSION=14.0
-REVISION=0~alpha1
-ARCHIVE=${PACKAGE}_${VERSION}-${REVISION}_iphoneos-arm.deb
-
-echo Creating $PACKAGE package version $VERSION revision $REVISION
-${SUDO} rm -rf $DIRNAME/$PACKAGE
-${SUDO} rm -rf $DIRNAME/$ARCHIVE
-
-# create debian control file.
-mkdir -p $DIRNAME/$PACKAGE/DEBIAN
-echo "Package: $PACKAGE"                          >  $DIRNAME/$PACKAGE/DEBIAN/control
-echo "Priority: Extra"                            >> $DIRNAME/$PACKAGE/DEBIAN/control
-echo "Name: XBMC-ATV2"                            >> $DIRNAME/$PACKAGE/DEBIAN/control
-echo "Depends: curl, org.awkwardtv.whitelist, com.nito.updatebegone, org.xbmc.xbmc-seatbeltunlock" >> $DIRNAME/$PACKAGE/DEBIAN/control
-echo "Version: $VERSION-$REVISION"                >> $DIRNAME/$PACKAGE/DEBIAN/control
-echo "Architecture: iphoneos-arm"                 >> $DIRNAME/$PACKAGE/DEBIAN/control
-echo "Description: XBMC Multimedia Center for AppleTV 2" >> $DIRNAME/$PACKAGE/DEBIAN/control
-echo "Homepage: http://xbmc.org/"                 >> $DIRNAME/$PACKAGE/DEBIAN/control
-echo "Maintainer: Scott Davilla, Edgar Hucek"     >> $DIRNAME/$PACKAGE/DEBIAN/control
-echo "Author: TeamXBMC"                           >> $DIRNAME/$PACKAGE/DEBIAN/control
-echo "Section: Multimedia"                        >> $DIRNAME/$PACKAGE/DEBIAN/control
-
-# prerm: called on remove and upgrade - get rid of existing bits.
-echo "#!/bin/sh"                                  >  $DIRNAME/$PACKAGE/DEBIAN/prerm
-echo "find /Applications/XBMC.frappliance -delete" >> $DIRNAME/$PACKAGE/DEBIAN/prerm
-echo "if [ \"\`uname -r\`\" = \"10.3.1\" ]; then" >> $DIRNAME/$PACKAGE/DEBIAN/prerm
-echo "  find /Applications/Lowtide.app/Appliances/XBMC.frappliance -delete" >> $DIRNAME/$PACKAGE/DEBIAN/prerm
-echo "else"                                       >> $DIRNAME/$PACKAGE/DEBIAN/prerm
-echo "  find /Applications/AppleTV.app/Appliances/XBMC.frappliance -delete" >> $DIRNAME/$PACKAGE/DEBIAN/prerm
-echo "fi"                                         >> $DIRNAME/$PACKAGE/DEBIAN/prerm
-chmod +x $DIRNAME/$PACKAGE/DEBIAN/prerm
-
-# postinst: symlink XBMC.frappliance into correct location and reload Lowtide/AppleTV.
-echo "#!/bin/sh"                                  >  $DIRNAME/$PACKAGE/DEBIAN/postinst
-echo "chown -R mobile:mobile /Applications/XBMC.frappliance" >> $DIRNAME/$PACKAGE/DEBIAN/postinst
-echo "cp /Applications/XBMC.frappliance/AppIcon.png /Applications/AppleTV.app/com.apple.frontrow.appliance.xbmc\@720p.png" >> $DIRNAME/$PACKAGE/DEBIAN/postinst
-echo "cp /Applications/XBMC.frappliance/AppIcon.png /private/var/mobile/Library/Caches/AppleTV/MainMenu/com.apple.frontrow.appliance.xbmc@720.png" >> $DIRNAME/$PACKAGE/DEBIAN/postinst
-echo "cp /Applications/XBMC.frappliance/AppIcon.png /Applications/XBMC.frappliance/TopRowIcon.png" >> $DIRNAME/$PACKAGE/DEBIAN/postinst
-echo "if [ \"\`uname -r\`\" = \"10.3.1\" ]; then" >> $DIRNAME/$PACKAGE/DEBIAN/postinst
-echo "  ln -sf /Applications/XBMC.frappliance /Applications/Lowtide.app/Appliances/XBMC.frappliance" >> $DIRNAME/$PACKAGE/DEBIAN/postinst
-echo "  killall Lowtide"                          >> $DIRNAME/$PACKAGE/DEBIAN/postinst
-echo "else"                                       >> $DIRNAME/$PACKAGE/DEBIAN/postinst
-echo "  mkdir -p /Applications/AppleTV.app/Appliances"                                               >> $DIRNAME/$PACKAGE/DEBIAN/postinst
-echo "  ln -sf /Applications/XBMC.frappliance /Applications/AppleTV.app/Appliances/XBMC.frappliance" >> $DIRNAME/$PACKAGE/DEBIAN/postinst
-echo "  killall AppleTV"                          >> $DIRNAME/$PACKAGE/DEBIAN/postinst
-echo "fi"                                         >> $DIRNAME/$PACKAGE/DEBIAN/postinst
-echo "FILE=/var/mobile/Media/Photos/seas0nTV.png" >> $DIRNAME/$PACKAGE/DEBIAN/postinst
-echo "if [ -f \$FILE ]; then"                     >> $DIRNAME/$PACKAGE/DEBIAN/postinst
-echo "   echo \"File \$FILE exists. removing...\"" >> $DIRNAME/$PACKAGE/DEBIAN/postinst
-echo "   rm \$FILE"                               >> $DIRNAME/$PACKAGE/DEBIAN/postinst
-echo "fi"                                         >> $DIRNAME/$PACKAGE/DEBIAN/postinst
-chmod +x $DIRNAME/$PACKAGE/DEBIAN/postinst
-
-# prep XBMC.frappliance
-mkdir -p $DIRNAME/$PACKAGE/Applications
-cp -r $XBMC $DIRNAME/$PACKAGE/Applications/
-find $DIRNAME/$PACKAGE/Applications/ -name '.svn' -exec rm -rf {} \;
-find $DIRNAME/$PACKAGE/Applications/ -name '.gitignore' -exec rm -rf {} \;
-find $DIRNAME/$PACKAGE/Applications/ -name '.DS_Store'  -exec rm -rf {} \;
-
-# set ownership to root:root
-${SUDO} chown -R 0:0 $DIRNAME/$PACKAGE
-
-echo Packaging $PACKAGE
-# Tell tar, pax, etc. on Mac OS X 10.4+ not to archive
-# extended attributes (e.g. resource forks) to ._* archive members.
-# Also allows archiving and extracting actual ._* files.
-export COPYFILE_DISABLE=true
-export COPY_EXTENDED_ATTRIBUTES_DISABLE=true
-#
-dpkg-deb -b $DIRNAME/$PACKAGE $DIRNAME/$ARCHIVE
-dpkg-deb --info $DIRNAME/$ARCHIVE
-dpkg-deb --contents $DIRNAME/$ARCHIVE
-
-# clean up by removing package dir
-${SUDO} rm -rf $DIRNAME/$PACKAGE
diff --git a/tools/darwin/packaging/xbmc-atv2/mkdeb-xbmc-atv2.sh.in b/tools/darwin/packaging/xbmc-atv2/mkdeb-xbmc-atv2.sh.in
new file mode 100644 (file)
index 0000000..ec15372
--- /dev/null
@@ -0,0 +1,123 @@
+#!/bin/sh
+# usage: ./mkdeb-xbmc-atv2.sh release/debug (case insensitive)
+# Allows us to run mkdeb-xbmc-atv2.sh from anywhere in the three, rather than the tools/darwin/packaging/xbmc-atv2 folder only
+XBMC_DEPENDS_ROOT=@DEPENDS_ROOT_FOR_XCODE@
+SWITCH=`echo $1 | tr [A-Z] [a-z]`
+DIRNAME=`dirname $0`
+DSYM_TARGET_DIR=${XBMC_DEPENDS_ROOT}/dSyms
+DSYM_FILENAME=XBMC.frappliance.dSYM
+
+if [ ${SWITCH:-""} = "debug" ]; then
+  echo "Packaging Debug target for ATV2"
+  XBMC="$DIRNAME/../../../../build/Debug-iphoneos/XBMC.frappliance"
+  DSYM="$DIRNAME/../../../../build/Debug-iphoneos/$DSYM_FILENAME"
+elif [ ${SWITCH:-""} = "release" ]; then
+  echo "Packaging Release target for ATV2"
+  XBMC="$DIRNAME/../../../../build/Release-iphoneos/XBMC.frappliance"
+  DSYM="$DIRNAME/../../../../build/Release-iphoneos/$DSYM_FILENAME"  
+  echo $XBMC
+else
+  echo "You need to specify the build target"
+  exit 1 
+fi 
+
+#copy bzip2 of dsym to xbmc-depends install dir
+if [ -d $DSYM ]; then
+  if [ -d $DSYM_TARGET_DIR ]; then
+    tar -C $DSYM/.. -c $DSYM_FILENAME/ | bzip2 > $DSYM_TARGET_DIR/`$DIRNAME/../gitrev-posix`-${DSYM_FILENAME}.tar.bz2
+  fi
+fi
+
+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
+  export DYLD_INSERT_LIBRARIES=/usr/libexec/fauxsu/libfauxsu.dylib
+elif [ -f "/usr/bin/sudo" ]; then
+  SUDO="/usr/bin/sudo"
+fi
+if [ -f "$XBMC_DEPENDS_ROOT/buildtools-native/bin/dpkg-deb" ]; then
+  # make sure we pickup our tar, gnutar will fail when dpkg -i
+  bin_path=$(cd ${XBMC_DEPENDS_ROOT}/buildtools-native/bin; pwd)
+  export PATH=${bin_path}:${PATH}
+fi
+
+PACKAGE=org.xbmc.xbmc-atv2
+
+VERSION=14.0
+REVISION=0~alpha1
+ARCHIVE=${PACKAGE}_${VERSION}-${REVISION}_iphoneos-arm.deb
+
+echo Creating $PACKAGE package version $VERSION revision $REVISION
+${SUDO} rm -rf $DIRNAME/$PACKAGE
+${SUDO} rm -rf $DIRNAME/$ARCHIVE
+
+# create debian control file.
+mkdir -p $DIRNAME/$PACKAGE/DEBIAN
+echo "Package: $PACKAGE"                          >  $DIRNAME/$PACKAGE/DEBIAN/control
+echo "Priority: Extra"                            >> $DIRNAME/$PACKAGE/DEBIAN/control
+echo "Name: XBMC-ATV2"                            >> $DIRNAME/$PACKAGE/DEBIAN/control
+echo "Depends: curl, org.awkwardtv.whitelist, com.nito.updatebegone, org.xbmc.xbmc-seatbeltunlock" >> $DIRNAME/$PACKAGE/DEBIAN/control
+echo "Version: $VERSION-$REVISION"                >> $DIRNAME/$PACKAGE/DEBIAN/control
+echo "Architecture: iphoneos-arm"                 >> $DIRNAME/$PACKAGE/DEBIAN/control
+echo "Description: XBMC Multimedia Center for AppleTV 2" >> $DIRNAME/$PACKAGE/DEBIAN/control
+echo "Homepage: http://xbmc.org/"                 >> $DIRNAME/$PACKAGE/DEBIAN/control
+echo "Maintainer: Scott Davilla, Edgar Hucek"     >> $DIRNAME/$PACKAGE/DEBIAN/control
+echo "Author: TeamXBMC"                           >> $DIRNAME/$PACKAGE/DEBIAN/control
+echo "Section: Multimedia"                        >> $DIRNAME/$PACKAGE/DEBIAN/control
+
+# prerm: called on remove and upgrade - get rid of existing bits.
+echo "#!/bin/sh"                                  >  $DIRNAME/$PACKAGE/DEBIAN/prerm
+echo "find /Applications/XBMC.frappliance -delete" >> $DIRNAME/$PACKAGE/DEBIAN/prerm
+echo "if [ \"\`uname -r\`\" = \"10.3.1\" ]; then" >> $DIRNAME/$PACKAGE/DEBIAN/prerm
+echo "  find /Applications/Lowtide.app/Appliances/XBMC.frappliance -delete" >> $DIRNAME/$PACKAGE/DEBIAN/prerm
+echo "else"                                       >> $DIRNAME/$PACKAGE/DEBIAN/prerm
+echo "  find /Applications/AppleTV.app/Appliances/XBMC.frappliance -delete" >> $DIRNAME/$PACKAGE/DEBIAN/prerm
+echo "fi"                                         >> $DIRNAME/$PACKAGE/DEBIAN/prerm
+chmod +x $DIRNAME/$PACKAGE/DEBIAN/prerm
+
+# postinst: symlink XBMC.frappliance into correct location and reload Lowtide/AppleTV.
+echo "#!/bin/sh"                                  >  $DIRNAME/$PACKAGE/DEBIAN/postinst
+echo "chown -R mobile:mobile /Applications/XBMC.frappliance" >> $DIRNAME/$PACKAGE/DEBIAN/postinst
+echo "cp /Applications/XBMC.frappliance/AppIcon.png /Applications/AppleTV.app/com.apple.frontrow.appliance.xbmc\@720p.png" >> $DIRNAME/$PACKAGE/DEBIAN/postinst
+echo "cp /Applications/XBMC.frappliance/AppIcon.png /private/var/mobile/Library/Caches/AppleTV/MainMenu/com.apple.frontrow.appliance.xbmc@720.png" >> $DIRNAME/$PACKAGE/DEBIAN/postinst
+echo "cp /Applications/XBMC.frappliance/AppIcon.png /Applications/XBMC.frappliance/TopRowIcon.png" >> $DIRNAME/$PACKAGE/DEBIAN/postinst
+echo "if [ \"\`uname -r\`\" = \"10.3.1\" ]; then" >> $DIRNAME/$PACKAGE/DEBIAN/postinst
+echo "  ln -sf /Applications/XBMC.frappliance /Applications/Lowtide.app/Appliances/XBMC.frappliance" >> $DIRNAME/$PACKAGE/DEBIAN/postinst
+echo "  killall Lowtide"                          >> $DIRNAME/$PACKAGE/DEBIAN/postinst
+echo "else"                                       >> $DIRNAME/$PACKAGE/DEBIAN/postinst
+echo "  mkdir -p /Applications/AppleTV.app/Appliances"                                               >> $DIRNAME/$PACKAGE/DEBIAN/postinst
+echo "  ln -sf /Applications/XBMC.frappliance /Applications/AppleTV.app/Appliances/XBMC.frappliance" >> $DIRNAME/$PACKAGE/DEBIAN/postinst
+echo "  killall AppleTV"                          >> $DIRNAME/$PACKAGE/DEBIAN/postinst
+echo "fi"                                         >> $DIRNAME/$PACKAGE/DEBIAN/postinst
+echo "FILE=/var/mobile/Media/Photos/seas0nTV.png" >> $DIRNAME/$PACKAGE/DEBIAN/postinst
+echo "if [ -f \$FILE ]; then"                     >> $DIRNAME/$PACKAGE/DEBIAN/postinst
+echo "   echo \"File \$FILE exists. removing...\"" >> $DIRNAME/$PACKAGE/DEBIAN/postinst
+echo "   rm \$FILE"                               >> $DIRNAME/$PACKAGE/DEBIAN/postinst
+echo "fi"                                         >> $DIRNAME/$PACKAGE/DEBIAN/postinst
+chmod +x $DIRNAME/$PACKAGE/DEBIAN/postinst
+
+# prep XBMC.frappliance
+mkdir -p $DIRNAME/$PACKAGE/Applications
+cp -r $XBMC $DIRNAME/$PACKAGE/Applications/
+find $DIRNAME/$PACKAGE/Applications/ -name '.svn' -exec rm -rf {} \;
+find $DIRNAME/$PACKAGE/Applications/ -name '.gitignore' -exec rm -rf {} \;
+find $DIRNAME/$PACKAGE/Applications/ -name '.DS_Store'  -exec rm -rf {} \;
+
+# set ownership to root:root
+${SUDO} chown -R 0:0 $DIRNAME/$PACKAGE
+
+echo Packaging $PACKAGE
+# Tell tar, pax, etc. on Mac OS X 10.4+ not to archive
+# extended attributes (e.g. resource forks) to ._* archive members.
+# Also allows archiving and extracting actual ._* files.
+export COPYFILE_DISABLE=true
+export COPY_EXTENDED_ATTRIBUTES_DISABLE=true
+#
+dpkg-deb -b $DIRNAME/$PACKAGE $DIRNAME/$ARCHIVE
+dpkg-deb --info $DIRNAME/$ARCHIVE
+dpkg-deb --contents $DIRNAME/$ARCHIVE
+
+# clean up by removing package dir
+${SUDO} rm -rf $DIRNAME/$PACKAGE
diff --git a/tools/darwin/packaging/xbmc-ios/mkdeb-xbmc-ios.sh b/tools/darwin/packaging/xbmc-ios/mkdeb-xbmc-ios.sh
deleted file mode 100755 (executable)
index 432303a..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-#!/bin/sh
-
-# usage: ./mkdeb-xbmc-ios.sh release/debug (case insensitive)
-# Allows us to run mkdeb-xbmc-ios.sh from anywhere in the three, rather than the tools/darwin/packaging/xbmc-ios folder only
-SWITCH=`echo $1 | tr [A-Z] [a-z]`
-DIRNAME=`dirname $0`
-DSYM_TARGET_DIR=/Users/Shared/xbmc-depends/dSyms
-DSYM_FILENAME=XBMC.app.dSYM
-
-if [ ${SWITCH:-""} = "debug" ]; then
-  echo "Packaging Debug target for iOS"
-  XBMC="$DIRNAME/../../../../build/Debug-iphoneos/XBMC.app"
-  DSYM="$DIRNAME/../../../../build/Debug-iphoneos/$DSYM_FILENAME"  
-elif [ ${SWITCH:-""} = "release" ]; then
-  echo "Packaging Release target for iOS"
-  XBMC="$DIRNAME/../../../../build/Release-iphoneos/XBMC.app"
-  DSYM="$DIRNAME/../../../../build/Release-iphoneos/$DSYM_FILENAME"   
-else
-  echo "You need to specify the build target"
-  exit 1 
-fi  
-
-#copy bzip2 of dsym to xbmc-depends install dir
-if [ -d $DSYM ]; then
-  if [ -d $DSYM_TARGET_DIR ]; then
-    tar -C $DSYM/.. -c $DSYM_FILENAME/ | bzip2 > $DSYM_TARGET_DIR/`$DIRNAME/../gitrev-posix`-${DSYM_FILENAME}.tar.bz2
-  fi
-fi
-
-
-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
-  export DYLD_INSERT_LIBRARIES=/usr/libexec/fauxsu/libfauxsu.dylib
-elif [ -f "/usr/bin/sudo" ]; then
-  SUDO="/usr/bin/sudo"
-fi
-if [ -f "/Users/Shared/xbmc-depends/buildtools-native/bin/dpkg-deb" ]; then
-  # make sure we pickup our tar, gnutar will fail when dpkg -i
-  bin_path=$(cd /Users/Shared/xbmc-depends/buildtools-native/bin; pwd)
-  export PATH=${bin_path}:${PATH}
-fi
-
-PACKAGE=org.xbmc.xbmc-ios
-
-VERSION=14.0
-REVISION=0~alpha1
-ARCHIVE=${PACKAGE}_${VERSION}-${REVISION}_iphoneos-arm.deb
-
-echo Creating $PACKAGE package version $VERSION revision $REVISION
-${SUDO} rm -rf $DIRNAME/$PACKAGE
-${SUDO} rm -rf $DIRNAME/$ARCHIVE
-
-# create debian control file.
-mkdir -p $DIRNAME/$PACKAGE/DEBIAN
-echo "Package: $PACKAGE"                          >  $DIRNAME/$PACKAGE/DEBIAN/control
-echo "Priority: Extra"                            >> $DIRNAME/$PACKAGE/DEBIAN/control
-echo "Name: XBMC-iOS"                             >> $DIRNAME/$PACKAGE/DEBIAN/control
-echo "Depends: firmware (>= 4.1), curl"           >> $DIRNAME/$PACKAGE/DEBIAN/control
-echo "Version: $VERSION-$REVISION"                >> $DIRNAME/$PACKAGE/DEBIAN/control
-echo "Architecture: iphoneos-arm"                 >> $DIRNAME/$PACKAGE/DEBIAN/control
-echo "Description: XBMC Multimedia Center for 4.x iOS" >> $DIRNAME/$PACKAGE/DEBIAN/control
-echo "Homepage: http://xbmc.org/"                 >> $DIRNAME/$PACKAGE/DEBIAN/control
-echo "Maintainer: Scott Davilla, Edgar Hucek"     >> $DIRNAME/$PACKAGE/DEBIAN/control
-echo "Author: TeamXBMC"                           >> $DIRNAME/$PACKAGE/DEBIAN/control
-echo "Section: Multimedia"                        >> $DIRNAME/$PACKAGE/DEBIAN/control
-echo "Icon: file:///Applications/Cydia.app/Sources/mirrors.xbmc.org.png" >> $DIRNAME/$PACKAGE/DEBIAN/control
-
-# prerm: called on remove and upgrade - get rid of existing bits.
-echo "#!/bin/sh"                                  >  $DIRNAME/$PACKAGE/DEBIAN/prerm
-echo "find /Applications/XBMC.app -delete"        >> $DIRNAME/$PACKAGE/DEBIAN/prerm
-chmod +x $DIRNAME/$PACKAGE/DEBIAN/prerm
-
-# postinst: nothing for now.
-echo "#!/bin/sh"                                  >  $DIRNAME/$PACKAGE/DEBIAN/postinst
-echo "chown -R mobile:mobile /Applications/XBMC.app" >> $DIRNAME/$PACKAGE/DEBIAN/postinst
-chmod +x $DIRNAME/$PACKAGE/DEBIAN/postinst
-
-# prep XBMC.app
-mkdir -p $DIRNAME/$PACKAGE/Applications
-cp -r $XBMC $DIRNAME/$PACKAGE/Applications/
-find $DIRNAME/$PACKAGE/Applications/ -name '.svn' -exec rm -rf {} \;
-find $DIRNAME/$PACKAGE/Applications/ -name '.gitignore' -exec rm -rf {} \;
-find $DIRNAME/$PACKAGE/Applications/ -name '.DS_Store'  -exec rm -rf {} \;
-
-# set ownership to root:root
-${SUDO} chown -R 0:0 $DIRNAME/$PACKAGE
-
-echo Packaging $PACKAGE
-# Tell tar, pax, etc. on Mac OS X 10.4+ not to archive
-# extended attributes (e.g. resource forks) to ._* archive members.
-# Also allows archiving and extracting actual ._* files.
-export COPYFILE_DISABLE=true
-export COPY_EXTENDED_ATTRIBUTES_DISABLE=true
-#
-dpkg-deb -b $DIRNAME/$PACKAGE $DIRNAME/$ARCHIVE
-dpkg-deb --info $DIRNAME/$ARCHIVE
-dpkg-deb --contents $DIRNAME/$ARCHIVE
-
-# clean up by removing package dir
-${SUDO} rm -rf $DIRNAME/$PACKAGE
diff --git a/tools/darwin/packaging/xbmc-ios/mkdeb-xbmc-ios.sh.in b/tools/darwin/packaging/xbmc-ios/mkdeb-xbmc-ios.sh.in
new file mode 100644 (file)
index 0000000..be99c0c
--- /dev/null
@@ -0,0 +1,104 @@
+#!/bin/sh
+
+# usage: ./mkdeb-xbmc-ios.sh release/debug (case insensitive)
+# Allows us to run mkdeb-xbmc-ios.sh from anywhere in the three, rather than the tools/darwin/packaging/xbmc-ios folder only
+XBMC_DEPENDS_ROOT=@DEPENDS_ROOT_FOR_XCODE@
+SWITCH=`echo $1 | tr [A-Z] [a-z]`
+DIRNAME=`dirname $0`
+DSYM_TARGET_DIR=${XBMC_DEPENDS_ROOT}/dSyms
+DSYM_FILENAME=XBMC.app.dSYM
+
+if [ ${SWITCH:-""} = "debug" ]; then
+  echo "Packaging Debug target for iOS"
+  XBMC="$DIRNAME/../../../../build/Debug-iphoneos/XBMC.app"
+  DSYM="$DIRNAME/../../../../build/Debug-iphoneos/$DSYM_FILENAME"  
+elif [ ${SWITCH:-""} = "release" ]; then
+  echo "Packaging Release target for iOS"
+  XBMC="$DIRNAME/../../../../build/Release-iphoneos/XBMC.app"
+  DSYM="$DIRNAME/../../../../build/Release-iphoneos/$DSYM_FILENAME"   
+else
+  echo "You need to specify the build target"
+  exit 1 
+fi  
+
+#copy bzip2 of dsym to xbmc-depends install dir
+if [ -d $DSYM ]; then
+  if [ -d $DSYM_TARGET_DIR ]; then
+    tar -C $DSYM/.. -c $DSYM_FILENAME/ | bzip2 > $DSYM_TARGET_DIR/`$DIRNAME/../gitrev-posix`-${DSYM_FILENAME}.tar.bz2
+  fi
+fi
+
+
+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
+  export DYLD_INSERT_LIBRARIES=/usr/libexec/fauxsu/libfauxsu.dylib
+elif [ -f "/usr/bin/sudo" ]; then
+  SUDO="/usr/bin/sudo"
+fi
+if [ -f "${XBMC_DEPENDS_ROOT}/buildtools-native/bin/dpkg-deb" ]; then
+  # make sure we pickup our tar, gnutar will fail when dpkg -i
+  bin_path=$(cd ${XBMC_DEPENDS_ROOT}/buildtools-native/bin; pwd)
+  export PATH=${bin_path}:${PATH}
+fi
+
+PACKAGE=org.xbmc.xbmc-ios
+
+VERSION=14.0
+REVISION=0~alpha1
+ARCHIVE=${PACKAGE}_${VERSION}-${REVISION}_iphoneos-arm.deb
+
+echo Creating $PACKAGE package version $VERSION revision $REVISION
+${SUDO} rm -rf $DIRNAME/$PACKAGE
+${SUDO} rm -rf $DIRNAME/$ARCHIVE
+
+# create debian control file.
+mkdir -p $DIRNAME/$PACKAGE/DEBIAN
+echo "Package: $PACKAGE"                          >  $DIRNAME/$PACKAGE/DEBIAN/control
+echo "Priority: Extra"                            >> $DIRNAME/$PACKAGE/DEBIAN/control
+echo "Name: XBMC-iOS"                             >> $DIRNAME/$PACKAGE/DEBIAN/control
+echo "Depends: firmware (>= 4.1), curl"           >> $DIRNAME/$PACKAGE/DEBIAN/control
+echo "Version: $VERSION-$REVISION"                >> $DIRNAME/$PACKAGE/DEBIAN/control
+echo "Architecture: iphoneos-arm"                 >> $DIRNAME/$PACKAGE/DEBIAN/control
+echo "Description: XBMC Multimedia Center for 4.x iOS" >> $DIRNAME/$PACKAGE/DEBIAN/control
+echo "Homepage: http://xbmc.org/"                 >> $DIRNAME/$PACKAGE/DEBIAN/control
+echo "Maintainer: Scott Davilla, Edgar Hucek"     >> $DIRNAME/$PACKAGE/DEBIAN/control
+echo "Author: TeamXBMC"                           >> $DIRNAME/$PACKAGE/DEBIAN/control
+echo "Section: Multimedia"                        >> $DIRNAME/$PACKAGE/DEBIAN/control
+echo "Icon: file:///Applications/Cydia.app/Sources/mirrors.xbmc.org.png" >> $DIRNAME/$PACKAGE/DEBIAN/control
+
+# prerm: called on remove and upgrade - get rid of existing bits.
+echo "#!/bin/sh"                                  >  $DIRNAME/$PACKAGE/DEBIAN/prerm
+echo "find /Applications/XBMC.app -delete"        >> $DIRNAME/$PACKAGE/DEBIAN/prerm
+chmod +x $DIRNAME/$PACKAGE/DEBIAN/prerm
+
+# postinst: nothing for now.
+echo "#!/bin/sh"                                  >  $DIRNAME/$PACKAGE/DEBIAN/postinst
+echo "chown -R mobile:mobile /Applications/XBMC.app" >> $DIRNAME/$PACKAGE/DEBIAN/postinst
+chmod +x $DIRNAME/$PACKAGE/DEBIAN/postinst
+
+# prep XBMC.app
+mkdir -p $DIRNAME/$PACKAGE/Applications
+cp -r $XBMC $DIRNAME/$PACKAGE/Applications/
+find $DIRNAME/$PACKAGE/Applications/ -name '.svn' -exec rm -rf {} \;
+find $DIRNAME/$PACKAGE/Applications/ -name '.gitignore' -exec rm -rf {} \;
+find $DIRNAME/$PACKAGE/Applications/ -name '.DS_Store'  -exec rm -rf {} \;
+
+# set ownership to root:root
+${SUDO} chown -R 0:0 $DIRNAME/$PACKAGE
+
+echo Packaging $PACKAGE
+# Tell tar, pax, etc. on Mac OS X 10.4+ not to archive
+# extended attributes (e.g. resource forks) to ._* archive members.
+# Also allows archiving and extracting actual ._* files.
+export COPYFILE_DISABLE=true
+export COPY_EXTENDED_ATTRIBUTES_DISABLE=true
+#
+dpkg-deb -b $DIRNAME/$PACKAGE $DIRNAME/$ARCHIVE
+dpkg-deb --info $DIRNAME/$ARCHIVE
+dpkg-deb --contents $DIRNAME/$ARCHIVE
+
+# clean up by removing package dir
+${SUDO} rm -rf $DIRNAME/$PACKAGE