recipe 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. # Build recipe for alpine (suite).
  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=alpine
  17. version=2.21
  18. release=3
  19. # Set 'outdir' for a nice and well-organized output directory
  20. outdir="${outdir}/${arch}/networking"
  21. tarname=${program}-${version}.tar.xz
  22. # Remote source(s)
  23. fetch=http://alpine.x10host.com/alpine/release/src/$tarname
  24. homepage=http://alpine.x10host.com/
  25. description="
  26. Alpine messaging system.
  27. Alpine is an Alternatively Licensed Program for Internet News & Email,
  28. is a tool for reading, sending, and managing electronic messages.
  29. Alpine is the successor to Pine and was developed until 2008 by
  30. Computing & Communications at the University of Washington. Though
  31. originally designed for inexperienced email users, Alpine supports many
  32. advanced features, and an ever-growing number of configuration and
  33. personal-preference options.
  34. Alpine is maintained by Eduardo Chappa at $homepage
  35. "
  36. license="Apache License version 2"
  37. # Source documentation
  38. docs="LICENSE NOTICE README VERSION"
  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. touch imap/ip6
  48. ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
  49. $configure_args \
  50. --libdir=/usr/lib${libSuffix} \
  51. --mandir=$mandir \
  52. --without-krb5 \
  53. --with-interactive-spellcheck=aspell \
  54. --enable-debug=no
  55. make -j${jobs} V=1
  56. make -j${jobs} DESTDIR="$destdir" install
  57. # Make symlink to invoke alpine as "pine" :-)
  58. ln -s alpine "${destdir}/usr/bin/pine"
  59. # Include additional utilities
  60. mkdir -p "${destdir}/usr/sbin"
  61. cp -p imap/mlock/mlock "${destdir}/usr/sbin/"
  62. chmod 2755 "${destdir}/usr/sbin/mlock"
  63. strip --strip-unneeded "${destdir}/usr/sbin/mlock"
  64. cp -p imap/mailutil/mailutil "${destdir}/usr/bin/"
  65. chmod 755 "${destdir}/usr/bin/mailutil"
  66. mkdir -p "${destdir}/${mandir}/man1"
  67. cp -p imap/src/mailutil/mailutil.1 "${destdir}/${mandir}/man1/"
  68. chmod 644 "${destdir}/${mandir}/man1/mailutil.1"
  69. # Compress and link man pages (if needed)
  70. if test -d "${destdir}/$mandir"
  71. then
  72. (
  73. cd "${destdir}/$mandir"
  74. find . -type f -exec lzip -9 '{}' +
  75. find . -type l | while read -r file
  76. do
  77. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  78. rm -- "$file"
  79. done
  80. )
  81. fi
  82. # Copy documentation
  83. mkdir -p "${destdir}${docsdir}"
  84. cp -p $docs "${destdir}${docsdir}/"
  85. }