wok-current annotate less/receipt @ rev 18730

Quote root dir in post_install
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Dec 20 15:13:45 2015 +0100 (2015-12-20)
parents 2b9f96603415
children d6ca18366f41
rev   line source
slaxemulator@11254 1 # SliTaz package receipt.
slaxemulator@11254 2
slaxemulator@11254 3 PACKAGE="less"
slaxemulator@11254 4 VERSION="444"
slaxemulator@11254 5 CATEGORY="base-system"
slaxemulator@11254 6 SHORT_DESC="A terminal based program for viewing text files"
slaxemulator@11254 7 MAINTAINER="slaxemulator@gmail.com"
pascal@14999 8 LICENSE="GPL3"
slaxemulator@11254 9 WEB_SITE="http://www.greenwoodsoftware.com/less"
slaxemulator@11254 10 TARBALL="$PACKAGE-$VERSION.tar.gz"
slaxemulator@11254 11 WGET_URL="$WEB_SITE/$TARBALL"
slaxemulator@11254 12
slaxemulator@11254 13 DEPENDS="ncurses pcre"
slaxemulator@11254 14 BUILD_DEPENDS="ncurses-dev pcre-dev"
slaxemulator@11254 15
slaxemulator@11254 16 # Rules to configure and make the package.
slaxemulator@11254 17 compile_rules()
slaxemulator@11254 18 {
slaxemulator@11254 19 cd $src
slaxemulator@11254 20 ./configure \
slaxemulator@11254 21 --prefix=/usr \
slaxemulator@11254 22 --sysconfdir=/etc \
slaxemulator@11254 23 --mandir=/usr/share/man \
slaxemulator@11254 24 --with-regex=pcre \
slaxemulator@11254 25 $CONFIGURE_ARGS &&
slaxemulator@11254 26 make && make prefix=$DESTDIR/usr mandir=$DESTDIR/usr/share/man install
slaxemulator@11254 27 }
slaxemulator@11254 28
slaxemulator@11254 29 # Rules to gen a SliTaz package suitable for Tazpkg.
slaxemulator@11254 30 genpkg_rules()
slaxemulator@11254 31 {
slaxemulator@11254 32 mkdir -p $fs/usr
slaxemulator@11254 33 cp -a $install/usr/bin $fs/usr
slaxemulator@11254 34 }
slaxemulator@11254 35
slaxemulator@11254 36 # Pre and post install commands for Tazpkg.
slaxemulator@11254 37 # We must remove all Busybox symlink before installing.
slaxemulator@11254 38 #
slaxemulator@11254 39 pre_install()
slaxemulator@11254 40 {
slaxemulator@11254 41 echo "Processing pre-install commands..."
slaxemulator@11254 42 echo -n "Removing all Busybox replaced utils... "
pascal@18730 43 rm -f "$1/usr/bin/less"
slaxemulator@11254 44 status
slaxemulator@11254 45 }
slaxemulator@11254 46
slaxemulator@11254 47 post_remove()
slaxemulator@11254 48 {
pascal@18730 49 ln -s /bin/busybox "$1/usr/bin/less"
slaxemulator@11254 50 }