aspell.spec 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. ##
  2. ## aspell.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2003 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.com>
  6. ##
  7. ## Permission to use, copy, modify, and distribute this software for
  8. ## any purpose with or without fee is hereby granted, provided that
  9. ## the above copyright notice and this permission notice appear in all
  10. ## copies.
  11. ##
  12. ## THIS SOFTWARE IS PROVIDED AS IS'' AND ANY EXPRESSED OR IMPLIED
  13. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  14. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  15. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  16. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  17. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  18. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  19. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  20. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  21. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  22. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  23. ## SUCH DAMAGE.
  24. ##
  25. # package version
  26. %define V_aspell 0.50.3
  27. %define V_aspell_en 0.51-0
  28. %define V_aspell_de 0.50-2
  29. # package information
  30. Name: aspell
  31. Summary: Interactive Spell Checker
  32. URL: http://aspell.net/
  33. Vendor: Kevin Atkinson
  34. Packager: The OpenPKG Project
  35. Distribution: OpenPKG [PLUS]
  36. Group: Text
  37. License: GPL
  38. Version: %{V_aspell}
  39. Release: 20030114
  40. # list of sources
  41. Source0: ftp://ftp.gnu.org/gnu/aspell/aspell-%{V_aspell}.tar.gz
  42. Source1: ftp://ftp.gnu.org/gnu/aspell/aspell-en-%{V_aspell_en}.tar.bz2
  43. Source2: ftp://ftp.gnu.org/gnu/aspell/aspell-de-%{V_aspell_de}.tar.bz2
  44. # build information
  45. Prefix: %{l_prefix}
  46. BuildRoot: %{l_buildroot}
  47. BuildPreReq: OpenPKG, openpkg >= 20021204, gcc, ncurses
  48. PreReq: OpenPKG, openpkg >= 20021204, ncurses, perl
  49. AutoReq: no
  50. AutoReqProv: no
  51. %description
  52. GNU Aspell is a Free and Open Source spell checker designed to
  53. eventually replace Ispell. It can either be used as a library
  54. or as an independent spell checker. Its main feature is that it
  55. does a much better job of coming up with possible suggestions
  56. than just about any other spell checker out there for the English
  57. language, including Ispell and Microsoft Word. It also has many
  58. other technical enhancements over Ispell such as using shared memory
  59. for dictionaries and intelligently handling personal dictionaries
  60. when more than one Aspell process is open at once.
  61. %prep
  62. %setup0 -q -c
  63. %setup1 -q -T -D -a 1
  64. %setup2 -q -T -D -a 2
  65. %build
  66. # build GNU aspell
  67. ( cd aspell-%{V_aspell}
  68. CC="%{l_cc}" \
  69. CXX="%{l_cxx}" \
  70. CFLAGS="%{l_cflags -O}" \
  71. CXXFLAGS="%{l_cxxflags -O}" \
  72. CPPFLAGS="%{l_cppflags}" \
  73. ./configure \
  74. --prefix=%{l_prefix} \
  75. --sysconfdir=%{l_prefix}/etc/aspell \
  76. --enable-curses-include=%{l_prefix}/include \
  77. --enable-curses="-L%{l_prefix}/lib -lncurses" \
  78. --disable-shared
  79. %{l_make} %{l_mflags -O}
  80. )
  81. %install
  82. rm -rf $RPM_BUILD_ROOT
  83. # install GNU aspell
  84. ( cd aspell-%{V_aspell}
  85. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  86. %{l_shtool} subst \
  87. -e 's;/usr/bin/perl;%{l_prefix}/bin/perl;' \
  88. $RPM_BUILD_ROOT%{l_prefix}/bin/aspell-import
  89. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/doc
  90. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  91. %{l_shtool} mkdir -f -p -m 755 \
  92. $RPM_BUILD_ROOT%{l_prefix}/lib/aspell
  93. )
  94. # prepare dictionary installation
  95. ( echo "ASPELL = $RPM_BUILD_ROOT%{l_prefix}/bin/aspell"
  96. ASPELL_FLAGS="--dict-dir=$RPM_BUILD_ROOT%{l_prefix}/lib/aspell"
  97. ASPELL_FLAGS="$ASPELL_FLAGS --data-dir=$RPM_BUILD_ROOT%{l_prefix}/share/aspell"
  98. echo "ASPELL_FLAGS = $ASPELL_FLAGS"
  99. echo "WORD_LIST_COMPRESS = $RPM_BUILD_ROOT%{l_prefix}/bin/word-list-compress"
  100. echo "DESTDIR = $RPM_BUILD_ROOT"
  101. echo "dictdir = %{l_prefix}/lib/aspell"
  102. echo "datadir = %{l_prefix}/share/aspell"
  103. ) > Makefile.head
  104. # install GNU aspell English (EN) dictionary
  105. ( cd aspell-en-%{V_aspell_en}
  106. cat ../Makefile.head Makefile.pre > Makefile
  107. %{l_make} %{l_mflags} install
  108. )
  109. # install GNU aspell German (DE) dictionary
  110. ( cd aspell-de-%{V_aspell_de}
  111. cat ../Makefile.head Makefile.pre > Makefile
  112. %{l_make} %{l_mflags} install
  113. )
  114. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  115. %files -f files
  116. %clean
  117. rm -rf $RPM_BUILD_ROOT