blob: 51f62f671c32497545237b8475ee5115e3bac245 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#!/bin/sh -e
# We don't want autotools just to build this tiny little library.
# We'll do it ourselves.
#
# All word splitting is intentional.
# shellcheck disable=2086
export CFLAGS="$CFLAGS -DHAVE_CONFIG_H -I."
mkdir -p "$1/usr/lib"
set -x
"${CC:=cc}" $CFLAGS -c -o fts.o fts.c
"$CC" -shared -fPIC -DPIC fts.o $CFLAGS -Wl,-soname -Wl,libfts.so.0 -o "$1/usr/lib/libfts.so.0.0.0"
ar cru "$1/usr/lib/libfts.a" fts.o
ranlib "$1/usr/lib/libfts.a"
ln -s libfts.so.0.0.0 "$1/usr/lib/libfts.so.0"
ln -s libfts.so.0 "$1/usr/lib/libfts.so"
install -Dm644 fts.h "$1/usr/include/fts.h"
install -Dm644 musl-fts.pc "$1/usr/lib/pkgconfig/musl-fts.pc"
|