From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Oct 21 18:50:14 2005 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9E07216A41F for ; Fri, 21 Oct 2005 18:50:14 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8A87943D48 for ; Fri, 21 Oct 2005 18:50:13 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j9LIoDRo070187 for ; Fri, 21 Oct 2005 18:50:13 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j9LIoD4q070182; Fri, 21 Oct 2005 18:50:13 GMT (envelope-from gnats) Resent-Date: Fri, 21 Oct 2005 18:50:13 GMT Resent-Message-Id: <200510211850.j9LIoD4q070182@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Juergen Lock Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4FCC316A41F for ; Fri, 21 Oct 2005 18:42:50 +0000 (GMT) (envelope-from nox@saturn.kn-bremen.de) Received: from gwyn.kn-bremen.de (gwyn.kn-bremen.de [212.63.36.242]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7BCBB43D45 for ; Fri, 21 Oct 2005 18:42:48 +0000 (GMT) (envelope-from nox@saturn.kn-bremen.de) Received: from gwyn.kn-bremen.de (gwyn [127.0.0.1]) by gwyn.kn-bremen.de (8.13.4/8.13.4/Debian-3) with ESMTP id j9LIglEv003820 for ; Fri, 21 Oct 2005 20:42:47 +0200 Received: from saturn.kn-bremen.de (uucp@localhost) by gwyn.kn-bremen.de (8.13.4/8.13.4/Submit) with UUCP id j9LIglRc003818 for FreeBSD-gnats-submit@freebsd.org; Fri, 21 Oct 2005 20:42:47 +0200 Received: from saturn.kn-bremen.de (localhost [127.0.0.1]) by saturn.kn-bremen.de (8.13.1/8.13.1) with ESMTP id j9LIVZlH008946 for ; Fri, 21 Oct 2005 20:31:35 +0200 (CEST) (envelope-from nox@saturn.kn-bremen.de) Received: (from nox@localhost) by saturn.kn-bremen.de (8.13.1/8.13.1/Submit) id j9LIVYOk008945; Fri, 21 Oct 2005 20:31:34 +0200 (CEST) (envelope-from nox) Message-Id: <200510211831.j9LIVYOk008945@saturn.kn-bremen.de> Date: Fri, 21 Oct 2005 20:31:34 +0200 (CEST) From: Juergen Lock To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/87802: archivers/p7zip: add p7zip script as discussed on -ports X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Juergen Lock List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2005 18:50:14 -0000 >Number: 87802 >Category: ports >Synopsis: archivers/p7zip: add p7zip script as discussed on -ports >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Fri Oct 21 18:50:12 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Juergen Lock >Release: FreeBSD 5.3-RELEASE-p20 i386 >Organization: me? organized?? >Environment: System: FreeBSD saturn 5.3-RELEASE-p20 FreeBSD 5.3-RELEASE-p20 #1: Fri Jul 29 14:59:03 CEST 2005 nox@saturn:/usr/home/nox/src5/usr/src/sys/i386/compile/NEPTUN i386 >Description: Add preliminary p7zip script, as discussed on -ports >How-To-Repeat: n/a >Fix: New file: files/p7zip Index: Makefile =================================================================== RCS file: /home/ncvs/ports/archivers/p7zip/Makefile,v retrieving revision 1.13 diff -u -r1.13 Makefile --- Makefile 15 Oct 2005 12:47:26 -0000 1.13 +++ Makefile 18 Oct 2005 18:55:50 -0000 @@ -7,6 +7,7 @@ PORTNAME= p7zip PORTVERSION= 4.29 +PORTREVISION= 1 CATEGORIES= archivers MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= p7zip @@ -65,6 +66,7 @@ .endfor ${INSTALL_SCRIPT} ${FILESDIR}/7z ${PREFIX}/bin ${LN} -sf 7z ${PREFIX}/bin/7za + ${INSTALL_SCRIPT} ${FILESDIR}/p7zip ${PREFIX}/bin .if !defined(WITHOUT_MODULES) .for f in Codecs Formats ${MKDIR} ${DLLDIR}/${f} Index: pkg-plist =================================================================== RCS file: /home/ncvs/ports/archivers/p7zip/pkg-plist,v retrieving revision 1.6 diff -u -r1.6 pkg-plist --- pkg-plist 15 Oct 2005 12:47:26 -0000 1.6 +++ pkg-plist 18 Oct 2005 18:56:38 -0000 @@ -1,5 +1,6 @@ @unexec /bin/rm -f %D/bin/7za bin/7z +bin/p7zip @exec /bin/ln -sf 7z %D/bin/7za %%MODULES%%libexec/p7zip/7z libexec/p7zip/7za Index: files/p7zip @@ -0,0 +1,74 @@ +#!/bin/sh +# gzip-like CLI wrapper for p7zip +set -e + +compress=true +file= + +usage () + { + echo "Usage: $0 [-d] [-h|--help] [file]" + exit 1 + } + +while [ "$#" != "0" ] ; do + case "$1" in + -d) compress=false ;; + -c) echo "$0: ignoring $1 option (not yet implemented)" ;; + -h|--help) usage ;; + *) + if [ "${file}" = "" ] ; then + file="$1" + else + usage + fi + ;; + esac + shift +done + +# make sure they're present, before we screw up +for i in mktemp 7z rm cat tty ; do + if ! which $i > /dev/null ; then + echo "$0: $i: command not found" + exit 1 + fi +done + +if [ "${file}" != "" ] ; then + if ${compress} ; then + 7z a ${file}.7z ${file} + rm ${file} + else + case ${file} in + *.7z) + 7z x ${file} + rm ${file} + ;; + *) + echo "$0: ${file}: unknown suffix -- ignored" + ;; + esac + fi + exit 0 +fi + +P7ZTMP=${TMP:-/tmp} +tmp=`mktemp ${P7ZTMP}/p7z.XXXXXXXX` +trap "rm -f ${tmp}" 0 + +if ${compress} ; then + if tty > /dev/null ; then + echo "$0: compressed data not written to a terminal." + echo "For help, type: $0 -h" + exit 1 + fi + rm -f ${tmp} + 7z a ${tmp} -si >/dev/null + cat ${tmp} +else + cat > ${tmp} + 7z x ${tmp} -so 2>/dev/null | cat +fi + +rm -f ${tmp} >Release-Note: >Audit-Trail: >Unformatted: