radare2/sys/ios-cydia.sh

56 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
2015-06-17 03:47:36 +00:00
export BUILD=1
2014-05-17 02:27:49 +00:00
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
2015-06-17 03:47:36 +00:00
export PATH=$(pwd)/sys:${PATH}
export CC=$(pwd)/sys/ios-sdk-gcc
2014-05-17 02:27:49 +00:00
# set only for arm64, otherwise it is armv7
# select ios sdk version
2015-04-13 01:27:24 +00:00
export IOSVER=8.3
2015-06-17 03:47:36 +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
2016-01-14 22:26:50 +00:00
makeDeb() {
( cd binr/radare2 ; make ios_sdk_sign )
rm -rf /tmp/r2ios
make install DESTDIR=/tmp/r2ios
rm -rf /tmp/r2ios/usr/share/radare2/*/www/enyo/node_modules
( 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
2016-01-14 22:26:50 +00:00
if true ; then
make clean
./configure --prefix=${PREFIX} --with-ostype=darwin \
--with-compiler=ios-sdk --target=arm-unknown-darwin
2014-05-17 02:27:49 +00:00
if [ $? = 0 ]; then
2016-01-14 22:26:50 +00:00
time make -j4
if [ $? = 0 ]; then
makeDeb
fi
2014-05-17 02:27:49 +00:00
fi
2016-01-14 22:26:50 +00:00
else
makeDeb
2014-05-17 02:27:49 +00:00
fi
2016-01-14 22:26:50 +00:00