recipes: tools/espeak: Fix 'docsdir' destination
[dragora.git] / recipes / tools / espeak / recipe
blob9bb07921ef8f57cc3e9895c5d8c8261c827f4b33
1 # Build recipe for espeak.
3 # Copyright (c) 2018 Thiago Seus, <thiago.seus@yahoo.com.br>.
4 # Copyright (c) 2020, 2022 Matias Fonzo, <selk@dragora.org>.
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 #    http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
18 # Exit immediately on any error
19 set -e
21 program=espeak
22 version=1.48.04
23 release=3
25 # Define a category for the output of the package name
26 pkgcategory=tools
28 tarname=${program}-${version}-source.zip
30 # Remote source(s)
31 fetch="https://downloads.sourceforge.net/project/espeak/espeak/espeak-${version%.*}/$tarname"
33 description="
34 Speech Synthesizer.
36 eSpeak is a compact, multi-language, text-to-speech synthesizer.
39 homepage=https://espeak.sourceforge.net
40 license=GPLv3+
42 # Source documentation
43 docs="ChangeLog.txt License.txt ReadMe docs/"
44 docsdir="${docdir}/${program}-${version}"
46 # The package has a custom source directory
47 srcdir=${program}-${version}-source
49 build()
51     unpack "${tardir}/$tarname"
53     cd "$srcdir/src"
55     # Use the PortAudio (sound interface library) version 19
56     ln -sf portaudio19.h portaudio.h
58     make -j${jobs} CXXFLAGS="$QICXXFLAGS -Wno-narrowing" LDFLAGS="$QILDFLAGS" \
59      PREFIX=/usr LIBDIR=/usr/lib${libSuffix}
61     make -j${jobs} PREFIX=/usr LIBDIR=/usr/lib${libSuffix} \
62      DESTDIR="$destdir" install
64     cd ..
66     # Copy documentation
67     mkdir -p "${destdir}/$docsdir"
68     cp -p -r $docs "${destdir}/$docsdir"
70     # Rename docs/ directory for the package
71     mv "${destdir}/${docsdir}/docs" "${destdir}/${docsdir}/html"