Created
March 23, 2017 06:20
-
-
Save thomasfinch/424ab7da276f8474b53058fe29af1ae2 to your computer and use it in GitHub Desktop.
Bash script to build the fish shell for a jailbroken iOS device
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Before running this script: | |
# Find AC_CHECK_FILES([/proc/self/stat]) in configure.ac and comment it out | |
# cd into the fish source directory | |
FLAGS="-stdlib=libc++ -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk -target armv7-apple-darwin16 -miphoneos-version-min=8.0.0" | |
PREFIX=$(pwd)"/deb" | |
# Build fish | |
CFLAGS=$FLAGS CXXFLAGS=$FLAGS ./configure --with-included-pcre2 --host=armv7-apple-darwin16 --build=x86_64-apple-darwin16 --prefix=PREFIX | |
make | |
make install | |
# "sign" all binaries | |
ldid -S ./deb/bin/* | |
# Create the control file | |
mkdir ./deb/DEBIAN | |
printf "Package: fish\nName: Fish Shell\nVersion: 2.5.0\nArchitecture: iphoneos-arm\nDescription: Fish is a smart and user-friendly command line shell\nHomepage: https://fishshell.com\nMaintainer: Thomas Finch <[email protected]>\nSection: Development\n" > ./deb/DEBIAN/control | |
# Make the deb | |
dpkg-deb --build -Zlzma deb/ | |
mv deb.deb fish.deb | |
# Clean up | |
rm -r ./deb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment