wok-6.x annotate lzma/receipt @ rev 8523

Fix icedtea6-jdk: don't exit but return if an error occurs
author Antoine Bodin <gokhlayeh@slitaz.org>
date Sun Feb 13 03:21:54 2011 +0100 (2011-02-13)
parents 7941d6ba7e42
children 2ad34d8fdfe7
rev   line source
pankso@126 1 # SliTaz package receipt.
pankso@126 2
pankso@126 3 PACKAGE="lzma"
pascal@224 4 VERSION="4.57"
pankso@210 5 CATEGORY="base-system"
pankso@126 6 SHORT_DESC="Compressor with a high compression ratio."
pankso@126 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@224 8 TARBALL="lzma$(echo $VERSION | sed 's/\.//').tar.bz2"
pascal@224 9 WEB_SITE="http://sourceforge.net/projects/sevenzip/"
pascal@224 10 WGET_URL="$SF_MIRROR/sevenzip/$TARBALL"
pascal@1736 11 DEPENDS="lzlib zlib gcc-lib-base"
gokhlayeh@8197 12 TAGS="compression archive"
gokhlayeh@8197 13
gokhlayeh@8197 14 # Rules to compile & install the temporary toolchain.
gokhlayeh@8197 15 cook_tmp_toolchain()
gokhlayeh@8197 16 {
gokhlayeh@8197 17 # Put & configure the home-script as needed for tmp toolchain.
gokhlayeh@8197 18 rm /tools/usr/bin/lzma /tools/usr/bin/unlzma /tools/usr/bin/lzcat
gokhlayeh@8197 19 cp stuff/lzma /tools/usr/bin
gokhlayeh@8197 20 chmod 755 /tools/usr/bin/lzma
gokhlayeh@8197 21 ln -s /tools/usr/bin/lzma /tools/usr/bin/unlzma
gokhlayeh@8197 22 ln -s /tools/usr/bin/lzma /tools/usr/bin/lzcat
gokhlayeh@8197 23 sed 's~/usr~/tools/usr~' -i /tools/usr/bin/lzma
gokhlayeh@8197 24
gokhlayeh@8197 25 cd $src
gokhlayeh@8197 26 if [ ! -f done.lzlib.u ]; then
gokhlayeh@8197 27 patch -p0 < ../stuff/lzlib.u || return 1
gokhlayeh@8197 28 touch done.lzlib.u
gokhlayeh@8197 29 fi
gokhlayeh@8197 30 cd CPP/7zip/Compress/LZMA_Alone
gokhlayeh@8197 31
gokhlayeh@8197 32 # Remove copyright message.
gokhlayeh@8197 33 sed '/MY_VERSION_COPYRIGHT_DATE/d' -i LzmaAlone.cpp
gokhlayeh@8197 34
gokhlayeh@8197 35 make -f makefile.gcc lzma
gokhlayeh@8197 36 { make -f makefile.gcc liblz.so.1.0.0 &&
gokhlayeh@8197 37 make -f makefile.gcc lzma
gokhlayeh@8197 38 } || return 1
gokhlayeh@8197 39
gokhlayeh@8197 40 cp -a lzma-shared /tools/usr/bin/lzma-alone
gokhlayeh@8197 41 cp -a liblz.so.1.0.0 /tools/lib
gokhlayeh@8197 42 ln -s /tools/lib/liblz.so.1.0.0 /tools/lib/liblz.so
gokhlayeh@8197 43 ln -s /tools/lib/liblz.so.1.0.0 /tools/lib/liblz.so.1
gokhlayeh@8197 44 }
gokhlayeh@8197 45
pankso@126 46
pankso@126 47 # Rules to configure and make the package.
pankso@126 48 compile_rules()
pankso@126 49 {
pascal@1449 50 cd $src
pascal@1442 51 if [ ! -f done.lzlib.u ]; then
pascal@1449 52 patch -p0 < ../stuff/lzlib.u || return 1
pascal@1442 53 touch done.lzlib.u
pascal@1442 54 fi
gokhlayeh@7902 55 cd CPP/7zip/Compress/LZMA_Alone
gokhlayeh@7634 56
gokhlayeh@7634 57 # Remove copyright message.
gokhlayeh@7634 58 sed '/MY_VERSION_COPYRIGHT_DATE/d' -i LzmaAlone.cpp
gokhlayeh@7634 59
pascal@1514 60 make -f makefile.gcc lzma
pascal@1514 61 make -f makefile.gcc liblz.so.1.0.0 &&
pascal@1514 62 make -f makefile.gcc lzma
pankso@126 63 }
pankso@126 64
pankso@126 65
pankso@126 66 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@126 67 genpkg_rules()
pankso@126 68 {
pankso@126 69 mkdir -p $fs/usr/bin
pascal@3854 70 cp -a $src/CPP/7zip/Compress/LZMA_Alone/lzma-shared $fs/usr/bin/lzma-alone
pascal@3854 71 cp stuff/lzma $fs/usr/bin
pascal@3854 72 chmod 755 $fs/usr/bin/lzma
pascal@7616 73 ln -s lzma $fs/usr/bin/unlzma
pascal@7616 74 ln -s lzma $fs/usr/bin/lzcat
pankso@126 75 }
pankso@126 76
slaxemulator@7617 77 # Pre and post install commands for Tazpkg.
slaxemulator@7617 78 # We must remove all Busybox symlink before installing.
slaxemulator@7617 79 #
slaxemulator@7617 80 pre_install()
slaxemulator@7617 81 {
slaxemulator@7617 82 local root
slaxemulator@7617 83 root=$1
slaxemulator@7617 84 echo "Processing pre-install commands..."
slaxemulator@7617 85 echo -n "Removing all Busybox replaced utils... "
slaxemulator@7617 86 rm -f $root/usr/bin/unlzma
slaxemulator@7617 87 status
slaxemulator@7617 88 }
slaxemulator@7617 89
pascal@7616 90 post_remove()
pascal@7616 91 {
slaxemulator@7617 92 ln -s /bin/busybox /usr/bin/unlzma
slaxemulator@7617 93 }