3 # Copyright (c) 2016-2019, 2021 Matias Fonzo, <selk@dragora.org>.
4 # Copyright (c) 2022 Matias Fonzo, <selk@dragora.org>.
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
25 # Define a category for the output of the package name
26 pkgcategory=compressors
28 tarname=${program}-${version}.tar.bz2
31 fetch=https://tukaani.org/xz/$tarname
34 A (complex) compression utility based on the LZMA algorithm.
36 XZ Utils is free general-purpose data compression software with a high
37 compression ratio. XZ Utils were written for POSIX-like systems, but
38 also work on some not-so-POSIX systems.
41 The usage of this utility to distribute files or backup your data
42 IS TOTALLY DISCOURAGED. Limit its usage to decompression only,
43 since some maintainers refuse to distribute in a better format.
45 For more information, see https://lzip.nongnu.org/xz_inadequate.html
47 It is highly recommended the use of lzip(1) instead of xz(1).
50 homepage=https://tukaani.org/xz
53 # Source documentation
54 docsdir="${docdir}/${program}-${version}"
58 unpack "${tardir}/$tarname"
62 # Set sane permissions
63 chmod -R u+w,go-w,a+rX-s .
65 ./configure CPPFLAGS="$QICPPFLAGS" \
66 CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
68 --libdir=/usr/lib${libSuffix} \
76 --disable-lzma-links \
77 --build="$(gcc -dumpmachine)"
80 make -j${jobs} DESTDIR="$destdir" install-strip
82 # Compress and link man pages (if needed)
83 if test -d "${destdir}/$mandir"
86 cd "${destdir}/$mandir"
87 find . -type f -exec lzip -9 {} +
88 find . -type l | while read -r file
90 ln -sf "$(readlink -- "$file").lz" "${file}.lz"