recipe 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. # Build recipe for tdeaccessibility.
  2. #
  3. # Copyright (c) 2021-2022 Matias Fonzo, <selk@dragora.org>.
  4. #
  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
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  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.
  16. # Exit immediately on any error
  17. set -e
  18. program=tdeaccessibility
  19. version=20220503_d05857f
  20. release=1
  21. # Define a category for the output of the package name
  22. pkgcategory=tde
  23. tarname=${program}-${version}.tar.lz
  24. # Remote source(s)
  25. fetch="
  26. https://dragora.mirror.garr.it/current/sources/$tarname
  27. rsync://rsync.dragora.org/current/sources/$tarname
  28. "
  29. description="
  30. Accessibility support for TDE.
  31. This package includes a collection of programs to make TDE more
  32. accessible, provided with the official release of TDE.
  33. "
  34. homepage=https://www.trinitydesktop.org/
  35. license="GPLv2+, GFDLv1.2"
  36. # Source documentation
  37. docs="COPYING*"
  38. docsdir="${docdir}/${program}-${version}"
  39. build()
  40. {
  41. unpack "${tardir}/$tarname"
  42. cd "$srcdir"
  43. # Set sane permissions
  44. chmod -R u+w,go-w,a+rX-s .
  45. rm -rf BUILD
  46. mkdir BUILD
  47. cd BUILD
  48. cmake \
  49. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
  50. -DCMAKE_BUILD_TYPE=RelWithDebInfo \
  51. -DCMAKE_C_FLAGS_RELWITHDEBINFO:STRING="$QICFLAGS" \
  52. -DCMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING="$QICXXFLAGS" \
  53. -DCMAKE_SHARED_LINKER_FLAGS:STRING="$(echo $QILDFLAGS | sed 's/-s//')" \
  54. -DLIB_SUFFIX=${libSuffix} \
  55. -DCMAKE_VERBOSE_MAKEFILE=ON \
  56. -DCMAKE_SKIP_RPATH=OFF \
  57. -DCMAKE_INSTALL_PREFIX=/opt/trinity \
  58. -DCONFIG_INSTALL_DIR=/etc/trinity \
  59. -DSYSCONF_INSTALL_DIR=/etc/trinity \
  60. -DMAN_INSTALL_DIR=$mandir \
  61. -DCMAKE_LIBRARY_PATH=/opt/trinity/lib${libSuffix} \
  62. -DCMAKE_INCLUDE_PATH=/opt/trinity/include \
  63. -DWITH_GCC_VISIBILITY=ON \
  64. -DBUILD_ALL=ON \
  65. -DWITH_ALSA=ON \
  66. -DWITH_GSTREAMER=OFF \
  67. -DWITH_ARTS=OFF \
  68. -DBUILD_KTTSD=OFF \
  69. -DBUILD_KSAYIT=OFF \
  70. -DBUILD_KSAYIT_FREEVERB=OFF \
  71. -G Ninja ..
  72. ninja -j${jobs}
  73. DESTDIR="$destdir" ninja -j${jobs} install
  74. # To handle dot new config(s)
  75. touch "${destdir}/etc/trinity/.graft-config"
  76. # Compress and link man pages (if needed)
  77. (
  78. cd "${destdir}/$mandir"
  79. find . -type f -exec lzip -9 {} +
  80. find . -type l | while read -r file
  81. do
  82. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  83. rm -- "$file"
  84. done
  85. )
  86. cd ..
  87. # Copy documentation
  88. mkdir -p "${destdir}/$docsdir"
  89. cp -p $docs "${destdir}/$docsdir"
  90. }