1 # Build recipe for xfsprogs.
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
24 # Define a category for the output of the package name
27 tarname=${program}-${version}.tar.gz
30 fetch=https://mirrors.edge.kernel.org/pub/linux/utils/fs/xfs/xfsprogs/$tarname
33 A high-performance journaling filesystem.
35 XFS combines advanced journaling technology with full 64-bit addressing
36 and scalable structures and algorithms. This combination delivers the
37 most scalable high-performance filesystem ever conceived.
40 homepage=https://xfs.org
41 license="GPLv2+, LGPLv2.1"
43 # Source documentation
44 docs="README VERSION LICENSES/*"
45 docsdir="${docdir}/${program}-${version}"
47 # Limit parallel jobs for this build
52 unpack "${tardir}/$tarname"
56 # Set sane permissions
57 chmod -R u+w,go-w,a+rX-s .
59 ./configure LDFLAGS="$QILDFLAGS" \
60 OPTIMIZER="$QICFLAGS -O3" DEBUG="-DNDEBUG" \
62 --libdir=/usr/lib${libSuffix} \
63 --libexecdir=/usr/libexec/xfsprogs \
69 --enable-gettext=yes \
72 --build="$(gcc -dumpmachine)"
77 DIST_ROOT="$destdir" \
78 PKG_ROOT_SBIN_DIR="/usr/sbin" \
79 PKG_ROOT_LIB_DIR="/usr/lib${libSuffix}" \
82 # Remove cron job for the experimental xfs_scrub utility
83 rm -f "${destdir}/usr/lib${libSuffix}/xfsprogs/xfs_scrub_all.cron"
84 rmdir "${destdir}/usr/lib${libSuffix}/xfsprogs"
86 # Compress and link man pages (if needed)
87 if test -d "${destdir}/$mandir"
90 cd "${destdir}/$mandir"
91 find . -type f -exec lzip -9 {} +
92 find . -type l | while read -r file
94 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
102 # Remove non-versioned location
103 rm -rf "${destdir}/usr/share/doc/xfsprogs"
105 mkdir -p "${destdir}/$docsdir"
106 cp -p $docs "${destdir}/$docsdir"