wok-current view squashfs/receipt @ rev 24055
Add current_version for most github hosted softwares
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue Jun 08 08:46:05 2021 +0000 (2021-06-08) |
parents | 4e74b9c6bb62 |
children | a3b6dd3aac6f |
line source
1 # SliTaz package receipt.
3 PACKAGE="squashfs"
4 VERSION="4.4"
5 CATEGORY="base-system"
6 SHORT_DESC="Linux squashfs userland tools."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL2"
9 WEB_SITE="https://github.com/plougher/squashfs-tools"
11 TARBALL="$PACKAGE-$VERSION.tar.gz"
12 WGET_URL="$WEB_SITE/archive/$VERSION.tar.gz"
14 DEPENDS="liblzma linux-squashfs lz4-lib lzo zlib"
15 BUILD_DEPENDS="attr-dev liblzma-dev lz4-dev lzo-dev zlib-dev"
17 current_version()
18 {
19 wget -O - ${WGET_URL%/arch*}/releases 2>/dev/null | \
20 sed '/archive.*tar/!d;s|.*/\(.*\).tar.*|\1|;q'
21 }
23 # Rules to configure and make the package.
24 compile_rules()
25 {
26 cd $src/squashfs-tools
27 # 4.3
28 # sed -i -e 's/int file_size/off_t file_size/' \
29 # -e 's/source_path.index ++./strdup(&)/' mksquashfs.c
30 # sed -i -e 's/~S_IFMT/S_IFMT/' -e 's/MOVE_ACTION, -2/MOVE_ACTION, 1/' action.c
32 sed -i -e 's/~S_IFMT/S_IFMT/' action.c
33 for i in XZ LZMA_XZ LZO LZ4
34 do
35 sed -i "s|^#\\(${i}_SUPPORT = 1\\)|\\1|g" Makefile
36 done
38 mkdir -p $DESTDIR/usr/sbin
39 mkdir -p $DESTDIR/sbin
41 make || return 1
43 cp -a mksquashfs $DESTDIR/usr/sbin
44 cp -a unsquashfs $DESTDIR/sbin
45 }
47 # Rules to gen a SliTaz package suitable for Tazpkg.
48 genpkg_rules()
49 {
50 mkdir -p $install/usr/share/doc
52 cp -a $install/usr $fs
53 cp -a $install/sbin $fs
54 cp $src/README* $install/usr/share/doc
55 cp $src/[CP]* $install/usr/share/doc
56 # cp $src/*example $install/usr/share/doc # 4.3
57 }