tAdd TAR variable to allow changing it - mkports - recipes for building multiple softwares with mk(1)
 (HTM) git clone git://z3bra.org/mkports
 (DIR) Log
 (DIR) Files
 (DIR) Refs
       ---
 (DIR) commit fbe169dcb98861dbe7ebb747cdbac299304bd471
 (DIR) parent 8cf56ffdd0376c17c73cc2a2b780bdcdc277f75d
 (HTM) Author: z3bra <contactatz3bradotorg>
       Date:   Fri, 12 May 2017 08:33:30 +0200
       
       Add TAR variable to allow changing it
       
       Diffstat:
         M default.mk                          |      10 +++++-----
       
       1 file changed, 5 insertions(+), 5 deletions(-)
       ---
 (DIR) diff --git a/default.mk b/default.mk
       t@@ -11,7 +11,7 @@ $tarball:Q:
                mk fetch patch build install cleanup
                cd $destdir
                mkdir -p $(dirname $tarball)
       -        tar -c `ls -1` | bzip2 -c > $tarball
       +        ${TAR} -cjf $tarball `ls -1`
        
        # recipe trying to follow the most common pattern in software
        # building
       t@@ -66,12 +66,12 @@ fetch-archive:QV: $WORK/$archive
                if [ -n "$url" ]; then
                        cd $WORK
                        case $archive in
       -                *.tar.bz2)      opt="-xvj" ;;
       -                *.tar.gz|*.tgz) opt="-xvz" ;;
       -                *.tar.xz)       opt="-xvJ" ;;
       +                *.tar.bz2|*.tbz) opt="-xvj" ;;
       +                *.tar.gz|*.tgz)  opt="-xvz" ;;
       +                *.tar.xz|*.txz)  opt="-xvJ" ;;
                        *) echo "$archive: format not recognized" >&2; exit 1
                        esac
       -                src=$(tar $opt < $archive|sed -n 1p|cut -f1 -d/)
       +                src=$(${TAR} $opt -f $archive|sed -n 1p|cut -f1 -d/)
                        if [ "$src" != "$pkg-$ver" ]; then
                                mv "$src" "$pkg-$ver"
                        fi