aboutsummaryrefslogtreecommitdiff
path: root/extra/musl-fts
diff options
context:
space:
mode:
Diffstat (limited to 'extra/musl-fts')
-rwxr-xr-xextra/musl-fts/build22
-rw-r--r--extra/musl-fts/checksums1
-rw-r--r--extra/musl-fts/files/Makefile33
-rw-r--r--extra/musl-fts/sources1
4 files changed, 37 insertions, 20 deletions
diff --git a/extra/musl-fts/build b/extra/musl-fts/build
index 51f62f67..431cc725 100755
--- a/extra/musl-fts/build
+++ b/extra/musl-fts/build
@@ -1,22 +1,4 @@
#!/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"
+make
+make DESTDIR="$1" PREFIX=/usr install
diff --git a/extra/musl-fts/checksums b/extra/musl-fts/checksums
index 6381ccc7..c025a06d 100644
--- a/extra/musl-fts/checksums
+++ b/extra/musl-fts/checksums
@@ -1,3 +1,4 @@
49ae567a96dbab22823d045ffebe0d6b14b9b799925e9ca9274d47d26ff482a6 v1.2.7.tar.gz
e3999a67150ed8ca636ea778ed665cf26770beee6710afacb978419298b836b9 config.h
e34958c1577d77b5dbde43d2d52990a8735474a9232b8530eb942d940405f279 musl-fts.pc
+2af021a95109ba63354a332be2f542dd53d3be71a81ec492bf90578199d2d35e Makefile
diff --git a/extra/musl-fts/files/Makefile b/extra/musl-fts/files/Makefile
new file mode 100644
index 00000000..359975af
--- /dev/null
+++ b/extra/musl-fts/files/Makefile
@@ -0,0 +1,33 @@
+PREFIX = /usr/local
+LIBDIR = ${PREFIX}/lib
+INCDIR = ${PREFIX}/include
+PKGCONFDIR = ${LIBDIR}/pkgconfig
+CC ?= cc
+AR ?= ar
+RANLIB ?= ranlib
+
+CPPFLAGS = -DHAVE_CONFIG_H -I.
+
+all: libfts.a libfts.so.0.0.0
+
+fts.o: fts.c
+ ${CC} ${CFLAGS} ${CPPFLAGS} -c -o fts.o fts.c
+
+libfts.a: fts.o
+ ${AR} cru libfts.a fts.o
+ ${RANLIB} libfts.a
+
+libfts.so.0.0.0: fts.o
+ ${CC} -shared -fPIC -DPIC fts.o ${CFLAGS} -Wl,-soname -Wl,libfts.so.0 -o libfts.so.0.0.0
+
+install: all
+ mkdir -p ${DESTDIR}${INCDIR} ${DESTDIR}${PKGCONFDIR}
+ cp libfts.a libfts.so.0.0.0 ${DESTDIR}${LIBDIR}
+ cp musl-fts.pc ${DESTDIR}${PKGCONFDIR}
+ cp fts.h ${DESTDIR}${INCDIR}
+ chmod 644 ${DESTDIR}${INCDIR}/fts.h ${DESTDIR}${LIBDIR}/libfts.a ${DESTDIR}${PKGCONFDIR}/musl-fts.pc
+ chmod 755 ${DESTDIR}${LIBDIR}/libfts.so.0.0.0
+ ln -sf libfts.so.0.0.0 ${DESTDIR}${LIBDIR}/libfts.so.0
+ ln -sf libfts.so.0 ${DESTDIR}${LIBDIR}/libfs.so
+
+.PHONY: all
diff --git a/extra/musl-fts/sources b/extra/musl-fts/sources
index f0cbf9d2..dc0f29c0 100644
--- a/extra/musl-fts/sources
+++ b/extra/musl-fts/sources
@@ -1,3 +1,4 @@
https://github.com/void-linux/musl-fts/archive/v1.2.7.tar.gz
files/config.h
files/musl-fts.pc
+files/Makefile