diff options
author | Mike Frysinger <vapier@gentoo.org> | 2009-02-26 19:27:42 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2009-02-26 19:27:42 +0000 |
commit | 4e33c34736e4a213b200e55a612251e53c7ede85 (patch) | |
tree | 26cfc1a3d154861a4c402da39cf2be31c40a68bd /app-arch | |
parent | Add realcodecs to base use.mask (diff) | |
download | historical-4e33c34736e4a213b200e55a612251e53c7ede85.tar.gz historical-4e33c34736e4a213b200e55a612251e53c7ede85.tar.bz2 historical-4e33c34736e4a213b200e55a612251e53c7ede85.zip |
Add a script to unpack makeself archives.
Package-Manager: portage-2.2_rc23/cvs/Linux x86_64
Diffstat (limited to 'app-arch')
-rw-r--r-- | app-arch/makeself/ChangeLog | 8 | ||||
-rw-r--r-- | app-arch/makeself/Manifest | 13 | ||||
-rwxr-xr-x | app-arch/makeself/files/makeself-unpack | 90 | ||||
-rw-r--r-- | app-arch/makeself/makeself-2.1.5.ebuild | 9 |
4 files changed, 106 insertions, 14 deletions
diff --git a/app-arch/makeself/ChangeLog b/app-arch/makeself/ChangeLog index 3f1fd057b558..c96676ad3566 100644 --- a/app-arch/makeself/ChangeLog +++ b/app-arch/makeself/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for app-arch/makeself -# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-arch/makeself/ChangeLog,v 1.20 2008/07/24 17:33:26 armin76 Exp $ +# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/app-arch/makeself/ChangeLog,v 1.21 2009/02/26 19:27:42 vapier Exp $ + + 26 Feb 2009; Mike Frysinger <vapier@gentoo.org> +files/makeself-unpack, + makeself-2.1.5.ebuild: + Add a script to unpack makeself archives. 24 Jul 2008; Raúl Porcel <armin76@gentoo.org> makeself-2.1.5.ebuild: x86 stable wrt #231074 diff --git a/app-arch/makeself/Manifest b/app-arch/makeself/Manifest index 63a544dfa45a..4e06055378dd 100644 --- a/app-arch/makeself/Manifest +++ b/app-arch/makeself/Manifest @@ -1,14 +1,15 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 +AUX makeself-unpack 2706 RMD160 7231e0083958d1d1446da0ec589a978d218cf9e7 SHA1 4b96038c37e4b0e46de1422ece3f3ed95c78fbac SHA256 f261dd66ab659323388a815ee557ded11ef875b1acf9d28891b4a60b90ba23aa DIST makeself-2.1.5.run 38210 RMD160 31e718793aa417e9b4cf4977b73459ffded19409 SHA1 803ca42ea64e51af72a4ee50b4d8f7a6107c926d SHA256 8227668bb35c34d86e6f0fe69c7bf4bd2813f51edfcbfc227896b4787b0a1a4e -EBUILD makeself-2.1.5.ebuild 657 RMD160 d9fb0abd53da69b3ff13651636e88cd12a5320be SHA1 bb52bac8bd9e84a72193dd9cd4edb79daf505e41 SHA256 b6b5018947030e0a544578ffbca8b58e4ea0c4e6a959a8b55eb1ded60272ea8d -MISC ChangeLog 2281 RMD160 6ea8f06567b9863e100c68a538b1b1f54c449749 SHA1 fde2065b69ffc589c3d4683b1f827f1dd8002ed7 SHA256 c5f75823869b8da62e19954426adb75be2e4cbd54eee10fbd13de007df14ce56 +EBUILD makeself-2.1.5.ebuild 665 RMD160 3de4e3a08a42abd58aa95a31b0c8faf338cab6e3 SHA1 7c2bfbcfea32fa8d5e0219fbff8aa6af08f3b851 SHA256 eddf63e1486f6bd9545e912af3144d6efc75146061d4a454f3cd6854558d9198 +MISC ChangeLog 2424 RMD160 652d92a1d23929effb4dab0a9fe431874681eac6 SHA1 6c3a363ccad8a143037fe0b8c1d7c434913be118 SHA256 bfd7925591730060fba9a50790be46f8e7df9ab4026fd6f3ee8537f313208fe4 MISC metadata.xml 227 RMD160 68f25e8ce5e465780290837fb03c20436c0efbe5 SHA1 7a1219914c99842ece8bef6ec9cfb5500fd2d3f8 SHA256 6fe6bf1dc158534d5f46bdba1ef0f2b0e5c209a05389a413eceead8a66c1aa3e -----BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.9 (GNU/Linux) +Version: GnuPG v2.0.10 (GNU/Linux) -iEYEARECAAYFAkmSIvIACgkQn/5bYzqsSmEkMgCgtyZQ1PwPVbIq4Cpp8eAybmpG -bk8AnRb7NSVR5EZcim+3QdEizS5YE4YC -=M1xo +iEYEARECAAYFAkmm7TUACgkQn/5bYzqsSmFK/gCeLZsIce+WIrnlNhWReT4+iPzc +TDEAnjFSNGn9B9k77+/0d3QcTnnKUHDO +=Ciky -----END PGP SIGNATURE----- diff --git a/app-arch/makeself/files/makeself-unpack b/app-arch/makeself/files/makeself-unpack new file mode 100755 index 000000000000..fc72fe67cf93 --- /dev/null +++ b/app-arch/makeself/files/makeself-unpack @@ -0,0 +1,90 @@ +#!/bin/bash + +# Glue to keep unpack_makeself() unchanged +source /etc/init.d/functions.sh +find_unpackable_file() { echo "$@"; } +debug-print() { :; } +emktemp() { mktemp "$@"; } +alias assert='_pipestatus="${PIPESTATUS[*]}"; [[ "${_pipestatus// /}" -eq 0 ]] || die' + +# Straight copied from eutils.eclass ... should be kept in sync +unpack_makeself() { + local src_input=${1:-${A}} + local src=$(find_unpackable_file "${src_input}") + local skip=$2 + local exe=$3 + + [[ -z ${src} ]] && die "Could not locate source for '${src_input}'" + + local shrtsrc=$(basename "${src}") + echo ">>> Unpacking ${shrtsrc} to ${PWD}" + if [[ -z ${skip} ]] ; then + local ver=$(grep -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 + skip=$(grep -a ^skip= "${src}" | cut -d= -f2) + ;; + 2.0|2.0.1) + skip=$(grep -a ^$'\t'tail "${src}" | awk '{print $2}' | cut -b2-) + ;; + 2.1.1) + skip=$(grep -a ^offset= "${src}" | awk '{print $2}' | cut -b2-) + let skip="skip + 1" + ;; + 2.1.2) + skip=$(grep -a ^offset= "${src}" | awk '{print $3}' | head -n 1) + let skip="skip + 1" + ;; + 2.1.3) + skip=`grep -a ^offset= "${src}" | awk '{print $3}'` + let skip="skip + 1" + ;; + 2.1.4|2.1.5) + skip=$(grep -a offset=.*head.*wc "${src}" | awk '{print $3}' | head -n 1) + skip=$(head -n ${skip} "${src}" | wc -c) + exe="dd" + ;; + *) + 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 "http://bugs.gentoo.org/ so that support can be added." + die "makeself version '${ver}' not supported" + ;; + esac + debug-print "Detected Makeself version ${ver} ... using ${skip} as offset" + fi + case ${exe} in + tail) exe="tail -n +${skip} '${src}'";; + dd) exe="dd ibs=${skip} skip=1 obs=1024 conv=sync 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) + eval ${exe} 2>/dev/null | head -c 512 > "${tmpfile}" + local filetype=$(file -b "${tmpfile}") + case ${filetype} in + *tar\ archive*) + eval ${exe} | tar --no-same-owner -xf - + ;; + bzip2*) + eval ${exe} | bzip2 -dc | tar --no-same-owner -xf - + ;; + gzip*) + eval ${exe} | tar --no-same-owner -xzf - + ;; + compress*) + eval ${exe} | gunzip | tar --no-same-owner -xf - + ;; + *) + eerror "Unknown filetype \"${filetype}\" ?" + false + ;; + esac + assert "failure unpacking (${filetype}) makeself ${shrtsrc} ('${ver}' +${skip})" +} + +for x; do unpack_makeself "$x" ; done diff --git a/app-arch/makeself/makeself-2.1.5.ebuild b/app-arch/makeself/makeself-2.1.5.ebuild index 4d66b0ce17c1..b0f5d908cc3b 100644 --- a/app-arch/makeself/makeself-2.1.5.ebuild +++ b/app-arch/makeself/makeself-2.1.5.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2008 Gentoo Foundation +# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-arch/makeself/makeself-2.1.5.ebuild,v 1.7 2008/09/29 01:52:54 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-arch/makeself/makeself-2.1.5.ebuild,v 1.8 2009/02/26 19:27:42 vapier Exp $ inherit eutils @@ -13,9 +13,6 @@ SLOT="0" KEYWORDS="amd64 hppa ppc s390 x86" IUSE="" -DEPEND="" -RDEPEND="" - S=${WORKDIR} src_unpack() { @@ -23,7 +20,7 @@ src_unpack() { } src_install() { - dobin makeself-header.sh makeself.sh || die + dobin makeself-header.sh makeself.sh "${FILESDIR}"/makeself-unpack || die doman makeself.1 dodoc README TODO makeself.lsm } |