squashfs-tools: no need to create symlinks manually
[dragora.git] / recipes / tools / squashfs-tools / recipe
blobc51c1c5aaff47937845158ce7eca14432bc6b3df
1 # Build recipe for squashfs-tools.
3 # Copyright (c) 2021, 2023 Matias Fonzo, <selk@dragora.org>.
4 # Copyright (c) 2022 DustDFG, <dfgdust@gmail.com>.
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 #    http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
18 # Exit immediately on any error
19 set -e
21 program=squashfs-tools
22 version=20230406_cbaa34a
23 release=1
25 # Define a category for the output of the package name
26 pkgcategory=tools
28 tarname=${program}-${version}.tar.lz
30 # Remote source(s)
31 #fetch=https://downloads.sourceforge.net/project/squashfs/squashfs/squashfs${version}/$tarname
32 fetch="
33  https://dragora.mirror.garr.it/current/sources/$tarname
34  rsync://rsync.dragora.org/current/sources/$tarname
37 description="
38 Tools to create and extract Squashfs filesystems.
40 This is a squashed read-only filesystem for GNU/Linux.
43 homepage=https://github.com/plougher/squashfs-tools/
44 license=GPLv2+
46 # Source documentation
47 docs="
48   ACKNOWLEDGEMENTS ACTIONS-README CHANGES COPYING README* USAGE
49   RELEASE-READMEs/DONATIONS
51 docsdir="${docdir}/${program}-${version}"
53 build()
55     unpack "${tardir}/$tarname"
57     cd "$srcdir"
59     # Apply a patch to include LZIP support
60     patch -p1 < "${worktree}/patches/squashfs-tools/squashfs-tools-20221209_c901403_lzip-0.diff"
62     # Set sane permissions
63     chmod -R u+w,go-w,a+rX-s .
65     cd squashfs-tools
67     make -j${jobs} CC=cc EXTRA_CFLAGS="$QICFLAGS -O3" LDFLAGS="$QILDFLAGS" \
68      GZIP_SUPPORT=1 \
69      LZIP_SUPPORT=1 \
70      XZ_SUPPORT=1 \
71      LZO_SUPPORT=1 \
72      LZ4_SUPPORT=0 \
73      ZSTD_SUPPORT=1 \
74      COMP_DEFAULT=lzip \
75      XATTR_SUPPORT=1 \
76      install INSTALL_DIR="${destdir}/usr/bin"
78     cd ../
80     # Copy documentation
81     mkdir -p "${destdir}/$docsdir"
82     cp -p $docs "${destdir}/$docsdir"