]>
Commit | Line | Data |
---|---|---|
9968a2d6 JF |
1 | binary := Cycript_/cycript |
2 | ||
3d1db6b9 | 3 | $(deb): $(binary) $(patsubst %,Cycript_/libcycript%dylib,. -sim. -sys.) control |
9968a2d6 JF |
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 | ||
12 | control: control.tmp | |
13 | [[ -e control ]] && diff control control.tmp &>/dev/null || cp -pRf control.tmp control | |
14 | ||
15 | # XXX: this is now all broken | |
10d0e915 | 16 | depends := readline, libffi (>= 1:3.0.10-5), adv-cmds |
9968a2d6 JF |
17 | ifeq ($(depends)$(dll),dylib) |
18 | control.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)/' $< >$@ | |
20 | else | |
21 | ifeq ($(depends)$(dll),so) | |
22 | control.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)/' $< >$@ | |
24 | else | |
25 | control.tmp: control.in | |
26 | $(sed) -e 's/&/$(depends)/;s/,$$//;s/#/$(version)/;s/%/$(arch)/' $< >$@ | |
27 | endif | |
28 | endif |