1#!/bin/sh -e
2
3export CFLAGS="$CFLAGS -fasynchronous-unwind-tables"
4export LDFLAGS="$LDFLAGS -static-libgcc"
5
6patch -p1 < 0001-fix-check-for-toolchain-generateing-unwind-tables.patch
7
8make PREFIX=/usr
9make install PREFIX=/usr DESTDIR="$1" INSTALL_TNAME=luajit
10
11# Compress manpages
12find "$1/usr/share/man" -type f -exec gzip -n -9 {} +