recipe 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. # Build recipe for tqca-tls.
  2. #
  3. # Copyright (c) 2020 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. program=tqca-tls-trinity
  17. pkgname=tqca-tls
  18. version=14.0.7
  19. release=1
  20. # Set 'outdir' for a nice and well-organized output directory
  21. outdir="${outdir}/${arch}/tde"
  22. tarname=${program}-${version}.tar.xz
  23. # Remote source(s)
  24. fetch=http://mirror.ppa.trinitydesktop.org/trinity/releases/R${version}/main/dependencies/$tarname
  25. description="
  26. TQCA TLS plugin.
  27. This is a plugin to provide SSL/TLS capability to programs that
  28. utilize the TQt Cryptographic Architecture (TQCA).
  29. "
  30. homepage=http://www.trinitydesktop.org/
  31. license=LGPLv2.1
  32. # Source documentation
  33. docs="COPYING README"
  34. docsdir="${docdir}/${pkgname}-${version}"
  35. build()
  36. {
  37. set -e
  38. if test -z "$QTDIR"
  39. then
  40. echo "WARNING: Required QTDIR variable is empty." 1>&2
  41. exit 1;
  42. fi
  43. unpack "${tardir}/$tarname"
  44. cd "$srcdir"
  45. patch -p1 < "${worktree}/patches/tqca_tls/qca-tls_libressl.patch"
  46. # Set sane permissions
  47. chmod -R u+w,go-w,a+rX-s .
  48. # Hard-code path to look for headers
  49. if test ! -d /usr/include/tqt
  50. then
  51. sed -e 's#/usr/include/tqt#/opt/trinity/include/tqt#g' \
  52. -i configure
  53. fi
  54. ./configure --tqtdir=$QTDIR
  55. make -j${jobs}
  56. #make -j${jobs} DESTDIR="$destdir" install -- not supported!
  57. # Install manually
  58. install -m 755 libtqca-tls.so \
  59. -D "${destdir}${QTDIR}/plugins/crypto/libtqca-tls.so"
  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. # Copy documentation
  74. mkdir -p "${destdir}${docsdir}"
  75. cp -p $docs "${destdir}${docsdir}"
  76. }