aspell.spec 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. ##
  2. ## aspell.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2004 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2004 Cable & Wireless <http://www.cw.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.60
  27. %define V_aspell_en 6.0-0
  28. %define V_aspell_de 0.50-2
  29. %define V_aspell_perl 0.04
  30. # package information
  31. Name: aspell
  32. Summary: Interactive Spell Checker
  33. URL: http://aspell.net/
  34. Vendor: Kevin Atkinson
  35. Packager: The OpenPKG Project
  36. Distribution: OpenPKG
  37. Class: BASE
  38. Group: Text
  39. License: GPL
  40. Version: %{V_aspell}
  41. Release: 20040827
  42. # package options
  43. %option with_perl no
  44. # list of sources
  45. Source0: ftp://ftp.gnu.org/gnu/aspell/aspell-%{V_aspell}.tar.gz
  46. Source1: ftp://ftp.gnu.org/gnu/aspell/dict/en/aspell6-en-%{V_aspell_en}.tar.bz2
  47. Source2: ftp://ftp.gnu.org/gnu/aspell/dict/de/aspell-de-%{V_aspell_de}.tar.bz2
  48. Source3: http://www.cpan.org/modules/by-module/Text/Text-Aspell-%{V_aspell_perl}.tar.gz
  49. Patch0: aspell.patch
  50. # build information
  51. Prefix: %{l_prefix}
  52. BuildRoot: %{l_buildroot}
  53. BuildPreReq: OpenPKG, openpkg >= 20040130, gcc, ncurses
  54. PreReq: OpenPKG, openpkg >= 20040130, ncurses, perl
  55. %if "%{with_perl}" == "yes"
  56. BuildPreReq: perl, perl-openpkg >= 5.8.3-20040126
  57. PreReq: perl, perl-openpkg >= 5.8.3-20040126
  58. %endif
  59. AutoReq: no
  60. AutoReqProv: no
  61. %description
  62. GNU Aspell is a Free and Open Source spell checker designed to
  63. eventually replace Ispell. It can either be used as a library
  64. or as an independent spell checker. Its main feature is that it
  65. does a much better job of coming up with possible suggestions
  66. than just about any other spell checker out there for the English
  67. language, including Ispell and Microsoft Word. It also has many
  68. other technical enhancements over Ispell such as using shared memory
  69. for dictionaries and intelligently handling personal dictionaries
  70. when more than one Aspell process is open at once.
  71. %track
  72. prog aspell:aspell = {
  73. version = %{V_aspell}
  74. url = ftp://ftp.gnu.org/gnu/aspell/
  75. regex = aspell-(\d+\.\d+(\.\d+)*)\.tar\.gz
  76. }
  77. prog aspell:aspell-de = {
  78. version = %{V_aspell_de}
  79. url = ftp://ftp.gnu.org/gnu/aspell/dict/de/
  80. regex = aspell\d*-de-(__VER__)\.tar\.bz2
  81. }
  82. prog aspell:aspell-en = {
  83. version = %{V_aspell_en}
  84. url = ftp://ftp.gnu.org/gnu/aspell/dict/en/
  85. regex = aspell\d*-en-(__VER__)\.tar\.bz2
  86. }
  87. prog aspell:aspell-perl = {
  88. version = %{V_aspell_perl}
  89. url = http://www.cpan.org/modules/by-module/Text/
  90. regex = Text-Aspell-(__VER__)\.tar\.gz
  91. }
  92. %prep
  93. %setup -q
  94. %setup -q -T -D -a 1
  95. %setup -q -T -D -a 2
  96. %if "%{with_perl}" == "yes"
  97. %setup -q -T -D -a 3
  98. %endif
  99. %patch -p0
  100. %build
  101. # configure GNU aspell
  102. CC="%{l_cc}" \
  103. CXX="%{l_cxx}" \
  104. CFLAGS="%{l_cflags -O}" \
  105. CXXFLAGS="%{l_cxxflags -O}" \
  106. CPPFLAGS="%{l_cppflags}" \
  107. ./configure \
  108. --prefix=%{l_prefix} \
  109. --sysconfdir=%{l_prefix}/etc/aspell \
  110. --libdir=%{l_prefix}/lib \
  111. --enable-pkglibdir=%{l_prefix}/lib/aspell \
  112. --enable-pkgdatadir=%{l_prefix}/share/aspell \
  113. --enable-curses-include=%{l_prefix}/include/ncurses \
  114. --enable-curses="%{l_ldflags} -lncurses" \
  115. --disable-shared
  116. # build GNU aspell
  117. %{l_make} %{l_mflags -O}
  118. # optionally build Perl API
  119. %if "%{with_perl}" == "yes"
  120. %{l_prefix}/bin/perl-openpkg prepare
  121. %{l_shtool} subst \
  122. -e 's;\(-laspell\);-L../.libs \1;' \
  123. Text-Aspell-%{V_aspell_perl}/Makefile.PL
  124. %{l_prefix}/bin/perl-openpkg -d Text-Aspell-%{V_aspell_perl} \
  125. --args CCFLAGS="-I`pwd`/interfaces/cc" \
  126. configure build
  127. %endif
  128. %install
  129. rm -rf $RPM_BUILD_ROOT
  130. # install GNU aspell
  131. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  132. %{l_shtool} subst \
  133. -e 's;/usr/bin/perl;%{l_prefix}/bin/perl;' \
  134. $RPM_BUILD_ROOT%{l_prefix}/bin/aspell-import
  135. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/doc
  136. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/run-with-aspell
  137. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  138. %{l_shtool} mkdir -f -p -m 755 \
  139. $RPM_BUILD_ROOT%{l_prefix}/lib/aspell
  140. # install GNU aspell English (EN) dictionary
  141. ( cd aspell6-en-%{V_aspell_en}
  142. export DESTDIR="$RPM_BUILD_ROOT"
  143. export PREZIP="../prezip-bin"
  144. export ASPELL="../aspell"
  145. export ASPELL_FLAGS="--prefix=$RPM_BUILD_ROOT%{l_prefix}"
  146. ASPELL_FLAGS="$ASPELL_FLAGS --dict-dir=$RPM_BUILD_ROOT%{l_prefix}/lib/aspell"
  147. ASPELL_FLAGS="$ASPELL_FLAGS --data-dir=$RPM_BUILD_ROOT%{l_prefix}/share/aspell"
  148. ./configure
  149. %{l_make} %{l_mflags}
  150. %{l_make} %{l_mflags} install
  151. ) || exit $?
  152. # install GNU aspell German (DE) dictionary
  153. ( cd aspell-de-%{V_aspell_de}
  154. export DESTDIR="$RPM_BUILD_ROOT"
  155. export WORD_LIST_COMPRESS="../word-list-compress"
  156. export ASPELL="../aspell"
  157. export ASPELL_FLAGS="--prefix=$RPM_BUILD_ROOT%{l_prefix}"
  158. ASPELL_FLAGS="$ASPELL_FLAGS --dict-dir=$RPM_BUILD_ROOT%{l_prefix}/lib/aspell"
  159. ASPELL_FLAGS="$ASPELL_FLAGS --data-dir=$RPM_BUILD_ROOT%{l_prefix}/share/aspell"
  160. ./configure
  161. %{l_make} %{l_mflags}
  162. %{l_make} %{l_mflags} install
  163. ) || exit $?
  164. # optionally install Perl API
  165. %if "%{with_perl}" == "yes"
  166. %{l_prefix}/bin/perl-openpkg -d Text-Aspell-%{V_aspell_perl} install
  167. %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
  168. %else
  169. >perl-openpkg-files
  170. %endif
  171. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} `cat perl-openpkg-files`
  172. %files -f files
  173. %clean
  174. rm -rf $RPM_BUILD_ROOT