recipe 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. # Build recipe for tdelibs.
  2. #
  3. # Copyright (c) 2020-2023 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=tdelibs
  19. version=20230214_ea10b629
  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. The Trinity Desktop Environment (TDE) libraries.
  31. This package includes libraries that are central to the development and
  32. execution of a KDE program, as well as internationalization files for
  33. these libraries, misc HTML documentation, theme modules, and regression
  34. tests.
  35. "
  36. homepage=https://www.trinitydesktop.org/
  37. license="GPLv2+, LGPLv2+ | BSD 2-clause"
  38. # Source documentation
  39. docs="AUTHORS COPYING* DEBUG NAMING README TODO KDE?PORTING.html"
  40. docsdir="${docdir}/${program}-${version}"
  41. build()
  42. {
  43. unpack "${tardir}/$tarname"
  44. cd "$srcdir"
  45. # Set sane permissions
  46. chmod -R u+w,go-w,a+rX-s .
  47. rm -rf BUILD
  48. mkdir BUILD
  49. cd BUILD
  50. cmake \
  51. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
  52. -DCMAKE_BUILD_TYPE=RelWithDebInfo \
  53. -DCMAKE_C_FLAGS_RELWITHDEBINFO:STRING="$QICFLAGS" \
  54. -DCMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING="$QICXXFLAGS" \
  55. -DCMAKE_SHARED_LINKER_FLAGS:STRING="$(echo ${QILDFLAGS} | sed 's/-s//')" \
  56. -DLIB_SUFFIX=${libSuffix} \
  57. -DCMAKE_VERBOSE_MAKEFILE=ON \
  58. -DCMAKE_SKIP_RPATH=OFF \
  59. -DCMAKE_INSTALL_PREFIX=/opt/trinity \
  60. -DCONFIG_INSTALL_DIR=/etc/trinity \
  61. -DSYSCONF_INSTALL_DIR=/etc/trinity \
  62. -DCMAKE_LIBRARY_PATH=/opt/trinity/lib${libSuffix} \
  63. -DCMAKE_INCLUDE_PATH=/opt/trinity/include \
  64. -DXDG_MENU_INSTALL_DIR=/etc/xdg/menus \
  65. -DWITH_GCC_VISIBILITY=ON \
  66. -DWITH_CUPS=ON \
  67. -DWITH_ARTS=OFF \
  68. -DWITH_LIBART=ON \
  69. -DWITH_LIBIDN=OFF \
  70. -DWITH_TIFF=ON \
  71. -DWITH_JASPER=ON \
  72. -DWITH_OPENEXR=ON \
  73. -DWITH_AVAHI=OFF \
  74. -DWITH_ISPELL=OFF \
  75. -DWITH_ASPELL=ON \
  76. -DWITH_HSPELL=OFF \
  77. -DDEFAULT_SPELL_CHECKER=ASPELL \
  78. -DWITH_ELFICON=ON \
  79. -DWITH_TDEHWLIB=ON \
  80. -DWITH_LOGINDPOWER=OFF \
  81. -DWITH_UDEVIL=ON \
  82. -DWITH_UPOWER=OFF \
  83. -DWITH_UDISKS=OFF \
  84. -DWITH_UDISKS2=OFF \
  85. -DWITH_CONSOLEKIT=OFF \
  86. -DWITH_NETWORK_MANAGER_BACKEND=OFF \
  87. -DWITH_LZMA=ON \
  88. -DWITH_XRANDR=ON \
  89. -DWITH_XCOMPOSITE=ON \
  90. -DWITH_MITSHM=ON \
  91. -DWITH_IMAGETOPS_BINARY=ON \
  92. -G Ninja ..
  93. ninja -j${jobs}
  94. DESTDIR="$destdir" ninja -j${jobs} install
  95. # This symlink will be handled from the post-install
  96. # script to point to the correct location
  97. rm -f "${destdir}/opt/trinity/share/icons/default.tde"
  98. # To handle (dot) .new files via graft(1)
  99. find "${destdir}/etc" -type d -print | while read -r directory
  100. do
  101. ( cd -- "$directory" && touch .graft-config )
  102. done
  103. # Compress and link man pages (if needed)
  104. if test -d "${destdir}/$mandir"
  105. then
  106. (
  107. cd "${destdir}/$mandir"
  108. find . -type f -exec lzip -9 {} +
  109. find . -type l | while read -r file
  110. do
  111. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  112. rm -- "$file"
  113. done
  114. )
  115. fi
  116. cd ..
  117. # Copy documentation
  118. mkdir -p "${destdir}/$docsdir"
  119. cp -p $docs "${destdir}/$docsdir"
  120. }