From 910c40ded6f5e8b50d8e111418f10adc31be5e43 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Tue, 15 Dec 2015 14:27:42 -0800 Subject: [PATCH] Detect dpkg-deb -Z flags and prepare for fakeroot. --- apple.mk | 2 +- dpkg-deb.sh | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100755 dpkg-deb.sh diff --git a/apple.mk b/apple.mk index e10a805..ad0f022 100644 --- a/apple.mk +++ b/apple.mk @@ -69,7 +69,7 @@ $(deb): Cycript.lib/cycript Cycript.lib/libcycript.dylib $(lipo) -extract armv6 -output package/usr/bin/cycript Cycript.lib/cycript $(lipo) -extract armv6 -extract arm64 -output package/usr/lib/libcycript.dylib Cycript.lib/libcycript.dylib ln -s libcycript.dylib package/usr/lib/libcycript.0.dylib - fauxsu dpkg-deb -Zlzma -b package $@ + ./dpkg-deb.sh -Zlzma -b package $@ deb: $(deb) ln -sf $< cycript.deb diff --git a/dpkg-deb.sh b/dpkg-deb.sh new file mode 100755 index 0000000..f327bdc --- /dev/null +++ b/dpkg-deb.sh @@ -0,0 +1,9 @@ +#!/bin/bash +flags=() +for Z in lzma bzip2 gzip; do + if dpkg-deb -Z"$Z" -h &>/dev/null && which "$Z" &>/dev/null; then + flags+=(-Z"$Z") + break + fi +done +fauxsu dpkg-deb "${flags[@]}" "$@" -- 2.45.2