qi: Bump to release 2.12
[dragora.git] / recipes / tools / tarlz / recipe
bloba78440cfc5f691254f1cad2c5a53145aad3b2537
1 # Build recipe for tarlz.
3 # Copyright (c) 2019-2022 Matias Fonzo, <selk@dragora.org>.
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 #    http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
17 # Exit immediately on any error
18 set -e
20 program=tarlz
21 version=0.23
22 release=1
24 # Define a category for the output of the package name
25 pkgcategory=tools
27 tarname=${program}-${version}.tar.lz
29 # Remote source(s)
30 fetch=https://download-mirror.savannah.gnu.org/releases/lzip/tarlz/$tarname
32 homepage=https://lzip.nongnu.org/tarlz.html
33 license=GPLv2+
35 description="
36 Archiver with multimember lzip compression (version $version).
38 Tarlz is a combined implementation of the tar archiver and the lzip
39 compressor. By default tarlz creates, lists and extracts archives in a
40 simplified posix pax format compressed with lzip on a per file basis.
41 Each tar member is compressed in its own lzip member, as well as the
42 end-of-file blocks. This method adds an indexed lzip layer on top of
43 the tar archive, making it possible to decode the archive safely in
44 parallel.  The resulting multimember tar.lz archive is fully backward
45 compatible with standard tar tools like GNU tar, which treat it like
46 any other tar.lz archive.  Tarlz can append files to the end of such
47 compressed archives.
50 # Limit package name to the program name
51 full_pkgname="${program}@${pkgcategory}"
53 # Source documentation
54 docs="AUTHORS COPYING ChangeLog NEWS README"
55 docsdir="${docdir}/${program}"
57 build()
59     unpack "${tardir}/$tarname"
61     cd "$srcdir"
63     # Set sane permissions
64     chmod -R u+w,go-w,a+rX-s .
66     ./configure CPPFLAGS="$QICPPFLAGS" \
67     CXXFLAGS+="$QICXXFLAGS" LDFLAGS="$QILDFLAGS -static" \
68      $configure_args \
69      --infodir=$infodir \
70      --mandir=$mandir \
71      --build="$(gcc -dumpmachine)"
73     make -j${jobs} V=1
74     make -j${jobs} DESTDIR="$destdir" install
76     # Compress info documents and manual page
78     rm -f "${destdir}/${infodir}/dir";  # Redundancy
79     lzip -9 \
80      "${destdir}/${infodir}/tarlz.info" \
81      "${destdir}/${mandir}/man1/tarlz.1"
83     # Copy documentation
84     mkdir -p "${destdir}/$docsdir"
85     cp -p $docs "${destdir}/$docsdir"