recipe 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. # Build recipe for ncftp.
  2. #
  3. # Copyright (c) 2018, 2020-2021 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=ncftp
  19. version=3.2.6
  20. release=3
  21. # Define a category for the output of the package name
  22. pkgcategory=networking
  23. tarname=${program}-${version}-src.tar.gz
  24. # Remote source(s)
  25. fetch=ftp://ftp.ncftp.com/ncftp/$tarname
  26. description="
  27. A File Transfer Protocol program.
  28. NcFTP is a free set of programs that use the File Transfer Protocol.
  29. It's been around for quite some time now (circa 1992) and many people
  30. still use the program and contribute suggestions and feedback.
  31. The main program is simply called \"ncftp\". There are also separate
  32. utility programs for one-shot FTP operations (i.e. for shell scripts
  33. and command line junkies); these include ncftpget, ncftpput, and
  34. ncftpls. Run each command without any arguments to see the usage
  35. screen, or read the man page.
  36. "
  37. homepage=https://www.ncftp.com
  38. license="Clarified Artistic License"
  39. # Source documentation
  40. docs="README.txt DONATE.txt doc/*.txt"
  41. docsdir="${docdir}/${program}-${version}"
  42. build()
  43. {
  44. unpack "${tardir}/$tarname"
  45. cd "$srcdir"
  46. # Apply patches from Debian to refresh this source
  47. while read -r line
  48. do
  49. case $line in
  50. *.patch)
  51. patch -Np1 -i "${worktree}/patches/ncftp/${line}"
  52. ;;
  53. esac
  54. done < "${worktree}/patches/ncftp/series"
  55. # Update config detection for hosts
  56. cp -f "${worktree}/archive/common/config.guess" .
  57. cp -f "${worktree}/archive/common/config.sub" .
  58. # Set sane permissions
  59. chmod -R u+w,go-w,a+rX-s .
  60. # Unfortunately, this build system does
  61. # not pick up the FLAGS after `configure'
  62. CC=gcc CPPFLAGS="$QICPPFLAGS" \
  63. CFLAGS="$QICFLAGS -DNO_SSLv2 -D_FILE_OFFSET_BITS=64 -Wall" \
  64. LDFLAGS="$QILDFLAGS -static" \
  65. ./configure $configure_args \
  66. --mandir=$mandir \
  67. --enable-ssp \
  68. --enable-readline \
  69. --build="$(gcc -dumpmachine)"
  70. make -j${jobs}
  71. make -j${jobs} DESTDIR="$destdir" install
  72. # Replace hard link
  73. ln -sf ncftpbatch "${destdir}/usr/bin/ncftpspooler"
  74. # Include missing manpage for ncftpbookmarks
  75. # Thanks again to "Debian GNU/Linux" :-)
  76. install -p -m 0644 "${worktree}/archive/ncftp/ncftpbookmarks.1" \
  77. -D "${destdir}/${mandir}/man1/ncftpbookmarks.1"
  78. # Compress and link man pages (if needed)
  79. (
  80. cd "${destdir}/$mandir"
  81. find . -type f -exec lzip -9 {} +
  82. find . -type l | while read -r file
  83. do
  84. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  85. rm -- "$file"
  86. done
  87. )
  88. # Copy documentation
  89. mkdir -p "${destdir}/$docsdir"
  90. cp -p $docs "${destdir}/$docsdir"
  91. # Redundancy
  92. rm -f "${destdir}/$docsdirmanifest.txt"
  93. }