wok view upx/receipt @ rev 25532

Add some current_version()
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Feb 27 10:46:05 2023 +0000 (20 months ago)
parents bf00db9e594d
children 0262035dc1e7
line source
1 # SliTaz package receipt.
3 PACKAGE="upx"
4 VERSION="3.96"
5 CATEGORY="system-tools"
6 SHORT_DESC="Ultimate Packer for eXecutables (free version using UCL compression)"
7 MAINTAINER="devl547@gmail.com"
8 LICENSE="GPL2"
9 WEB_SITE="https://upx.github.io/"
10 TARBALL="$PACKAGE-$VERSION.tar.gz"
11 WGET_URL="https://github.com/upx/upx/archive/v$VERSION.tar.gz"
12 PATCH="https://github.com/upx/upx-lzma-sdk/archive/v$VERSION.tar.gz"
13 EXTRA_SOURCE_FILES="lzma-$TARBALL"
15 DEPENDS="ucl zlib"
16 BUILD_DEPENDS="ucl-dev zlib-dev perl"
18 current_version()
19 {
20 wget -O - ${WGET_URL%/arch*}/releases 2>/dev/null | \
21 sed '/archive.*tar/!d;s|.*/v\(.*\).tar.*|\1|;q'
22 }
24 # Rules to configure and make the package.
25 compile_rules()
26 {
27 [ -s $SOURCES_REPOSITORY/lzma-$TARBALL ] ||
28 wget -O $SOURCES_REPOSITORY/lzma-$TARBALL $PATCH
29 tar -xf $SOURCES_REPOSITORY/lzma-$TARBALL
30 sed -i 's|c_len >= u_len)|c_len < u_len) return true; else|' \
31 $src/src/packer.cpp
32 rm -r $src/src/lzma-sdk
33 mv $src/upx-lzma-sdk-$VERSION $src/src/lzma-sdk
34 make CHECK_WHITESPACE=/bin/true all
35 }
37 # Rules to gen a SliTaz package suitable for Tazpkg.
38 genpkg_rules()
39 {
40 mkdir -p $fs/usr/bin $install/usr/share/doc $install/usr/share/man
41 cp -a $src/src/upx.out $fs/usr/bin/upx
42 cp $src/doc/*.txt $install/usr/share/doc
43 cp $src/doc/*.doc $install/usr/share/doc
44 cp $src/doc/*.html $install/usr/share/doc
45 cp $src/LICENSE $install/usr/share/doc
46 cp $src/COPYING $install/usr/share/doc
47 cp $src/README* $install/usr/share/doc
48 cp $src/THANKS $install/usr/share/doc
49 cp $src/NEWS $install/usr/share/doc
50 cp $src/BUGS $install/usr/share/doc
51 cp $src/doc/*.1 $install/usr/share/man
52 }