tmusl: new port - mkports - recipes for building multiple softwares with mk(1)
(HTM) git clone git://z3bra.org/mkports
(DIR) Log
(DIR) Files
(DIR) Refs
---
(DIR) commit 7e51b336db4721fd84ae2fb9732fc116804441b5
(DIR) parent d6a11a16456c2e2f5e6539fee46ccc06729f5993
(HTM) Author: z3bra <willyatmailoodotorg>
Date: Fri, 15 Jan 2016 22:29:18 +0100
musl: new port
Diffstat:
A musl/ldconfig | 18 ++++++++++++++++++
A musl/mkfile | 14 ++++++++++++++
2 files changed, 32 insertions(+), 0 deletions(-)
---
(DIR) diff --git a/musl/ldconfig b/musl/ldconfig
t@@ -0,0 +1,18 @@
+#!/bin/sh
+scan_dirs() {
+ scanelf -qS "$@" | while read SONAME FILE; do
+ TARGET="${FILE##*/}"
+ LINK="${FILE%/*}/$SONAME"
+ case "$FILE" in
+ /lib/*|/usr/lib/*|/usr/local/lib/*) ;;
+ *) [ -h "$LINK" -o ! -e "$LINK" ] && ln -sf "$TARGET" "$LINK"
+ esac
+ done
+ return 0
+}
+# eat ldconfig options
+while getopts "nNvXvf:C:r:" opt; do
+ :
+done
+shift $(( $OPTIND - 1 ))
+[ $# -gt 0 ] && scan_dirs "$@"
(DIR) diff --git a/musl/mkfile b/musl/mkfile
t@@ -0,0 +1,14 @@
+pkg = musl
+ver = 1.1.12
+url=http://www.musl-libc.org/releases/$pkg-$ver.tar.gz
+
+<../config.mk
+<../default.mk
+
+install:QV: build
+ mkdir -p $pkg-$ver/.rootfs/bin
+ cd $pkg-$ver
+ make DESTDIR=$(pwd)/.rootfs install
+ ln -sf /lib/ld-musl-x86_64.so.1 .rootfs/bin/ldd
+ cp ../ldconfig .rootfs/bin/ldconfig
+ chmod 755 .rootfs/bin/ldconfig