recipes: Adjust 'docsdir' variable to be consistent with the current recipe format
[dragora.git] / recipes / tools / jack1 / recipe
blob6f47847f88f76e65723c70368247103d4031fe5a
1 # Build recipe for jack (version 1).
3 # Copyright (c) 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
18 set -e
20 program=jack-audio-connection-kit
21 pkgname=jack1
22 version=0.125.0
23 release=3
25 # Define a category for the output of the package name
26 pkgcategory=tools
28 tarname=${program}-${version}.tar.gz
30 # Remote source(s)
31 fetch=http://crux.ster.zone/downloads/jack-audio-connection-kit/$tarname
33 description="
34 The Jack Audio Connection Kit (version 1).
36 JACK is a low-latency audio server, written primarily for the Linux
37 operating system.  It can connect a number of different applications to
38 an audio device, as well as allowing them to share audio between
39 themselves. Its clients can run in their own processes (ie. as a
40 normal application), or can they can run within a JACK server (ie. a
41 "plugin").
43 JACK is different from other audio server efforts in that it has been
44 designed from the ground up to be suitable for professional audio
45 work.  This means that it focuses on two key areas: synchronous
46 execution of all clients, and low latency operation.
49 homepage=https://jackaudio.org
50 license="GPLv2+, LGPLv2.1"
52 # Source documentation
53 docs="AUTHORS COPYING* README TODO"
54 docsdir="${docdir}/${program}-${version}"
56 build()
58     unpack "${tardir}/$tarname"
60     cd "$srcdir"
62     # Set sane permissions
63     chmod -R u+w,go-w,a+rX-s .
65     # Note about `--enable-portaudio': it gives problems in the compilation.
67     ./configure CPPFLAGS="$QICPPFLAGS" \
68     CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
69      $configure_args \
70      --libdir=/usr/lib${libSuffix} \
71      --mandir=$mandir \
72      --enable-alsa \
73      --disable-portaudio \
74      --disable-oss \
75      --enable-posix-shm=yes \
76      --enable-sse=auto \
77      --with-default-tmpdir=/tmp \
78      --build="$(gcc -dumpmachine)"
80     make -j${jobs} V=1
81     make -j${jobs} DESTDIR="$destdir" install
83     # Strip remaining binaries and libraries
84     find "$destdir" -type f -print0 | xargs -0 file | \
85      awk '/ELF/ && /executable/ || /shared object/' | \
86       cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
88     # Compress and link man pages (if needed)
89     if test -d "${destdir}/$mandir"
90     then
91         (
92             cd "${destdir}/$mandir"
93             find . -type f -exec lzip -9 {} +
94             find . -type l | while read -r file
95             do
96                 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
97                 rm -- "$file"
98             done
99         )
100     fi
102     # Copy documentation
103     mkdir -p "${destdir}/$docsdir"
104     cp -p $docs "${destdir}/$docsdir"