recipe 2.9 KB

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