wok annotate lzma/receipt @ rev 12839

dropbear: make it cross-compile for ARM (had to disable zlib)
author Christophe Lincoln <pankso@slitaz.org>
date Wed May 23 01:32:48 2012 +0200 (2012-05-23)
parents f554e00e7954
children b2c3e949d4ff
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
slaxemulator@9700 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
slaxemulator@9682 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
slaxemulator@9682 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
pascal@8878 87 rm -f $root/usr/bin/lzcat
slaxemulator@7617 88 status
slaxemulator@7617 89 }
slaxemulator@7617 90
pascal@7616 91 post_remove()
pascal@7616 92 {
slaxemulator@9682 93 ln -s /bin/busybox $1/usr/bin/unlzma
slaxemulator@9682 94 ln -s /bin/busybox $1/usr/bin/lzcat
pascal@8878 95 }