recipe 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. # Build recipe for lynx.
  2. #
  3. # Copyright (c) 2016-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=lynx
  17. version=2.8.9rel.1
  18. pkgversion=2.8.9
  19. release=2
  20. # Set 'outdir' for a nice and well-organized output directory
  21. outdir="${outdir}/${arch}/networking"
  22. tarname=${program}${version}.tar.bz2
  23. # Remote source(s)
  24. fetch=http://invisible-mirror.net/archives/lynx/tarballs/$tarname
  25. description="
  26. A text browser for the World Wide Web.
  27. Lynx is a general purpose distributed information browser for the
  28. World Wide Web.
  29. Use \"lynx -help\" to display a complete list of current options.
  30. "
  31. homepage=http://lynx.browser.org
  32. license=GPLv2+
  33. # Source documentation
  34. docsdir="${docdir}/${program}-${pkgversion}"
  35. # Custom source directory
  36. srcdir=${program}${version}
  37. build()
  38. {
  39. set -e
  40. unpack "${tardir}/$tarname"
  41. cd "$srcdir"
  42. # Set sane permissions
  43. chmod -R u+w,go-w,a+rX-s .
  44. ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
  45. $configure_args \
  46. --sysconfdir=/etc/lynx \
  47. --datadir=$docsdir \
  48. --mandir=$mandir \
  49. --with-zlib \
  50. --with-bzlib \
  51. --with-ssl \
  52. --with-screen=ncursesw \
  53. --enable-locale-charset \
  54. --enable-ipv6 \
  55. --enable-japanese-utf8 \
  56. --enable-nested-tables \
  57. --build="$(cc -dumpmachine)"
  58. make -j${jobs} V=1
  59. make -j${jobs} DESTDIR="$destdir" install-full
  60. # Tweak configuration file (thanks to BLFS!)
  61. sed \
  62. -e '/#LOCALE/ a LOCALE_CHARSET:TRUE' \
  63. -e '/#DEFAULT_ED/ a DEFAULT_EDITOR:vi' \
  64. -e '/#PERSIST/ a PERSISTENT_COOKIES:TRUE' \
  65. -i "${destdir}/etc/lynx/lynx.cfg"
  66. # To handle dow new files via graft(8)
  67. touch "${destdir}/etc/lynx/.graft-config"
  68. # Compress and link man pages (if needed)
  69. if test -d "${destdir}/$mandir"
  70. then
  71. (
  72. cd "${destdir}/$mandir"
  73. find . -type f -exec lzip -9 '{}' +
  74. find . -type l | while read -r file
  75. do
  76. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  77. rm -- "$file"
  78. done
  79. )
  80. fi
  81. }