recipes: Adjust 'docsdir' variable to be consistent with the current recipe format
[dragora.git] / recipes / tde / tdeaccessibility / recipe
blob7405d0d66cfa8ccfb5f97f29b38e986e03717473
1 # Build recipe for tdeaccessibility.
3 # Copyright (c) 2021-2022 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=tdeaccessibility
21 version=20220503_d05857f
22 release=1
24 # Define a category for the output of the package name
25 pkgcategory=tde
27 tarname=${program}-${version}.tar.lz
29 # Remote source(s)
30 fetch="
31  https://dragora.mirror.garr.it/current/sources/$tarname
32  rsync://rsync.dragora.org/current/sources/$tarname
35 description="
36 Accessibility support for TDE.
38 This package includes a collection of programs to make TDE more
39 accessible, provided with the official release of TDE.
42 homepage=https://www.trinitydesktop.org/
43 license="GPLv2+, GFDLv1.2"
45 # Source documentation
46 docs="COPYING*"
47 docsdir="${docdir}/${program}-${version}"
49 build()
51     unpack "${tardir}/$tarname"
53     cd "$srcdir"
55     # Set sane permissions
56     chmod -R u+w,go-w,a+rX-s .
58     rm -rf BUILD
59     mkdir BUILD
60     cd BUILD
62     cmake \
63      -DCMAKE_EXPORT_COMPILE_COMMANDS=ON                     \
64      -DCMAKE_BUILD_TYPE=RelWithDebInfo                      \
65      -DCMAKE_C_FLAGS_RELWITHDEBINFO:STRING="$QICFLAGS"      \
66      -DCMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING="$QICXXFLAGS"  \
67      -DCMAKE_SHARED_LINKER_FLAGS:STRING="$(echo $QILDFLAGS | sed 's/-s//')" \
68      -DLIB_SUFFIX=${libSuffix}                              \
69      -DCMAKE_VERBOSE_MAKEFILE=ON                            \
70      -DCMAKE_SKIP_RPATH=OFF                                 \
71      -DCMAKE_INSTALL_PREFIX=/opt/trinity                    \
72      -DCONFIG_INSTALL_DIR=/etc/trinity                      \
73      -DSYSCONF_INSTALL_DIR=/etc/trinity                     \
74      -DMAN_INSTALL_DIR=$mandir                              \
75      -DCMAKE_LIBRARY_PATH=/opt/trinity/lib${libSuffix}      \
76      -DCMAKE_INCLUDE_PATH=/opt/trinity/include              \
77      -DWITH_GCC_VISIBILITY=ON                               \
78      -DBUILD_ALL=ON                                         \
79      -DWITH_ALSA=ON                                         \
80      -DWITH_GSTREAMER=OFF                                   \
81      -DWITH_ARTS=OFF                                        \
82      -DBUILD_KTTSD=OFF                                      \
83      -DBUILD_KSAYIT=OFF                                     \
84      -DBUILD_KSAYIT_FREEVERB=OFF                            \
85      -G Ninja ..
87     ninja -j${jobs}
88     DESTDIR="$destdir" ninja -j${jobs} install
90     # To handle dot new config(s)
91     touch "${destdir}/etc/trinity/.graft-config"
93     # Compress and link man pages (if needed)
94     (
95         cd "${destdir}/$mandir"
96         find . -type f -exec lzip -9 {} +
97         find . -type l | while read -r file
98         do
99             ln -sf "$(readlink -- "$file").lz" "${file}.lz"
100             rm -- "$file"
101         done
102     )
104     cd ..
106     # Copy documentation
107     mkdir -p "${destdir}/$docsdir"
108     cp -p $docs "${destdir}/$docsdir"