]> git.saurik.com Git - cycript.git/blame - ios.mk
When CYONifying fields, @error encode exceptions.
[cycript.git] / ios.mk
CommitLineData
9968a2d6
JF
1binary := Cycript_/cycript
2
3$(deb): $(binary) $(patsubst %,Cycript_/libcycript%dylib,. -any. -sim. -sys.) control
4 rm -rf package
5 mkdir -p package/DEBIAN
6 cp -pR control package/DEBIAN
7 mkdir -p package/usr/{bin,lib}
8 cp -pR $(filter %.dylib,$^) package/usr/lib
9 cp -pR $< package/usr/bin
10 dpkg-deb -b package $(deb)
11
12control: control.tmp
13 [[ -e control ]] && diff control control.tmp &>/dev/null || cp -pRf control.tmp control
14
15# XXX: this is now all broken
16depends := apr-lib, readline, libffi (>= 1:3.0.10-5), adv-cmds
17ifeq ($(depends)$(dll),dylib)
18control.tmp: control.in $(binary) .libs/$(lib)cycript.dylib
19 $(sed) -e 's/&/'"$$(dpkg-query -S $$(otool -lah $(binary) .libs/*.dylib | grep dylib | grep -v ':$$' | $(sed) -e 's/^ *name //;s/ (offset [0-9]*)$$//' | sort -u) 2>/dev/null | $(sed) -e 's/:.*//; /^cycript$$/ d; s/$$/,/' | sort -u | tr '\n' ' ')"'/;s/, $$//;s/#/$(version)/;s/%/$(arch)/' $< >$@
20else
21ifeq ($(depends)$(dll),so)
22control.tmp: control.in $(binary) .libs/$(lib)cycript.so
23 $(sed) -e 's/&/'"$$(dpkg-query -S $$(ldd $(binary) $(lib)cycript.so | $(sed) -e '/:$$/ d; s/^[ \t]*\([^ ]* => \)\?\([^ ]*\) .*/\2/' | sort -u) 2>/dev/null | $(sed) -e 's/:.*//; /^cycript$$/ d; s/$$/,/' | sort -u | tr '\n' ' ')"'/;s/, $$//;s/#/$(version)/;s/%/$(arch)/' $< >$@
24else
25control.tmp: control.in
26 $(sed) -e 's/&/$(depends)/;s/,$$//;s/#/$(version)/;s/%/$(arch)/' $< >$@
27endif
28endif