wok view pbzip2/receipt @ rev 24102

Add some current_version
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Sep 17 10:35:57 2021 +0000 (2021-09-17)
parents 425563100416
children
line source
1 # SliTaz package receipt.
3 PACKAGE="pbzip2"
4 VERSION="1.1.13"
5 CATEGORY="base-system"
6 SHORT_DESC="Parallel implementation of bzip2."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="BSD"
9 TARBALL="$PACKAGE-$VERSION.tar.gz"
10 WEB_SITE="https://web.archive.org/web/20180324210720/http://compression.ca/pbzip2/"
11 WGET_URL="https://launchpad.net/pbzip2/${VERSION%.*}/$VERSION/+download/$TARBALL"
13 DEPENDS="bzlib"
14 BUILD_DEPENDS="bzip2-dev wget"
16 current_version()
17 {
18 wget -O - https://launchpad.net/pbzip2 2>/dev/null | \
19 sed '/Latest version/!d;s|.*is ||'
20 }
22 # Rules to configure and make the package.
23 compile_rules()
24 {
25 make
26 }
28 # Rules to gen a SliTaz package suitable for Tazpkg.
29 genpkg_rules()
30 {
31 mkdir -p $fs/usr/bin
32 cp $src/pbzip2 $fs/usr/bin
33 }
35 pre_remove()
36 {
37 sed -i '/bzip2=pbzip2/d' $1/etc/profile
38 }
40 post_install()
41 {
42 grep -qs 'bzip2=pbzip2' $1/etc/profile ||
43 echo 'alias bzip2=pbzip2' >> $1/etc/profile
44 }