ports

recipes for building multiple softwares
git clone git://z3bra.org/ports
Log | Files | Refs

commit c107f2b049d6e21424d749bc4f2cd548eee5ef07
parent d0b69edb5afad196cb7bc2fd79c75d83c9406787
Author: z3bra <willyatmailoodotorg>
Date:   Sun Aug 16 16:47:48 2015

musl: new port

Diffstat:
 musl/ldconfig | 18 ++++++++++++++++++
 musl/makeme   | 17 +++++++++++++++++
 2 files changed, 35 insertions(+), 0 deletions(-)

diff --git a/musl/ldconfig b/musl/ldconfig @@ -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 "$@" diff --git a/musl/makeme b/musl/makeme @@ -0,0 +1,17 @@ +name=musl +version=1.1.9 +source=http://www.musl-libc.org/releases/$name-$version.tar.gz + +package() { + curl -# $source | tar xz + cd $name-$version + ./configure --prefix=/usr \ + --target=${TOOLCHAIN_TRIPLET} + make CC="$CC" LDFLAGS="$LDFLAGS" + make DESTDIR=$WORKDIR/$name install + + mkdir -p $WORKDIR/$name/usr/bin + ln -sf /lib/ld-musl-x86_64.so.1 $WORKDIR/$name/usr/bin/ldd + cp ../ldconfig $WORKDIR/$name/usr/bin/ldconfig + chmod 755 $WORKDIR/$name/usr/bin/ldconfig +}