From a5b37447b03462ef06a63c644932c16ba864da0f Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Thu, 6 Sep 2012 19:10:28 -0700 Subject: [PATCH] Add a build environment for iOS+Cydia packaging. --- .gitignore | 4 ++++ control | 12 ++++++++++++ control.sh | 5 +++++ ios.sh | 15 +++++++++++++++ make.sh | 2 +- version.sh | 2 ++ 6 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 control create mode 100755 control.sh create mode 100755 ios.sh create mode 100755 version.sh diff --git a/.gitignore b/.gitignore index d2eb369..95d51d9 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,5 @@ ldid +ldid.arm +ldid.deb +debs +_ diff --git a/control b/control new file mode 100644 index 0000000..06616b2 --- /dev/null +++ b/control @@ -0,0 +1,12 @@ +Package: ldid +Priority: optional +Section: Development +Maintainer: Jay Freeman (saurik) +Architecture: iphoneos-arm +Version: +Description: psuedo-codesign Mach-O files +Name: Link Identity Editor +Author: Jay Freeman (saurik) +Depiction: http://cydia.saurik.com/info/ldid/ +Depends: odcctools +Tag: purpose::console, role::developer diff --git a/control.sh b/control.sh new file mode 100755 index 0000000..7a11d56 --- /dev/null +++ b/control.sh @@ -0,0 +1,5 @@ +#!/bin/bash +dir=$1 +dir=${dir:=_} +sed -e "s@^\(Version:.*\)@\1$(./version.sh)@" control +echo "Installed-Size: $(du -s "${dir}" | cut -f 1)" diff --git a/ios.sh b/ios.sh new file mode 100755 index 0000000..43e60d0 --- /dev/null +++ b/ios.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +set -e -x + +cycc -i2.0 -m10.5 -oldid.arm -- ldid.cpp sha1.c -x c lookup2.c -I . + +rm -rf _ +mkdir -p _/usr/bin +cp -a ldid.arm _/usr/bin +mkdir -p _/DEBIAN +./control.sh _ >_/DEBIAN/control +mkdir -p debs +ln -sf debs/ldid_$(./version.sh)_iphoneos-arm.deb ldid.deb +dpkg-deb -b _ ldid.deb +readlink ldid.deb diff --git a/make.sh b/make.sh index f1f2a81..6712209 100755 --- a/make.sh +++ b/make.sh @@ -1,6 +1,6 @@ #!/bin/bash -set -e -x +set -e flags=() diff --git a/version.sh b/version.sh new file mode 100755 index 0000000..6e484ed --- /dev/null +++ b/version.sh @@ -0,0 +1,2 @@ +#!/bin/bash +echo "$(git describe --tags --dirty="+" --match="v*" | sed -e 's@-\([^-]*\)-\([^-]*\)$@+\1.\2@;s@^v@1:@')" -- 2.45.2