recipe 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. # Build recipe for tqca-trinity.
  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=tqca
  19. version=20220503_8dbed86
  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. The TQt cryptographic architecture.
  31. This library provides an easy API for the following features:
  32. SSL/TLS
  33. X509
  34. SASL
  35. RSA
  36. Hashing (SHA1, MD5)
  37. Ciphers (BlowFish, 3DES, AES)
  38. Functionality is supplied via plugins. This is useful for avoiding
  39. dependence on a particular crypto library and makes upgrading easier,
  40. as there is no need to recompile your application when adding or
  41. upgrading a crypto plugin. Also, by pushing crypto functionality into
  42. plugins, your application is free of legal issues, such as export
  43. regulation.
  44. "
  45. homepage=https://www.trinitydesktop.org/
  46. license=LGPLv2.1
  47. # Source documentation
  48. docs="COPYING README"
  49. docsdir="${docdir}/${program}-${version}"
  50. build()
  51. {
  52. unpack "${tardir}/$tarname"
  53. cd "$srcdir"
  54. # Set sane permissions
  55. chmod -R u+w,go-w,a+rX-s .
  56. rm -rf BUILD
  57. mkdir BUILD
  58. cd BUILD
  59. cmake \
  60. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
  61. -DCMAKE_BUILD_TYPE=RelWithDebInfo \
  62. -DCMAKE_C_FLAGS_RELWITHDEBINFO:STRING="$QICFLAGS" \
  63. -DCMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING="$QICXXFLAGS" \
  64. -DCMAKE_SHARED_LINKER_FLAGS:STRING="$(echo $QILDFLAGS | sed 's/-s//')" \
  65. -DCMAKE_INSTALL_PREFIX=/usr \
  66. -DLIB_SUFFIX=${libSuffix} \
  67. -DCONFIG_INSTALL_DIR=/etc/trinity \
  68. -DSYSCONF_INSTALL_DIR=/etc/trinity \
  69. -DXDG_MENU_INSTALL_DIR=/etc/xdg/menus \
  70. -DCMAKE_VERBOSE_MAKEFILE=ON \
  71. -DCMAKE_SKIP_RPATH=OFF \
  72. -DBUILD_TQCA=ON \
  73. -DBUILD_TQCA_TLS=ON \
  74. -DWITH_ALL_OPTIONS=ON \
  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. }