recipe 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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.26
  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://alpineapp.email/alpine/release/src/$tarname
  26. homepage=https://alpineapp.email/
  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. # Limit parallel jobs for the compiler on this build
  43. jobs=1
  44. build()
  45. {
  46. unpack "${tardir}/$tarname"
  47. cd "$srcdir"
  48. # Update for hosts based on musl
  49. cp -f "${worktree}/archive/common/config.guess" config.guess
  50. cp -f "${worktree}/archive/common/config.sub" config.sub
  51. # Set sane permissions
  52. chmod -R u+w,go-w,a+rX-s .
  53. touch imap/ip6
  54. ./configure CPPFLAGS="$QICPPFLAGS" CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
  55. $configure_args \
  56. --libdir=/usr/lib${libSuffix} \
  57. --mandir=$mandir \
  58. --without-krb5 \
  59. --without-tcl \
  60. --with-interactive-spellcheck=aspell \
  61. --enable-quotas \
  62. --enable-debug=no \
  63. --build="$(gcc -dumpmachine)"
  64. make -j${jobs} V=1
  65. make -j${jobs} DESTDIR="$destdir" install
  66. # Make symlink to invoke alpine as "pine" :-)
  67. ln -s alpine "${destdir}/usr/bin/pine"
  68. # Build and install additional utilities
  69. (
  70. cd imap/mlock || exit 1
  71. mkdir -p "${destdir}/usr/sbin"
  72. make -j${jobs} V=1 CFLAGS="$QICFLAGS"
  73. chgrp mail mlock
  74. chmod 3711 mlock
  75. cp -p mlock "${destdir}/usr/sbin"
  76. strip --strip-unneeded "${destdir}/usr/sbin/mlock"
  77. )
  78. # Compress and link man pages (if needed)
  79. if test -d "${destdir}/$mandir"
  80. then
  81. (
  82. cd "${destdir}/$mandir"
  83. find . -type f -exec lzip -9 {} +
  84. find . -type l | while read -r file
  85. do
  86. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  87. rm -- "$file"
  88. done
  89. )
  90. fi
  91. # Copy documentation
  92. mkdir -p "${destdir}/$docsdir"
  93. cp -p $docs "${destdir}/$docsdir"
  94. }