1 # Build recipe for audiofile.
3 # Copyright (c) 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.
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://audiofile.68k.org/$tarname
35 The Audio File Library is a C-based library for reading and writing
36 audio files in many common formats.
38 The Audio File Library provides a uniform API which abstracts away
39 details of file formats and data formats. The same calls for opening
40 a file, accessing and manipulating audio metadata (e.g. sample rate,
41 sample format, textual information, MIDI parameters), and reading and
42 writing sample data will work with any supported audio file format.
44 The Audio File Library lets you work with audio data in whatever
45 format is most convenient for you.
48 homepage=https://audiofile.68k.org
49 license="LGPLv2.1, GPLv2+"
51 # Source documentation
52 docs="ACKNOWLEDGEMENTS AUTHORS COPYING* ChangeLog NEWS NOTES README TODO"
53 docsdir="${docdir}/${program}-${version}"
57 unpack "${tardir}/$tarname"
61 # Update for hosts based on musl
62 cp -f "${worktree}/archive/common/config.guess" config.guess
63 cp -f "${worktree}/archive/common/config.sub" config.sub
65 # Apply patches from Debian to refresh this old source
68 patch -Np1 -i "${worktree}/patches/audiofile/${line}"
69 done < "${worktree}/patches/audiofile/series"
71 # Set sane permissions
72 chmod -R u+w,go-w,a+rX-s .
74 ./configure CPPFLAGS="$QICPPFLAGS" CFLAGS="$QICFLAGS" CXXFLAGS="$QICXXFLAGS" \
75 LDFLAGS="$QILDFLAGS" \
77 --libdir=/usr/lib${libSuffix} \
82 --build="$(gcc -dumpmachine)"
85 make -j${jobs} DESTDIR="$destdir" install-strip
87 # Compress and link man pages (if needed)
88 if test -d "${destdir}/$mandir"
91 cd "${destdir}/$mandir"
92 find . -type f -exec lzip -9 {} +
93 find . -type l | while read -r file
95 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
102 mkdir -p "${destdir}${docsdir}"
103 cp -p $docs "${destdir}${docsdir}"