pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk/extract Add support for cpio archives.
details: https://anonhg.NetBSD.org/pkgsrc/rev/a0be090e4987
branches: trunk
changeset: 518547:a0be090e4987
user: joerg <joerg%pkgsrc.org@localhost>
date: Wed Sep 13 11:10:36 2006 +0000
description:
Add support for cpio archives.
diffstat:
mk/extract/bsd.extract-vars.mk | 7 ++++++-
mk/extract/extract | 15 ++++++++++++++-
2 files changed, 20 insertions(+), 2 deletions(-)
diffs (59 lines):
diff -r bab3d703db2a -r a0be090e4987 mk/extract/bsd.extract-vars.mk
--- a/mk/extract/bsd.extract-vars.mk Wed Sep 13 09:29:06 2006 +0000
+++ b/mk/extract/bsd.extract-vars.mk Wed Sep 13 11:10:36 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.extract-vars.mk,v 1.4 2006/08/19 20:32:28 schwarz Exp $
+# $NetBSD: bsd.extract-vars.mk,v 1.5 2006/09/13 11:10:36 joerg Exp $
#
# This Makefile fragment is included separately by bsd.pkg.mk and
# defines some variables which must be defined earlier than where
@@ -37,6 +37,11 @@
USE_TOOLS+= pax
. endif
.endif
+.if !empty(EXTRACT_ONLY:M*.cpio) || \
+ !empty(EXTRACT_ONLY:M*.cpio.bz2) || \
+ !empty(EXTRACT_ONLY:M*.cpio.gz)
+USE_TOOLS+= pax
+.endif
.if !empty(EXTRACT_ONLY:M*.bz2) || \
!empty(EXTRACT_ONLY:M*.tbz) || \
!empty(EXTRACT_ONLY:M*.tbz2)
diff -r bab3d703db2a -r a0be090e4987 mk/extract/extract
--- a/mk/extract/extract Wed Sep 13 09:29:06 2006 +0000
+++ b/mk/extract/extract Wed Sep 13 11:10:36 2006 +0000
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: extract,v 1.2 2006/09/03 16:36:37 schwarz Exp $
+# $NetBSD: extract,v 1.3 2006/09/13 11:10:36 joerg Exp $
#
# Copyright (c) 2006 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -180,6 +180,8 @@
case "$distfile" in
*.tar.gz|*.tgz|*-tar.gz|*_tar.gz|*.tar.bz2|*.tbz|*.tbz2|*.tar.Z|*.tar.z|*.tar|*.tar.bz)
_format=tar ;;
+*.cpio|*.cpio.gz|*.cpio.bz2)
+ _format=cpio ;;
*.shar.gz|*.shar.bz2|*.shar.Z|*.shar|*.shr.gz|*.shr.bz2|*.shr.Z|*.shr)
_format=shar ;;
*.zip|*.ZIP) _format=zip ;;
@@ -254,6 +256,17 @@
esac
;;
+cpio)
+ : ${EXTRACT_OPTS_PAX=}
+ if ${TEST} -n "$exclude_file"; then
+ exclude=yes
+ set -- dummy `${CAT} "$exclude_file"`; shift
+ fi
+ ${TEST} "$exclude" = no || exclude_flag="-c"
+ $decompress_cat "$distfile" |
+ ${PAX} ${EXTRACT_OPTS_PAX} $exclude_flag -r ${1+"$@"}
+ ;;
+
shar)
$decompress_cat "$distfile" | ${SH}
;;
Home |
Main Index |
Thread Index |
Old Index