recipe 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. # Build recipe for curl.
  2. #
  3. # Copyright (c) 2018 Mateus P. Rodrigues, <mprodrigues@dragora.org>.
  4. # Copyright (c) 2018-2019, 2021-2022 Matias A. Fonzo, <selk@dragora.org>.
  5. #
  6. # Licensed under the Apache License, Version 2.0 (the "License");
  7. # you may not use this file except in compliance with the License.
  8. # You may obtain a copy of the License at
  9. #
  10. # http://www.apache.org/licenses/LICENSE-2.0
  11. #
  12. # Unless required by applicable law or agreed to in writing, software
  13. # distributed under the License is distributed on an "AS IS" BASIS,
  14. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. # See the License for the specific language governing permissions and
  16. # limitations under the License.
  17. # Exit immediately on any error
  18. set -e
  19. program=curl
  20. version=7.81.0
  21. release=1
  22. # Define a category for the output of the package name
  23. pkgcategory=networking
  24. tarname=${program}-${version}.tar.bz2
  25. # Remote source(s)
  26. fetch=https://curl.haxx.se/download/$tarname
  27. description="
  28. Command line tool and library for transferring data with URLs.
  29. cURL is a powerful command line tool for transferring data supporting
  30. various protocolos, including DICT, FILE, FTP, FTPS, Gopher, HTTP,
  31. HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP,
  32. SMB, SMBS, SMTP, SMTPS, Telnet and TFTP.
  33. "
  34. homepage=https://curl.haxx.se/
  35. license="Custom MIT/X derivate"
  36. # Source documentation
  37. docs="CHANGES COPYING README RELEASE-NOTES"
  38. docsdir="${docdir}/${program}-${version}"
  39. build()
  40. {
  41. unpack "${tardir}/$tarname"
  42. cd "$srcdir"
  43. # Set sane permissions
  44. chmod -R u+w,go-w,a+rX-s .
  45. ./configure CPPFLAGS="$QICPPFLAGS" \
  46. CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
  47. $configure_args \
  48. --libdir=/usr/lib${libSuffix} \
  49. --infodir=$infodir \
  50. --mandir=$mandir \
  51. --enable-static=no \
  52. --enable-shared=yes \
  53. --enable-ipv6 \
  54. --enable-pthreads \
  55. --enable-threaded-resolver \
  56. --with-ca-path=/etc/ssl/certs \
  57. --with-ca-bundle=/etc/ssl/cert.pem \
  58. --with-libssh2 \
  59. --with-openssl \
  60. --build="$(gcc -dumpmachine)"
  61. make -j${jobs} V=1
  62. make -j${jobs} DESTDIR="$destdir" install-strip
  63. # Compress and link man pages (if needed)
  64. if test -d "${destdir}/$mandir"
  65. then
  66. (
  67. cd "${destdir}/$mandir"
  68. find . -type f -exec lzip -9 {} +
  69. find . -type l | while read -r file
  70. do
  71. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  72. rm -- "$file"
  73. done
  74. )
  75. fi
  76. # Copy documentation
  77. mkdir -p "${destdir}/$docsdir"
  78. cp -p $docs "${destdir}/$docsdir"
  79. }