recipe 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. # Build recipe for aspell.
  2. #
  3. # Copyright (c) 2018-2019, 2021 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=aspell
  19. version=0.60.8
  20. release=1
  21. # Define a category for the output of the package name
  22. pkgcategory=dict
  23. tarname=${program}-${version}.tar.gz
  24. # Remote source(s)
  25. fetch=ftp://ftp.gnu.org/gnu/aspell/$tarname
  26. description="
  27. A spell checker.
  28. GNU Aspell is a Free and Open Source spell checker designed to
  29. eventually replace Ispell. It can either be used as a library or as an
  30. independent spell checker. Its main feature is that it does a superior
  31. job of suggesting possible replacements for a misspelled word than just
  32. about any other spell checker out there for the English language.
  33. Unlike Ispell, Aspell can also easily check documents in UTF-8 without
  34. having to use a special dictionary. Aspell will also do its best to
  35. respect the current locale setting. Other advantages over Ispell
  36. include support for using multiple dictionaries at once and
  37. intelligently handling personal dictionaries when more than one Aspell
  38. process is open at once.
  39. "
  40. homepage=https://www.aspell.net
  41. license=LGPLv2.1
  42. # Source documentation
  43. docs="COPYING README TODO"
  44. docsdir="${docdir}/${program}-${version}"
  45. build()
  46. {
  47. unpack "${tardir}/$tarname"
  48. cd "$srcdir"
  49. # Set sane permissions
  50. chmod -R u+w,go-w,a+rX-s .
  51. ./configure \
  52. CPPFLAGS="$QICPPFLAGS" CFLAGS="$QICFLAGS" CXXFLAGS="$QICXXFLAGS" LDFLAGS="$QILDFLAGS" \
  53. $configure_args \
  54. --libdir=/usr/lib${libSuffix} \
  55. --infodir=$infodir \
  56. --mandir=$mandir \
  57. --docdir=$docsdir \
  58. --enable-pkgdatadir=/usr/lib${libSuffix}/aspell \
  59. --enable-pkglibdir=/usr/lib${libSuffix}/aspell \
  60. --enable-dict-dir=/usr/lib${libSuffix}/aspell \
  61. --build="$(gcc -dumpmachine)"
  62. make -j${jobs} V=1
  63. make -j${jobs} DESTDIR="$destdir" install-strip
  64. # Compress info documents deleting index file for the package
  65. rm -f "${destdir}/${infodir}/dir"
  66. lzip -9 "${destdir}/${infodir}"/*
  67. # Compress and link man pages (if needed)
  68. (
  69. cd "${destdir}/$mandir"
  70. find . -type f -exec lzip -9 {} +
  71. find . -type l | while read -r file
  72. do
  73. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  74. rm -- "$file"
  75. done
  76. )
  77. # Copy documentation
  78. mkdir -p "${destdir}/$docsdir"
  79. cp -p $docs "${destdir}/$docsdir"
  80. }