tChange default.mk to no rebuild existing packs - mkports - recipes for building multiple softwares with mk(1)
(HTM) git clone git://z3bra.org/mkports
(DIR) Log
(DIR) Files
(DIR) Refs
---
(DIR) commit 10afc692797f5fea2c5faebff4b199f71a6214e0
(DIR) parent 53e307e787e0f3582046c7e7dbddc51eacc28b92
(HTM) Author: z3bra <willyatmailoodotorg>
Date: Mon, 25 Apr 2016 08:35:47 +0200
Change default.mk to no rebuild existing packs
Diffstat:
M default.mk | 31 ++++++++++++++++---------------
1 file changed, 16 insertions(+), 15 deletions(-)
---
(DIR) diff --git a/default.mk b/default.mk
t@@ -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
t@@ -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
t@@ -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