recipe 2.9 KB

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