radare2/sys/ios-cydia.sh

51 lines
1.2 KiB
Bash
Raw Normal View History

2014-05-17 02:27:49 +00:00
#!/bin/sh
2014-05-17 02:53:11 +00:00
if [ -z "${CPU}" ]; then
export CPU=arm64
export CPU=armv7
fi
2014-05-17 02:27:49 +00:00
BUILD=1
PREFIX="/usr"
# PREFIX=/var/mobile
if [ ! -d sys/ios-include ]; then
(
cd sys && \
wget http://lolcathost.org/b/ios-include.tar.gz && \
tar xzvf ios-include.tar.gz
)
fi
export PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:$PATH
export PATH=`pwd`/sys:${PATH}
export CC=`pwd`/sys/ios-sdk-gcc
# set only for arm64, otherwise it is armv7
# select ios sdk version
2015-04-13 01:27:24 +00:00
export IOSVER=8.3
2014-05-17 02:27:49 +00:00
export IOSINC=`pwd`/sys/ios-include
2014-05-22 00:29:09 +00:00
export CFLAGS=-O2
2014-05-17 02:27:49 +00:00
2015-06-04 02:30:48 +00:00
if false ; then
2014-05-17 02:27:49 +00:00
make clean
./configure --prefix=${PREFIX} --with-ostype=darwin \
2015-02-12 16:14:12 +00:00
--with-compiler=ios-sdk --target=arm-unknown-darwin
2015-06-04 02:30:48 +00:00
else
true
2014-05-17 02:27:49 +00:00
fi
if [ $? = 0 ]; then
2015-06-04 02:30:48 +00:00
time true # make -j4
2014-05-17 02:27:49 +00:00
if [ $? = 0 ]; then
2014-05-18 00:53:17 +00:00
( cd binr/radare2 ; make ios_sdk_sign )
2014-05-17 02:27:49 +00:00
rm -rf /tmp/r2ios
make install DESTDIR=/tmp/r2ios
2015-04-13 12:16:46 +00:00
rm -rf /tmp/r2ios/usr/share/radare2/*/www/enyo/node_modules
2014-05-18 01:15:38 +00:00
( cd /tmp/r2ios && tar czvf ../r2ios-${CPU}.tar.gz * )
rm -rf sys/cydia/radare2/root
mkdir -p sys/cydia/radare2/root
sudo tar xpzvf /tmp/r2ios-${CPU}.tar.gz -C sys/cydia/radare2/root
( cd sys/cydia/radare2 ; sudo make clean ; sudo make )
2014-05-17 02:27:49 +00:00
fi
fi