tMake extraction support bsdtar - mkports - recipes for building multiple softwares with mk(1)
 (HTM) git clone git://z3bra.org/mkports
 (DIR) Log
 (DIR) Files
 (DIR) Refs
       ---
 (DIR) commit f3c8c883f4c6692d65bac56cbaf410d200f4ce79
 (DIR) parent bb996c6324172d28b2286054ef524ccfc2227c5a
 (HTM) Author: z3bra <contactatz3bradotorg>
       Date:   Thu, 18 May 2017 23:40:30 +0200
       
       Make extraction support bsdtar
       
       Diffstat:
         M default.mk                          |      10 ++++++----
       
       1 file changed, 6 insertions(+), 4 deletions(-)
       ---
 (DIR) diff --git a/default.mk b/default.mk
       t@@ -12,6 +12,7 @@ $tarball:Q:
                cd $destdir
                mkdir -p $(dirname $tarball)
                ${TAR} -cjf $tarball `ls -1`
       +        printf '\n\t%s\n\n' "$tarball"
        
        # recipe trying to follow the most common pattern in software
        # building
       t@@ -66,12 +67,13 @@ fetch-archive:QV: $WORK/$archive
                if [ -n "$url" ]; then
                        cd $WORK
                        case $archive in
       -                *.tar.bz2|*.tbz) opt="-xvj" ;;
       -                *.tar.gz|*.tgz)  opt="-xvz" ;;
       -                *.tar.xz|*.txz)  opt="-xvJ" ;;
       +                *.tar.bz2|*.tbz) method="-j" ;;
       +                *.tar.gz|*.tgz)  method="-z" ;;
       +                *.tar.xz|*.txz)  method="-J" ;;
                        *) echo "$archive: format not recognized" >&2; exit 1
                        esac
       -                src=$(${TAR} $opt -f $archive|sed -n 1p|cut -f1 -d/)
       +                ${TAR} $method -xf $archive
       +                src=$(${TAR} $method -tf $archive|sed -n 1p|cut -f1 -d/)
                        if [ "$src" != "$pkg-$ver" ]; then
                                mv "$src" "$pkg-$ver"
                        fi