mkports

recipes for building multiple softwares with mk(1)
git clone git://z3bra.org/mkports
Log | Files | Refs

commit e0bafc3e62be6435f213d33a4782c82917799a17
Author: z3bra <willyatmailoodotorg>
Date:   Thu Jan 14 13:42:56 2016

First commit: mk.build + dash, pm, sbase

Diffstat:
 config.mk    | 24 ++++++++++++++++++++++++
 dash/mkfile  |  7 +++++++
 mk.build     | 37 +++++++++++++++++++++++++++++++++++++
 pm/mkfile    |  6 ++++++
 sbase/mkfile |  6 ++++++
 5 files changed, 80 insertions(+), 0 deletions(-)

diff --git a/config.mk b/config.mk @@ -0,0 +1,24 @@ +CROSS = /opt/cross/gcc-x86_64 +PATH = ${CROSS}/bin:${PATH} +TOOLCHAIN_TRIPLET = x86_64-linux-musl + +CC = ${TOOLCHAIN_TRIPLET}-gcc +LD = $CC +AR = ${TOOLCHAIN_TRIPLET}-ar +HOSTCC = $CC +RANLIB = ${TOOLCHAIN_TRIPLET}-ranlib +STRIP = ${TOOLCHAIN_TRIPLET}-strip +PKG_CONFIG = ${TOOLCHAIN_TRIPLET}-pkg-config + +CHOST = ${TOOLCHAIN_TRIPLET} +CBUILD = ${TOOLCHAIN_TRIPLET} +CPPFLAGS = +CFLAGS = ${CPPFLAGS} +LDFLAGS = -static -s +CONFIGURE = "--prefix= + --mandir=/share/man + --libdir=/lib + --includedir=/include + --disable-nls + --disable-multilib + --disable-shared" diff --git a/dash/mkfile b/dash/mkfile @@ -0,0 +1,7 @@ +pkg = dash +ver = 0.5.8 +url=http://gondor.apana.org.au/~herbert/dash/files/$pkg-$ver.tar.gz +archive=`basename $url` + +<../config.mk +<../mk.build diff --git a/mk.build b/mk.build @@ -0,0 +1,37 @@ +all:QV: $pkg:$ver.tar.bz2 + +$pkg\:$ver.tar.bz2: build + cd $pkg-$ver/rootfs + tar -c `ls` | bzip2 -c > ../../$pkg:$ver.tar.bz2 + +build:QV: fetch + mkdir -p $pkg-$ver/rootfs + cd $pkg-$ver + test -f configure && ./configure $CONFIGURE + make CC="$CC" CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" + make PREFIX= DESTDIR=`pwd`/rootfs install + +fetch:QV: fetch-git fetch-archive + +fetch-git:QV: + if [ "$git" != "" ]; then + test -d $pkg-$ver && rm -r $pkg-$ver + git clone $git $pkg-$ver + (cd $pkg-$ver; git checkout $ver) + fi + +fetch-archive:QV: + if [ "$url" != "" ]; then + echo downloading `basename $url` + out=$(curl -sLOw %{filename_effective} $url) + src=$(tar -xvf $out|sed -n 1p|tr -d /) + test "$src" != "$pkg-$ver" && mv "$src" "$pkg-$ver" || true + fi + +clean:V: + rm -rf $pkg-$ver + rm -f $pkg-$ver.* + + +distclean:V: clean + rm -f $pkg:$ver.tar.bz2 diff --git a/pm/mkfile b/pm/mkfile @@ -0,0 +1,6 @@ +pkg = pm +ver = 6145d57 +git=git://z3bra.org/pm + +<../config.mk +<../mk.build diff --git a/sbase/mkfile b/sbase/mkfile @@ -0,0 +1,6 @@ +pkg = sbase +ver = 2b31049 +git = git://git.2f30.org/$pkg + +<../config.mk +<../mk.build