recipe 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. # Build recipe for dbus-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-tqt
  19. version=20220620_547b287
  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. DBUS bindings for TQt.
  31. DBUS is a simple IPC library based on messages.
  32. "
  33. homepage=https://www.trinitydesktop.org/
  34. license="Academic Free License version 2.1 | GPLv2+"
  35. # Source documentation
  36. docs="AUTHORS COPYING ChangeLog HACKING NEWS README"
  37. docsdir="${docdir}/${program}-${version}"
  38. build()
  39. {
  40. unpack "${tardir}/$tarname"
  41. cd "$srcdir"
  42. # Set sane permissions
  43. chmod -R u+w,go-w,a+rX-s .
  44. rm -rf BUILD
  45. mkdir BUILD
  46. cd BUILD
  47. cmake \
  48. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
  49. -DCMAKE_BUILD_TYPE=RelWithDebInfo \
  50. -DCMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING="$QICXXFLAGS" \
  51. -DCMAKE_SHARED_LINKER_FLAGS:STRING="$(echo $QILDFLAGS | sed 's/-s//')" \
  52. -DCMAKE_INSTALL_PREFIX=/usr \
  53. -DLIB_SUFFIX=${libSuffix} \
  54. -DCMAKE_VERBOSE_MAKEFILE=ON \
  55. -G Ninja ..
  56. ninja -j${jobs}
  57. DESTDIR="$destdir" ninja -j${jobs} install
  58. # Compress and link man pages (if needed)
  59. if test -d "${destdir}/$mandir"
  60. then
  61. (
  62. cd "${destdir}/$mandir"
  63. find . -type f -exec lzip -9 {} +
  64. find . -type l | while read -r file
  65. do
  66. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  67. rm -- "$file"
  68. done
  69. )
  70. fi
  71. cd ..
  72. # Copy documentation
  73. mkdir -p "${destdir}/$docsdir"
  74. cp -p $docs "${destdir}/$docsdir"
  75. }