recipe 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. # Build recipe for ncftp.
  2. #
  3. # Copyright (c) 2018 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=ncftp
  17. version=3.2.6
  18. release=1
  19. # Set 'outdir' for a nice and well-organized output directory
  20. outdir="${outdir}/${arch}/networking"
  21. tarname=${program}-${version}-src.tar.gz
  22. # Remote source(s)
  23. fetch=ftp://ftp.ncftp.com/ncftp/$tarname
  24. description="
  25. A File Transfer Protocol program.
  26. NcFTP is a free set of programs that use the File Transfer Protocol.
  27. It's been around for quite some time now (circa 1992) and many people
  28. still use the program and contribute suggestions and feedback.
  29. The main program is simply called \"ncftp\". There are also separate
  30. utility programs for one-shot FTP operations (i.e. for shell scripts
  31. and command line junkies); these include ncftpget, ncftpput, and
  32. ncftpls. Run each command without any arguments to see the usage
  33. screen, or read the man page.
  34. "
  35. homepage=http://www.ncftp.com
  36. license="Clarified Artistic License"
  37. # Source documentation
  38. docs="README.txt DONATE.txt doc/*.txt"
  39. docsdir="${docdir}/${program}-${version}"
  40. build()
  41. {
  42. set -e
  43. unpack "${tardir}/$tarname"
  44. cd "$srcdir"
  45. # Set sane permissions
  46. chmod -R u+w,go-w,a+rX-s .
  47. # Unfortunately, this build system does
  48. # not pick up the FLAGS after `configure'
  49. CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS -static" \
  50. ./configure $configure_args \
  51. --mandir=$mandir \
  52. --enable-ssp \
  53. --build="$(cc -dumpmachine)"
  54. make -j${jobs}
  55. make -j${jobs} DESTDIR="$destdir" install
  56. # Replace hard link
  57. ln -sf ncftpbatch "${destdir}/usr/bin/ncftpspooler"
  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. # Copy documentation
  72. mkdir -p "${destdir}${docsdir}"
  73. cp -p $docs "${destdir}${docsdir}"
  74. # Redundancy
  75. rm -f "${destdir}${docsdir}/manifest.txt"
  76. }