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.
21 # Define a category for the output of the package name
24 tarname=${program}-${version}.tar.gz
27 fetch=http://audiofile.68k.org/$tarname
32 The Audio File Library is a C-based library for reading and writing
33 audio files in many common formats.
35 The Audio File Library provides a uniform API which abstracts away
36 details of file formats and data formats. The same calls for opening
37 a file, accessing and manipulating audio metadata (e.g. sample rate,
38 sample format, textual information, MIDI parameters), and reading and
39 writing sample data will work with any supported audio file format.
41 The Audio File Library lets you work with audio data in whatever
42 format is most convenient for you.
45 homepage=http://audiofile.68k.org
46 license="LGPLv2.1, GPLv2+"
48 # Source documentation
49 docs="ACKNOWLEDGEMENTS AUTHORS COPYING* ChangeLog NEWS NOTES README TODO"
50 docsdir="${docdir}/${program}-${version}"
56 unpack "${tardir}/$tarname"
60 # Update for hosts based on musl
61 cp -f "${worktree}/archive/common/config.guess" config.guess
62 cp -f "${worktree}/archive/common/config.sub" config.sub
64 # Apply patches from Debian to refresh this old source
67 patch -Np1 -i "${worktree}/patches/audiofile/${line}"
68 done < "${worktree}/patches/audiofile/series"
70 # Set sane permissions
71 chmod -R u+w,go-w,a+rX-s .
73 ./configure CFLAGS="$QICFLAGS" CXXFLAGS="$QICXXFLAGS" \
74 LDFLAGS="$QILDFLAGS" \
76 --libdir=/usr/lib${libSuffix} \
81 --build="$(cc -dumpmachine)"
84 make -j${jobs} DESTDIR="$destdir" install-strip
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}"