wok annotate lzma/receipt @ rev 17613
Up: expat 2.1.0
author | Alexander Medvedev <devl547@gmail.com> |
---|---|
date | Thu Feb 12 19:30:27 2015 +0000 (2015-02-12) |
parents | 2a5cc8208d36 |
children | 9e01bc6321ea |
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@15379 | 8 LICENSE="LGPL2.1" |
pascal@224 | 9 TARBALL="lzma$(echo $VERSION | sed 's/\.//').tar.bz2" |
pascal@224 | 10 WEB_SITE="http://sourceforge.net/projects/sevenzip/" |
pascal@224 | 11 WGET_URL="$SF_MIRROR/sevenzip/$TARBALL" |
pascal@15379 | 12 TAGS="compression archive" |
pankso@15944 | 13 HOST_ARCH="i486 arm" |
pascal@15379 | 14 |
pascal@1736 | 15 DEPENDS="lzlib zlib gcc-lib-base" |
gokhlayeh@8197 | 16 |
pankso@15944 | 17 # Rules to configure and make the package. |
pankso@15944 | 18 compile_rules() |
gokhlayeh@8197 | 19 { |
gokhlayeh@8197 | 20 if [ ! -f done.lzlib.u ]; then |
slaxemulator@9700 | 21 patch -p0 < $stuff/lzlib.u || return 1 |
gokhlayeh@8197 | 22 touch done.lzlib.u |
gokhlayeh@8197 | 23 fi |
gokhlayeh@8197 | 24 cd CPP/7zip/Compress/LZMA_Alone |
pankso@15944 | 25 |
pankso@15944 | 26 # Handle cross compilation |
pankso@15944 | 27 case "$ARCH" in |
pankso@15944 | 28 arm) |
pankso@15944 | 29 sed -i s'/g++/arm-slitaz-linux-gnueabi-c++/' makefile.gcc |
pankso@15944 | 30 sed -i s'/gcc/arm-slitaz-linux-gnueabi-gcc/' makefile.gcc ;; |
pankso@15944 | 31 esac |
gokhlayeh@7634 | 32 |
gokhlayeh@7634 | 33 # Remove copyright message. |
gokhlayeh@7634 | 34 sed '/MY_VERSION_COPYRIGHT_DATE/d' -i LzmaAlone.cpp |
gokhlayeh@7634 | 35 |
pascal@15271 | 36 make -f makefile.gcc lzma 2> /dev/null |
pascal@1514 | 37 make -f makefile.gcc liblz.so.1.0.0 && |
pascal@1514 | 38 make -f makefile.gcc lzma |
pankso@126 | 39 } |
pankso@126 | 40 |
pankso@126 | 41 |
pankso@126 | 42 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@126 | 43 genpkg_rules() |
pankso@126 | 44 { |
pankso@126 | 45 mkdir -p $fs/usr/bin |
pascal@3854 | 46 cp -a $src/CPP/7zip/Compress/LZMA_Alone/lzma-shared $fs/usr/bin/lzma-alone |
slaxemulator@9682 | 47 cp $stuff/lzma $fs/usr/bin |
pascal@3854 | 48 chmod 755 $fs/usr/bin/lzma |
pascal@7616 | 49 ln -s lzma $fs/usr/bin/unlzma |
pascal@7616 | 50 ln -s lzma $fs/usr/bin/lzcat |
pankso@126 | 51 } |
pankso@126 | 52 |
slaxemulator@7617 | 53 # Pre and post install commands for Tazpkg. |
slaxemulator@7617 | 54 # We must remove all Busybox symlink before installing. |
slaxemulator@7617 | 55 # |
slaxemulator@7617 | 56 pre_install() |
slaxemulator@7617 | 57 { |
slaxemulator@7617 | 58 local root |
slaxemulator@7617 | 59 root=$1 |
slaxemulator@7617 | 60 echo "Processing pre-install commands..." |
slaxemulator@7617 | 61 echo -n "Removing all Busybox replaced utils... " |
slaxemulator@7617 | 62 rm -f $root/usr/bin/unlzma |
pascal@8878 | 63 rm -f $root/usr/bin/lzcat |
slaxemulator@7617 | 64 status |
slaxemulator@7617 | 65 } |
slaxemulator@7617 | 66 |
pascal@7616 | 67 post_remove() |
pascal@7616 | 68 { |
slaxemulator@9682 | 69 ln -s /bin/busybox $1/usr/bin/unlzma |
slaxemulator@9682 | 70 ln -s /bin/busybox $1/usr/bin/lzcat |
pascal@8878 | 71 } |