wok-next annotate bzip2/receipt @ rev 11589

hydrogen: install hack
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Jan 09 16:38:12 2012 +0100 (2012-01-09)
parents 281db43073fb
children 09524cdf6ae8
rev   line source
pankso@11 1 # SliTaz package receipt.
pankso@11 2
pankso@11 3 PACKAGE="bzip2"
slaxemulator@6376 4 VERSION="1.0.6"
pankso@211 5 CATEGORY="utilities"
pankso@11 6 SHORT_DESC="High-quality data compressor."
pankso@11 7 MAINTAINER="pankso@slitaz.org"
pankso@11 8 TARBALL="$PACKAGE-$VERSION.tar.gz"
pankso@11 9 WEB_SITE="http://www.bzip.org/"
slaxemulator@5410 10 WGET_URL="http://www.bzip.org/$VERSION/$TARBALL"
pascal@752 11 DEPENDS="bzlib"
gokhlayeh@8174 12 BUILD_DEPENDS="gcc"
jozee@3568 13 TAGS="compression archive"
pankso@11 14
gokhlayeh@8174 15 # Rules to compile & install the temporary toolchain.
gokhlayeh@8174 16 cook_tmp_toolchain()
gokhlayeh@8174 17 {
gokhlayeh@8174 18 cd $src
gokhlayeh@8174 19 make && make PREFIX=/tools install
gokhlayeh@8174 20 }
gokhlayeh@8174 21
pankso@11 22 # Rules to configure and make the package.
pankso@11 23 compile_rules()
pankso@11 24 {
pankso@11 25 cd $src
gokhlayeh@8174 26 make -f Makefile-libbz2_so &&
gokhlayeh@8174 27 make clean &&
pankso@11 28 make
pankso@11 29 }
pankso@11 30
pankso@11 31 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@11 32 genpkg_rules()
pankso@11 33 {
pascal@752 34 mkdir -p $fs/usr/bin
pankso@11 35 cp -a $src/bzip2-shared $fs/usr/bin/bzip2
pankso@11 36 # Da bunzip2, bzcat and lib symlink.
pankso@11 37 cd $fs/usr/bin
pankso@11 38 ln -s bzip2 bunzip2
pankso@11 39 ln -s bzip2 bzcat
pankso@11 40 }
pankso@11 41
rcx@3694 42 # Remove Busybox symlinks before installing
pankso@11 43 pre_install()
pankso@11 44 {
pankso@11 45 local root
pankso@11 46 root=$1
pankso@11 47 echo "Processing post-install commands..."
rcx@3694 48 rm -f $root/usr/bin/bunzip2
pankso@11 49 rm -f $root/usr/bin/bzcat
rcx@3694 50 # rm -f $root/usr/bin/bzip2
pankso@11 51 }
rcx@3694 52
rcx@3694 53 # Restore Busybox symlinks upon removal
rcx@3694 54 post_remove()
rcx@3694 55 {
rcx@3694 56 ln -s /bin/busybox /usr/bin/bunzip2
rcx@3694 57 ln -s /bin/busybox /usr/bin/bzcat
rcx@3694 58 # ln -s /bin/busybox /usr/bin/bzip2
rcx@3694 59 }