repo/extra/libffi/build
2019-11-18 01:02:17 +00:00

18 lines
363 B
Bash
Executable File

#!/bin/sh -e
./configure \
--prefix=/usr \
--includedir=/usr/include \
--with-pic
make
make DESTDIR="$1" install
# Fix location for headers.
mv "$1/usr/lib/libffi-3.2.1/include/" "$1/usr"
rmdir "$1/usr/lib/libffi-3.2.1"
# Fix location inside pkgconfig file.
sed -i '/^includedir=/{s,=.*,=/usr/include,g}' \
"$1/usr/lib/pkgconfig/libffi.pc"