recipe 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. # Build recipe for dbus-1-tqt.
  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=dbus-1-tqt-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. A backport of Harald Fernengel's Qt4 D-Bus bindings.
  28. Some Qt4 based code had no direct equivalent in Qt3. Cases where this
  29. transition to Qt3 might not be fully correct are marked with FIXME-QT4
  30. Depending on the use case it might be necessary to extend QDBusMesssage
  31. to allow marshalling/de-marshalling based on an application provided
  32. helper as the Qt3 QVariant can not handle all cases the Qt4 pendant can
  33. (user defined types, etc).
  34. "
  35. homepage=https://www.trinitydesktop.org/
  36. license="Academic Free License version 2.1 | MIT Expat Variant, GPLv2+"
  37. # Source documentation
  38. docs="AUTHORS COPYING* ChangeLog NEWS README TODO"
  39. docsdir="${docdir}/${program}-${version}"
  40. build()
  41. {
  42. unpack "${tardir}/$tarname"
  43. cd "$srcdir"
  44. # Set sane permissions
  45. chmod -R u+w,go-w,a+rX-s .
  46. mkdir BUILD
  47. cd BUILD
  48. cmake \
  49. -DCMAKE_CXX_FLAGS_RELEASE:STRING="$QICXXFLAGS" \
  50. -DCMAKE_SHARED_LINKER_FLAGS:STRING="$QILDFLAGS" \
  51. -DCMAKE_INSTALL_PREFIX=/opt/trinity \
  52. -DLIB_SUFFIX=${libSuffix} \
  53. -DCMAKE_VERBOSE_MAKEFILE=ON \
  54. -DCMAKE_BUILD_TYPE=Release \
  55. -DCMAKE_SKIP_INSTALL_RPATH=YES \
  56. -DWITH_ALL_OPTIONS=ON \
  57. -G Ninja ..
  58. ninja -j${jobs}
  59. DESTDIR="$destdir" ninja -j${jobs} install
  60. # Compress and link man pages (if needed)
  61. if test -d "${destdir}/$mandir"
  62. then
  63. (
  64. cd "${destdir}/$mandir"
  65. find . -type f -exec lzip -9 {} +
  66. find . -type l | while read -r file
  67. do
  68. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  69. rm -- "$file"
  70. done
  71. )
  72. fi
  73. cd ..
  74. # Copy documentation
  75. mkdir -p "${destdir}${docsdir}"
  76. cp -p $docs "${destdir}${docsdir}"
  77. }