diff options
author | Mike Frysinger <vapier@gentoo.org> | 2014-02-18 06:18:50 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2014-02-18 06:18:50 +0000 |
commit | f0662fa7469451fc50e288fe2d58aa120d32f673 (patch) | |
tree | 0560d66a2f06663e13d668c2f2e7d2bdefdccc22 /app-arch/makeself | |
parent | add makeself 2.2.0 version (diff) | |
download | gentoo-2-f0662fa7469451fc50e288fe2d58aa120d32f673.tar.gz gentoo-2-f0662fa7469451fc50e288fe2d58aa120d32f673.tar.bz2 gentoo-2-f0662fa7469451fc50e288fe2d58aa120d32f673.zip |
Version bump.
(Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key D2E96200)
Diffstat (limited to 'app-arch/makeself')
-rw-r--r-- | app-arch/makeself/ChangeLog | 11 | ||||
-rw-r--r-- | app-arch/makeself/files/makeself-2.2.0-help-header.patch | 124 | ||||
-rwxr-xr-x | app-arch/makeself/files/makeself-unpack | 40 | ||||
-rw-r--r-- | app-arch/makeself/makeself-2.2.0.ebuild | 29 |
4 files changed, 187 insertions, 17 deletions
diff --git a/app-arch/makeself/ChangeLog b/app-arch/makeself/ChangeLog index f91c48e14c28..8b1b0b3cf06f 100644 --- a/app-arch/makeself/ChangeLog +++ b/app-arch/makeself/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for app-arch/makeself -# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-arch/makeself/ChangeLog,v 1.31 2012/08/29 13:48:32 kensington Exp $ +# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/app-arch/makeself/ChangeLog,v 1.32 2014/02/18 06:18:50 vapier Exp $ + +*makeself-2.2.0 (18 Feb 2014) + + 18 Feb 2014; Mike Frysinger <vapier@gentoo.org> + +files/makeself-2.2.0-help-header.patch, +makeself-2.2.0.ebuild, + files/makeself-unpack: + Version bump. 29 Aug 2012; Michael Palimaka <kensington@gentoo.org> -makeself-2.1.5.ebuild: Remove old. diff --git a/app-arch/makeself/files/makeself-2.2.0-help-header.patch b/app-arch/makeself/files/makeself-2.2.0-help-header.patch new file mode 100644 index 000000000000..5726bf55f7da --- /dev/null +++ b/app-arch/makeself/files/makeself-2.2.0-help-header.patch @@ -0,0 +1,124 @@ +From c9f605cb4a3903985f2c6f816c30c1edf728c1b5 Mon Sep 17 00:00:00 2001 +From: Jon Salz <jsalz@google.com> +Date: Mon, 27 Jan 2014 16:04:33 +0800 +Subject: [PATCH] Add --help-header option to prepend a string to the archive's + --help. + +--- + makeself-header.sh | 3 ++- + makeself.sh | 71 ++++++++++++++++++++++++++++++------------------------ + 2 files changed, 41 insertions(+), 33 deletions(-) + +diff --git a/makeself-header.sh b/makeself-header.sh +index e3f6c11..f97758c 100755 +--- a/makeself-header.sh ++++ b/makeself-header.sh +@@ -13,6 +13,7 @@ label="$LABEL" + script="$SCRIPT" + scriptargs="$SCRIPTARGS" + licensetxt="$LICENSE" ++helpheader='$HELPHEADER' + targetdir="$archdirname" + filesizes="$filesizes" + keep="$KEEP" +@@ -119,7 +120,7 @@ MS_dd_Progress() + MS_Help() + { + cat << EOH >&2 +-Makeself version $MS_VERSION ++\${helpheader}Makeself version $MS_VERSION + 1) Getting help or info about \$0 : + \$0 --help Print this message + \$0 --info Print embedded info : title, default target directory, embedded script ... +diff --git a/makeself.sh b/makeself.sh +index 361d710..cb2d6f2 100755 +--- a/makeself.sh ++++ b/makeself.sh +@@ -88,38 +88,39 @@ MS_Usage() + { + echo "Usage: $0 [params] archive_dir file_name label startup_script [args]" + echo "params can be one or more of the following :" +- echo " --version | -v : Print out Makeself version number and exit" +- echo " --help | -h : Print out this help message" +- echo " --quiet | -q : Do not print any messages other than errors." +- echo " --gzip : Compress using gzip (default if detected)" +- echo " --bzip2 : Compress using bzip2 instead of gzip" +- echo " --pbzip2 : Compress using pbzip2 instead of gzip" +- echo " --xz : Compress using xz instead of gzip" +- echo " --compress : Compress using the UNIX 'compress' command" +- echo " --complevel lvl : Compression level for gzip xz bzip2 and pbzip2 (default 9)" +- echo " --base64 : Instead of compressing, encode the data using base64" +- echo " --nocomp : Do not compress the data" +- echo " --notemp : The archive will create archive_dir in the" +- echo " current directory and uncompress in ./archive_dir" +- echo " --copy : Upon extraction, the archive will first copy itself to" +- echo " a temporary directory" +- echo " --append : Append more files to an existing Makeself archive" +- echo " The label and startup scripts will then be ignored" +- echo " --target dir : Extract directly to a target directory" +- echo " directory path can be either absolute or relative" +- echo " --current : Files will be extracted to the current directory" +- echo " Both --current and --target imply --notemp" +- echo " --tar-extra opt : Append more options to the tar command line" +- echo " --nomd5 : Don't calculate an MD5 for archive" +- echo " --nocrc : Don't calculate a CRC for archive" +- echo " --header file : Specify location of the header script" +- echo " --follow : Follow the symlinks in the archive" +- echo " --noprogress : Do not show the progress during the decompression" +- echo " --nox11 : Disable automatic spawn of a xterm" +- echo " --nowait : Do not wait for user input after executing embedded" +- echo " program from an xterm" +- echo " --lsm file : LSM file describing the package" +- echo " --license file : Append a license file" ++ echo " --version | -v : Print out Makeself version number and exit" ++ echo " --help | -h : Print out this help message" ++ echo " --quiet | -q : Do not print any messages other than errors." ++ echo " --gzip : Compress using gzip (default if detected)" ++ echo " --bzip2 : Compress using bzip2 instead of gzip" ++ echo " --pbzip2 : Compress using pbzip2 instead of gzip" ++ echo " --xz : Compress using xz instead of gzip" ++ echo " --compress : Compress using the UNIX 'compress' command" ++ echo " --complevel lvl : Compression level for gzip xz bzip2 and pbzip2 (default 9)" ++ echo " --base64 : Instead of compressing, encode the data using base64" ++ echo " --nocomp : Do not compress the data" ++ echo " --notemp : The archive will create archive_dir in the" ++ echo " current directory and uncompress in ./archive_dir" ++ echo " --copy : Upon extraction, the archive will first copy itself to" ++ echo " a temporary directory" ++ echo " --append : Append more files to an existing Makeself archive" ++ echo " The label and startup scripts will then be ignored" ++ echo " --target dir : Extract directly to a target directory" ++ echo " directory path can be either absolute or relative" ++ echo " --current : Files will be extracted to the current directory" ++ echo " Both --current and --target imply --notemp" ++ echo " --tar-extra opt : Append more options to the tar command line" ++ echo " --nomd5 : Don't calculate an MD5 for archive" ++ echo " --nocrc : Don't calculate a CRC for archive" ++ echo " --header file : Specify location of the header script" ++ echo " --follow : Follow the symlinks in the archive" ++ echo " --noprogress : Do not show the progress during the decompression" ++ echo " --nox11 : Disable automatic spawn of a xterm" ++ echo " --nowait : Do not wait for user input after executing embedded" ++ echo " program from an xterm" ++ echo " --lsm file : LSM file describing the package" ++ echo " --license file : Append a license file" ++ echo " --help-header file : Add a header to the archive's --help output" + echo + echo "Do not forget to give a fully qualified startup script name" + echo "(i.e. with a ./ prefix if inside the archive)." +@@ -254,6 +255,12 @@ do + LSM_CMD="cat \"$2\" >> \"\$archname\"" + if ! shift 2; then MS_Help; exit 1; fi + ;; ++ --help-header) ++ HELPHEADER=`sed -e "s/'/'\\\\\''/g" $2` ++ if ! shift 2; then MS_Help; exit 1; fi ++ [ -n "$HELPHEADER" ] && HELPHEADER="$HELPHEADER ++" ++ ;; + -q | --quiet) + QUIET=y + shift +-- +1.8.5.5 + diff --git a/app-arch/makeself/files/makeself-unpack b/app-arch/makeself/files/makeself-unpack index fc72fe67cf93..d8f5e17d194c 100755 --- a/app-arch/makeself/files/makeself-unpack +++ b/app-arch/makeself/files/makeself-unpack @@ -5,9 +5,15 @@ source /etc/init.d/functions.sh find_unpackable_file() { echo "$@"; } debug-print() { :; } emktemp() { mktemp "$@"; } -alias assert='_pipestatus="${PIPESTATUS[*]}"; [[ "${_pipestatus// /}" -eq 0 ]] || die' +die() { eerror "$*"; exit 1; } +assert() { _pipestatus="${PIPESTATUS[*]}"; [[ "${_pipestatus// /}" -eq 0 ]] || die; } + +# Straight copied from unpacker.eclass ... should be kept in sync + +unpack_banner() { + echo ">>> Unpacking ${1##*/} to ${PWD}" +} -# Straight copied from eutils.eclass ... should be kept in sync unpack_makeself() { local src_input=${1:-${A}} local src=$(find_unpackable_file "${src_input}") @@ -16,14 +22,14 @@ unpack_makeself() { [[ -z ${src} ]] && die "Could not locate source for '${src_input}'" - local shrtsrc=$(basename "${src}") - echo ">>> Unpacking ${shrtsrc} to ${PWD}" + unpack_banner "${src}" + if [[ -z ${skip} ]] ; then - local ver=$(grep -a '#.*Makeself' "${src}" | awk '{print $NF}') + local ver=$(grep -m1 -a '#.*Makeself' "${src}" | awk '{print $NF}') local skip=0 exe=tail case ${ver} in - 1.5.*|1.6.0-nv) # tested 1.5.{3,4,5} ... guessing 1.5.x series is same + 1.5.*|1.6.0-nv*) # tested 1.5.{3,4,5} ... guessing 1.5.x series is same skip=$(grep -a ^skip= "${src}" | cut -d= -f2) ;; 2.0|2.0.1) @@ -31,17 +37,17 @@ unpack_makeself() { ;; 2.1.1) skip=$(grep -a ^offset= "${src}" | awk '{print $2}' | cut -b2-) - let skip="skip + 1" + (( skip++ )) ;; 2.1.2) skip=$(grep -a ^offset= "${src}" | awk '{print $3}' | head -n 1) - let skip="skip + 1" + (( skip++ )) ;; 2.1.3) skip=`grep -a ^offset= "${src}" | awk '{print $3}'` - let skip="skip + 1" + (( skip++ )) ;; - 2.1.4|2.1.5) + 2.1.4|2.1.5|2.1.6|2.2.0) skip=$(grep -a offset=.*head.*wc "${src}" | awk '{print $3}' | head -n 1) skip=$(head -n ${skip} "${src}" | wc -c) exe="dd" @@ -49,7 +55,7 @@ unpack_makeself() { *) eerror "I'm sorry, but I was unable to support the Makeself file." eerror "The version I detected was '${ver}'." - eerror "Please file a bug about the file ${shrtsrc} at" + eerror "Please file a bug about the file ${src##*/} at" eerror "http://bugs.gentoo.org/ so that support can be added." die "makeself version '${ver}' not supported" ;; @@ -58,14 +64,14 @@ unpack_makeself() { fi case ${exe} in tail) exe="tail -n +${skip} '${src}'";; - dd) exe="dd ibs=${skip} skip=1 obs=1024 conv=sync if='${src}'";; + dd) exe="dd ibs=${skip} skip=1 if='${src}'";; *) die "makeself cant handle exe '${exe}'" esac # lets grab the first few bytes of the file to figure out what kind of archive it is - local tmpfile=$(emktemp) + local filetype tmpfile=$(emktemp) eval ${exe} 2>/dev/null | head -c 512 > "${tmpfile}" - local filetype=$(file -b "${tmpfile}") + filetype=$(file -b "${tmpfile}") || die case ${filetype} in *tar\ archive*) eval ${exe} | tar --no-same-owner -xf - @@ -79,12 +85,16 @@ unpack_makeself() { compress*) eval ${exe} | gunzip | tar --no-same-owner -xf - ;; + XZ*) + eval ${exe} | unxz | tar --no-same-owner -xf - + ;; *) eerror "Unknown filetype \"${filetype}\" ?" false ;; esac - assert "failure unpacking (${filetype}) makeself ${shrtsrc} ('${ver}' +${skip})" + assert "failure unpacking (${filetype}) makeself ${src##*/} ('${ver}' +${skip})" + rm "${tmpfile}" } for x; do unpack_makeself "$x" ; done diff --git a/app-arch/makeself/makeself-2.2.0.ebuild b/app-arch/makeself/makeself-2.2.0.ebuild new file mode 100644 index 000000000000..5a486145b708 --- /dev/null +++ b/app-arch/makeself/makeself-2.2.0.ebuild @@ -0,0 +1,29 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-arch/makeself/makeself-2.2.0.ebuild,v 1.1 2014/02/18 06:18:50 vapier Exp $ + +EAPI="4" + +inherit unpacker eutils + +DESCRIPTION="shell script that generates a self-extractible tar.gz" +HOMEPAGE="http://www.megastep.org/makeself/" +SRC_URI="https://github.com/megastep/makeself/archive/release-${PV}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~hppa ~ppc ~x86 ~amd64-linux ~x86-linux" +IUSE="" + +S="${WORKDIR}/${PN}-release-${PV}" + +src_prepare() { + epatch "${FILESDIR}"/${P}-help-header.patch +} + +src_install() { + dobin makeself-header.sh makeself.sh "${FILESDIR}"/makeself-unpack + dosym makeself.sh /usr/bin/makeself + doman makeself.1 + dodoc README.md makeself.lsm +} |