diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2011-02-25 03:06:50 -0800 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2011-03-07 02:41:17 -0800 |
commit | 569d107cce540315f637375c07e9685f25999fe7 (patch) | |
tree | 3510753394a7ff01aaf3f1a9e40754696fec3086 | |
parent | 6a451713c956fcb815e34b125c06ce305c6cd94b (diff) |
Drop sysroot.sh dependency on CydiaSubstrate.
-rw-r--r-- | compiling.txt | 9 | ||||
-rwxr-xr-x | sysroot.sh | 25 |
2 files changed, 26 insertions, 8 deletions
diff --git a/compiling.txt b/compiling.txt index 72d3040..bb3b719 100644 --- a/compiling.txt +++ b/compiling.txt @@ -9,10 +9,9 @@ -or- b) doing the following crazy stunts: - i) install Cydia Substrate (in beta) - ii) install Fink (the only sane choice) - iii) activate Fink (. /sw/bin/init.sh) - iv) fink install bash ldid tar wget - v) run ./sysroot.sh and wait a bit + i) install Fink (the only sane choice) + ii) activate Fink (. /sw/bin/init.sh) + ii) fink install bash ldid tar wget xz + iv) run ./sysroot.sh and wait a bit 3) type "make" to compile the executable @@ -11,8 +11,6 @@ set -e shopt -s extglob shopt -s nullglob -PATH=/Library/Cydia/bin:$PATH - rm -rf sysroot mkdir sysroot cd sysroot @@ -22,6 +20,10 @@ distribution=tangelo component=main architecture=iphoneos-arm +declare -A dpkgz +dpkgz[gz]=gunzip +dpkgz[lzma]=unlzma + wget -qO- "${repository}dists/${distribution}/${component}/binary-${architecture}/Packages.bz2" | bzcat | { regex='^([^ \t]*): *(.*)' declare -A fields @@ -31,8 +33,25 @@ wget -qO- "${repository}dists/${distribution}/${component}/binary-${architecture package=${fields[package]} if [[ ${package} == *(apr|apr-lib|apt7|apt7-lib|coreutils|mobilesubstrate|pcre) ]]; then filename=${fields[filename]} + wget -O "${package}.deb" "${repository}${filename}" - dpkg-deb -x "${package}.deb" . + for z in lzma gz; do + compressed=data.tar.${z} + + if ar -x "${package}.deb" "${compressed}" 2>/dev/null; then + ${dpkgz[${z}]} "${compressed}" + break + fi + done + + if ! [[ -e data.tar ]]; then + echo "unable to extract package" 1>&2 + exit 1 + fi + + ls -la data.tar + tar -xf ./data.tar + rm -f data.tar fi unset fields |