1 # Build recipe for isapnptools.
3 # Copyright (c) 2017-2018, 2021 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}.tgz
30 fetch=http://www.roestockfox.co.uk/files/isapnptools/$tarname
33 ISA plug and play configuration utility.
35 Two programs, one allows the dumping of resource data and generation of
36 a skeleton configuration file, the other configures ISA PnP hardware
37 using a configuration file.
40 homepage=https://www.roestockfox.co.uk/isapnptools/index.html
43 # Source documentation
44 docs="AUTHORS COPYING ChangeLog NEWS README"
45 docsdir="${docdir}/${program}-${version}"
56 echo "isapnptools is for the x86 platform-only ..." 1>&2
61 unpack "${tardir}/$tarname"
65 # Set sane permissions
66 chmod -R u+w,go-w,a+rX-s .
68 # Fix compilation on musl
69 patch -p1 < "${worktree}/patches/isapnptools/isapnptools-musl-2.patch"
71 # Update for hosts based on musl
72 cp -f "${worktree}/archive/common/config.guess" config.guess
73 cp -f "${worktree}/archive/common/config.sub" config.sub
75 ./configure CPPFLAGS="$QICPPFLAGS" CFLAGS="$QICFLAGS -fcommon" LDFLAGS="$QILDFLAGS -static" \
77 --libdir=/usr/lib${libSuffix} \
81 --build="$(gcc -dumpmachine)"
84 make -j${jobs} DESTDIR="$destdir" install
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"
101 mkdir -p "${destdir}/$docsdir"
102 cp -p $docs "${destdir}/$docsdir"