recipe 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. # Build recipe for inetutils.
  2. #
  3. # Copyright (c) 2017 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=inetutils
  17. version=1.9.4
  18. release=1
  19. tarname=${program}-${version}.tar.gz
  20. # Remote source(s)
  21. fetch=http://ftp.gnu.org/gnu/inetutils/$tarname
  22. description="
  23. A collection of common network programs.
  24. The inetutils package contains programs for basic networking.
  25. "
  26. homepage=http://www.gnu.org/software/inetutils
  27. license=GPLv3+
  28. # Source documentation
  29. docs="AUTHORS COPYING NEWS README THANKS TODO"
  30. docsdir="${docdir}/${program}-${version}"
  31. build()
  32. {
  33. set -e
  34. unpack "${tardir}/$tarname"
  35. cd "$srcdir"
  36. # Note about `--disable-logger':
  37. # A better version is provided by the util-linux package
  38. ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS -static" \
  39. $configure_args \
  40. --libdir=/usr/lib${libSuffix} \
  41. --infodir=$infodir \
  42. --mandir=$mandir \
  43. --docdir=$docsdir \
  44. --enable-servers \
  45. --enable-ncurses \
  46. --disable-readline \
  47. --disable-syslogd \
  48. --disable-logger \
  49. --disable-rexec \
  50. --disable-rlogin \
  51. --disable-rsh \
  52. --disable-rcp \
  53. --disable-whois \
  54. --disable-nls \
  55. --with-wrap \
  56. --build="$(cc -dumpmachine)"
  57. make -j${jobs} V=1
  58. make -j${jobs} DESTDIR="$destdir" install
  59. # Delete bogus file
  60. rm -f "${destdir}/usr/lib${libSuffix}/charset.alias"
  61. rmdir "${destdir}/usr/lib${libSuffix}" || true
  62. # Install inetd perp service
  63. mkdir -p "${destdir}/etc/perp/inetd"
  64. cp -p "${worktree}/archive/inetutils/etc/perp/inetd/rc.log" \
  65. "${worktree}/archive/inetutils/etc/perp/inetd/rc.main" \
  66. "${destdir}/etc/perp/inetd/"
  67. chmod 755 "${destdir}"/etc/perp/inetd/rc.*
  68. # THIS SERVICE IS DISABLED BY DEFAULT
  69. chmod -t "${destdir}/etc/perp/inetd"
  70. # Copy config file for inetd(8)
  71. cp -p "${worktree}/archive/inetutils/etc/inetd.conf" "${destdir}/etc/"
  72. chmod 644 "${destdir}/etc/inetd.conf"
  73. # To handle config file(s)
  74. touch "${destdir}/etc/.graft-config" \
  75. "${destdir}/etc/perp/inetd/.graft-config"
  76. # Compress info documents deleting index file for the package
  77. if test -d "${destdir}/$infodir"
  78. then
  79. rm -f "${destdir}/${infodir}/dir"
  80. lzip -9 "${destdir}/${infodir}"/*
  81. fi
  82. # Compress and link man pages (if needed)
  83. if test -d "${destdir}/$mandir"
  84. then
  85. (
  86. cd "${destdir}/$mandir"
  87. find . -type f -exec lzip -9 '{}' +
  88. find . -type l | while read -r file
  89. do
  90. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  91. rm -- "$file"
  92. done
  93. )
  94. fi
  95. # Copy documentation
  96. mkdir -p "${destdir}${docsdir}"
  97. cp -p $docs "${destdir}${docsdir}"
  98. }