recipe 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. # Build recipe for tqtinterface.
  2. #
  3. # Copyright (c) 2020-2021 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=tqtinterface-trinity
  19. version=14.0.9
  20. release=1
  21. # Define a category for the output of the package name
  22. pkgcategory=tde
  23. tarname=${program}-${version}.tar.xz
  24. # Remote source(s)
  25. fetch=https://mirror.ppa.trinitydesktop.org/trinity/releases/R${version}/main/dependencies/$tarname
  26. description="
  27. The Trinity Qt Interface.
  28. This package includes libraries that abstract the underlying Qt system
  29. from the actual Trinity code, allowing easy, complete upgrades to new
  30. versions of Qt.
  31. It also contains various functions that have been removed from newer
  32. versions of Qt, but are completely portable and isolated from other APIs
  33. such as Xorg. This allows the Trinity project to efficiently perform
  34. certain operations that are infeasible or unneccessarily difficult when
  35. using pure Qt4 or above.
  36. "
  37. homepage=https://www.trinitydesktop.org/
  38. license=GPLv2+
  39. # Source documentation
  40. docs="AUTHORS COPYING README qtinterface/TODO"
  41. docsdir="${docdir}/${program}-${version}"
  42. build()
  43. {
  44. unpack "${tardir}/$tarname"
  45. cd "$srcdir"
  46. # Set sane permissions
  47. chmod -R u+w,go-w,a+rX-s .
  48. mkdir BUILD
  49. cd BUILD
  50. cmake \
  51. -DCMAKE_CXX_FLAGS_RELEASE:STRING="$QICXXFLAGS" \
  52. -DCMAKE_SHARED_LINKER_FLAGS:STRING="$QILDFLAGS" \
  53. -DCMAKE_INSTALL_PREFIX=/opt/trinity \
  54. -DLIB_SUFFIX=${libSuffix} \
  55. -DCMAKE_VERBOSE_MAKEFILE=ON \
  56. -DCMAKE_BUILD_TYPE=Release \
  57. -DCMAKE_SKIP_INSTALL_RPATH=YES \
  58. -DWITH_ALL_OPTIONS=ON \
  59. -DQT_PREFIX_DIR=/opt/trinity \
  60. -DQT_INCLUDE_DIR=${QTDIR}/include \
  61. -DQT_LIBRARY_DIR=${QTDIR}/lib \
  62. -DQT_BINARY_DIR=${QTDIR}/bin \
  63. -DQT_VERSION=3 \
  64. -DWITH_QT3=ON \
  65. -DWITH_QT4=OFF \
  66. -G Ninja ..
  67. ninja -j${jobs}
  68. DESTDIR="$destdir" ninja -j${jobs} install
  69. # Compress and link man pages (if needed)
  70. if test -d "${destdir}/$mandir"
  71. then
  72. (
  73. cd "${destdir}/$mandir"
  74. find . -type f -exec lzip -9 {} +
  75. find . -type l | while read -r file
  76. do
  77. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  78. rm -- "$file"
  79. done
  80. )
  81. fi
  82. cd ..
  83. # Copy documentation
  84. mkdir -p "${destdir}${docsdir}"
  85. cp -p $docs "${destdir}${docsdir}"
  86. }