recipe 2.9 KB

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