aboutsummaryrefslogtreecommitdiff
path: root/extra/musl-fts/build
diff options
context:
space:
mode:
authorCem Keylan <cem@ckyln.com>2020-09-01 19:06:11 +0300
committerCem Keylan <cem@ckyln.com>2020-09-01 19:06:11 +0300
commit004087f356ca47d6081109019ed8e315eff5fa2c (patch)
treeffaec7322a55ca9ab16741276be0e4aeb807c883 /extra/musl-fts/build
parent85e0379cb2b6e264ca7cadd05c36529c9939dd03 (diff)
downloadrepository-004087f356ca47d6081109019ed8e315eff5fa2c.tar.gz
musl-fts: add new package at 1.2.7
Diffstat (limited to 'extra/musl-fts/build')
-rwxr-xr-xextra/musl-fts/build22
1 files changed, 22 insertions, 0 deletions
diff --git a/extra/musl-fts/build b/extra/musl-fts/build
new file mode 100755
index 00000000..51f62f67
--- /dev/null
+++ b/extra/musl-fts/build
@@ -0,0 +1,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"