As a side note, I wish the various SlackBuilds would use the .bin file as a source instead of the .tar.bz2 file, since it is approximately 13.5 Mb smaller due to use of LZMA compression (the same type of high compression used in 7z and xz files).
The .bin actually has a .tar.lzma archive inside it with the exact same files as the .tar.bz2 that is currently used as a source. The contents of this compressed tar can be extracted by either of the following commands:
Code:
$ tail -c+6889 AdbeRdr9.5.5-1_i486linux_enu.bin | bsdtar xvf -
Code:
$ tail -c+6889 AdbeRdr9.5.5-1_i486linux_enu.bin | xz -qqd | tar xv
The value 6889 marks the start of LZMA compressed tar. This value has not changed in all releases of Acroread since .bin files where first offered (i.e. AdbeRdr9.1.0-1_i486linux_enu.bin from February 2009), so it should be relatively safe just to hardcode this value.
For background, I calculated it by using a Regex to search for the start of a typical LZMA stream and printing its position, like so (adding 1 to the resultant value.):
Code:
$ grep -Pabom1 ']\x00{2}.{4}\xff{6}' AdbeRdr9.5.5-1_i486linux_enu.bin
6888:]�������
I did once suggest this (approximately 8 months) to the maintainer for the SBo SlackBuild but never heard back (although the Arch PKGBUILD maintainer did take
my suggestion). Here is a suggested patch to the SBo SlackBuild:
Code:
--- adobe-reader.SlackBuild.orig 2013-11-26 10:57:40.000000000 +0100
+++ adobe-reader.SlackBuild 2014-05-30 12:57:23.000000000 +0200
@@ -46,7 +46,7 @@
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf AdobeReader
-tar xvf $CWD/AdbeRdr${VERSION}-1_${ARCH}linux_${ADOBE_LANG}.tar.bz2
+tail -c+6889 $CWD/AdbeRdr${VERSION}-1_${ARCH}linux_${ADOBE_LANG}.bin | bsdtar xvf -
VERSION=${VERSION}_$ADOBE_LANG
P.S. I learnt the trick of finding compressed files within another file when I once attempted to make the
smallest possible rpm2cpio in shell script. I managed it in 8 lines.