recipe 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. # Build recipe for tdeutils.
  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=tdeutils
  19. version=20220503_37fdaba
  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. TDE utilities.
  31. It includes several (official) utilities for the
  32. Trinity Desktop Environment (TDE).
  33. "
  34. homepage=https://www.trinitydesktop.org/
  35. license="GPLv2+, GFDLv1.2"
  36. # Source documentation
  37. docs="AUTHORS COPYING* README*"
  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. -DCMAKE_LIBRARY_PATH=/opt/trinity/lib${libSuffix} \
  61. -DCMAKE_INCLUDE_PATH=/opt/trinity/include \
  62. -DXDG_MENU_INSTALL_DIR=/etc/xdg/menus \
  63. -DWITH_GCC_VISIBILITY=ON \
  64. -DBUILD_ALL=ON \
  65. -DWITH_DPMS=ON \
  66. -DWITH_ASUS=ON \
  67. -DWITH_VAIO=ON \
  68. -DWITH_THINKPAD=ON \
  69. -DWITH_I8K=ON \
  70. -DWITH_SNMP=OFF \
  71. -DWITH_SENSORS=ON \
  72. -DWITH_XMMS=ON \
  73. -DWITH_TDENEWSTUFF=ON \
  74. -DBUILD_KSIM=OFF \
  75. -G Ninja ..
  76. ninja -j${jobs}
  77. DESTDIR="$destdir" ninja -j${jobs} install
  78. # Compress and link man pages (if needed)
  79. if test -d "${destdir}/$mandir"
  80. then
  81. (
  82. cd "${destdir}/$mandir"
  83. find . -type f -exec lzip -9 {} +
  84. find . -type l | while read -r file
  85. do
  86. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  87. rm -- "$file"
  88. done
  89. )
  90. fi
  91. cd ..
  92. # Copy documentation
  93. mkdir -p "${destdir}/$docsdir"
  94. cp -p $docs "${destdir}/$docsdir"
  95. }