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

commit 10afc692797f5fea2c5faebff4b199f71a6214e0
parent 53e307e787e0f3582046c7e7dbddc51eacc28b92
Author: z3bra <willyatmailoodotorg>
Date:   Mon Apr 25 08:35:47 2016

Change to no rebuild existing packs

Diffstat: | 29 +++++++++++++++--------------
 1 file changed, 15 insertions(+), 14 deletions(-)

diff --git a/ b/ @@ -1,25 +1,26 @@ srcdir = `{pwd} destdir = `{printf '%s/%s/.rootfs' "$WORK" "$pkg-$ver"} archive = `{basename $url 2>/dev/null || echo /dev/null} - +tarball = ${REPO}/$pkg\#$ver.tar.bz2 # create a pack from an chroot install (see the "install" target) -$pkg\#$ver.tar.bz2: fetch patch build install cleanup +$tarball:Q: + mk fetch patch build install cleanup cd $destdir - mkdir -p ${REPO} - tar -c `ls` | bzip2 -c > ${REPO}/$pkg\#$ver.tar.bz2 + mkdir -p $(dirname $tarball) + tar -c `ls` | bzip2 -c > $tarball # recipe trying to follow the most common pattern in software # building # If it doesn't work, simply override it on a per pack basis -build:V: fetch patch +build:QV: fetch patch cd $WORK/$pkg-$ver test -f configure && ./configure $CONFIGURE make CC="$CC" CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" ${MAKEFLAGS} # install the pack to a .rootfs directory # this is where the "pack" target will chdir to create the pack -install:V: build +install:QV: build mkdir -p $destdir cd $WORK/$pkg-$ver make ${MAKEFLAGS} DESTDIR=$destdir install @@ -37,29 +38,29 @@ cleanup:V: install fi # patch your software using everything in ./patches -patch:V: fetch +patch:QV: fetch if [ -d "$srcdir/patches" ]; then cd $WORK/$pkg-$ver cat $srcdir/patches/*.diff | patch -Np1 fi # fetch the source -fetch:V: fetch-git fetch-archive +fetch:QV: fetch-git fetch-archive # if $git is set, clone the repo, and checkout $ver -fetch-git:V: +fetch-git:QV: if [ -n "$git" ]; then mkdir -p $WORK cd $WORK - test -d $pkg-$ver || git clone $git $pkg-$ver + test -d $pkg-$ver || git clone -q $git $pkg-$ver cd $pkg-$ver - git reset --hard - git checkout $ver + git reset -q --hard + git checkout -q $ver fi # if $url is set, download/extract the archive, and move its # content to a directory named $pkg-$ver -fetch-archive:V: $archive +fetch-archive:QV: $archive if [ -n "$url" ]; then cd $WORK case $archive in @@ -87,4 +88,4 @@ clean:V: # remove the pack distclean:V: clean - rm -f ${REPO}/$pkg#$ver.tar.bz2- \ No newline at end of file + rm -f $tarball+ \ No newline at end of file