#!/bin/sh
set -e
ROOTDIR=$(cd $(dirname $0)/../.. && pwd -P)
cd $ROOTDIR/build/ios

# Do not ship *.la files that would break the build and, while there, also
# remove directories that we don't need for cross compiling MK
find tmp -type f -name \*.la -exec rm {} \;
find tmp -type f -name \*.pc -exec rm {} \;
find tmp -type d -depth -name share -exec rm -rf {} \;
find tmp -type d -depth -name bin -exec rm -rf {} \;
find tmp -type d -depth -name pkgconfig -exec rm -rf {} \;

now=`date +%Y%m%dT%H%M%SZ`
tar -czf ios-dependencies-$now.tgz tmp
$ROOTDIR/build/sign ios-dependencies-$now.tgz
