1 # Build recipe for jfsutils.
3 # Copyright (c) 2019-2020 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.
21 # Define a category for the output of the package name
24 tarname=${program}-${version}.tar.gz
27 fetch=http://jfs.sourceforge.net/project/pub/$tarname
30 A Journaled File System developed by IBM.
32 IBM's journaled file system technology, currently used in IBM enterprise
33 servers, is designed for high-throughput server environments, key to
34 running intranet and other high-performance e-business file servers.
37 homepage=http://jfs.sourceforge.net
40 # Source documentation
41 docs="AUTHORS COPYING ChangeLog NEWS README"
42 docsdir="${docdir}/${program}-${version}"
48 unpack "${tardir}/$tarname"
52 # Apply patches against Musl
53 # Thanks to "Debian GNU/Linux", and thanks to "Alpine Linux"
54 for file in "${worktree}"/patches/jfsutils/*.patch
60 # Set sane permissions
61 chmod -R u+w,go-w,a+rX-s .
63 ./configure CFLAGS="$QICFLAGS -O3" LDFLAGS="$QILDFLAGS" \
65 --libdir=/usr/lib${libSuffix} \
68 --disable-dependency-tracking \
69 --build="$(gcc -dumpmachine)"
72 make -j${jobs} V=1 DESTDIR="$destdir" install
74 # Replace hard-links at usr/sbin
76 cd "${destdir}/usr/sbin"
77 ln -sf jfs_fsck fsck.jfs
78 ln -sf jfs_mkfs mkfs.jfs
81 # Compress and link man pages (if needed)
82 if test -d "${destdir}/$mandir"
85 cd "${destdir}/$mandir"
86 find . -type f -exec lzip -9 '{}' +
87 find . -type l | while read -r file
89 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
95 # Replace hard-links at usr/share/man/man8
97 cd "${destdir}/usr/share/man/man8"
98 ln -sf jfs_fsck.8.gz fsck.jfs.8.gz
99 ln -sf jfs_mkfs.8.gz mkfs.jfs.8.gz
104 mkdir -p "${destdir}${docsdir}"
105 cp -p $docs "${destdir}${docsdir}/"