ispell.spec 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. ##
  2. ## ispell.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2002 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2002 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2002 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 information
  26. Name: ispell
  27. Summary: Interactive Spell Checker
  28. URL: http://fmg-www.cs.ucla.edu/geoff/ispell.html
  29. Vendor: R.E. Gorin, Pace Willisson, Geoff Kuenning
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG [REL]
  32. Group: Text
  33. License: BSD
  34. Version: 3.2.06
  35. Release: 20020206
  36. # list of sources
  37. Source0: http://fmg-www.cs.ucla.edu/geoff/tars/ispell-%{version}.tar.gz
  38. Source1: ftp://ftp.informatik.uni-kiel.de/pub/kiel/dicts/hk-deutsch.tar.gz
  39. Source2: http://www.suse.de/~bjacke/igerman98/dict/igerman98-20001109.tar.bz2
  40. Source3: ftp://ftp.openpkg.org/DST/ispell/words.gz
  41. Patch0: ispell.patch
  42. # build information
  43. Prefix: %{l_prefix}
  44. BuildRoot: %{l_buildroot}
  45. BuildPreReq: OpenPKG, openpkg >= 20020206, make, bison
  46. PreReq: OpenPKG, openpkg >= 20020206
  47. AutoReq: no
  48. AutoReqProv: no
  49. %description
  50. Ispell is a fast screen-oriented spelling checker that shows you
  51. your errors in the context of the original file, and suggests
  52. possible corrections when it can figure them out. Compared to UNIX
  53. spell, it is faster and much easier to use. Ispell can also handle
  54. languages other than English.
  55. %prep
  56. %setup -q
  57. %patch -p0
  58. %{l_gzip} -d -c %{SOURCE words.gz} >$RPM_BUILD_DIR/words
  59. mkdir hk-deutsch
  60. (cd hk-deutsch; %{l_gzip} -d -c %{SOURCE hk-deutsch.tar.gz} | %{l_tar} xf -)
  61. %{l_bzip2} -d -c %{SOURCE igerman98-20001109.tar.bz2} | %{l_tar} xf -
  62. %build
  63. PATH="%{l_prefix}/bin:$PATH"; export PATH
  64. ( echo "#define MINIMENU"
  65. echo "#undef NO8BIT"
  66. echo "#define MASKBITS 64"
  67. echo "#define CC \"%{l_cc}\""
  68. echo "#define CFLAGS \"%{l_cflags -O}\""
  69. echo "#define BINDIR \"%{l_prefix}/bin\""
  70. echo "#define LIBDIR \"%{l_prefix}/share/ispell\""
  71. echo "#define MAN1DIR \"%{l_prefix}/man/man1\""
  72. echo "#define MAN4DIR \"%{l_prefix}/man/man4\""
  73. echo "#define WORDS \"$RPM_BUILD_DIR/words\""
  74. echo "#define YACC \"%{l_prefix}/bin/bison -y\""
  75. case "%{l_target}" in
  76. *-linux* | *-solaris* ) echo "#define USG" ;;
  77. esac
  78. #echo "#define LANGUAGES \"{american,MASTERDICTS=american.med+,HASHFILES=americanmed+.hash,EXTRADICT=$RPM_BUILD_DIR/words}\""
  79. ) >local.h
  80. %{l_make} %{l_mflags}
  81. ( cd hk-deutsch
  82. cat worte.txt verben.txt \
  83. adjektive.txt klein.txt geographie.txt vornamen.txt \
  84. abkuerz.txt imperat.txt latein.txt informatik.txt \
  85. infoabk.txt elektronik.txt orgabk.txt marken.txt \
  86. alphabeta.txt roemisch.txt zusammen.txt | \
  87. sort -u >all.words
  88. ../buildhash all.words deutsch.aff deutsch.hash
  89. )
  90. ( cd igerman98-20001109
  91. %{l_make} %{l_mflags} \
  92. UNSQ=cat BUILDHASH=`pwd`/../buildhash \
  93. german.hash 2>/dev/null
  94. )
  95. %install
  96. rm -rf $RPM_BUILD_ROOT
  97. PATH="%{l_prefix}/bin:$PATH"; export PATH
  98. %{l_shtool} mkdir -f -p -m 755 \
  99. $RPM_BUILD_ROOT%{l_prefix}/bin \
  100. $RPM_BUILD_ROOT%{l_prefix}/man \
  101. $RPM_BUILD_ROOT%{l_prefix}/share/ispell
  102. ( echo "#define MINIMENU"
  103. echo "#undef NO8BIT"
  104. echo "#define MASKBITS 64"
  105. echo "#define CC \"%{l_cc}\""
  106. echo "#define CFLAGS \"%{l_cflags -O}\""
  107. echo "#define BINDIR \"$RPM_BUILD_ROOT%{l_prefix}/bin\""
  108. echo "#define LIBDIR \"$RPM_BUILD_ROOT%{l_prefix}/share/ispell\""
  109. echo "#define MAN1DIR \"$RPM_BUILD_ROOT%{l_prefix}/man/man1\""
  110. echo "#define MAN4DIR \"$RPM_BUILD_ROOT%{l_prefix}/man/man4\""
  111. echo "#define WORDS \"$RPM_BUILD_DIR/words\""
  112. #echo "#define LANGUAGES \"{american,MASTERDICTS=american.med+,HASHFILES=americanmed+.hash,EXTRADICT=$RPM_BUILD_DIR/words}\""
  113. ) >local.h
  114. %{l_make} %{l_mflags} config.sh install-basic install-deformatters install-dictbuild install-languages
  115. rm -f $RPM_BUILD_ROOT%{l_prefix}/share/ispell/american*
  116. ( cd hk-deutsch
  117. %{l_shtool} install -c -m 644 \
  118. deutsch.aff $RPM_BUILD_ROOT%{l_prefix}/share/ispell/deutsch-old.aff
  119. %{l_shtool} install -c -m 644 \
  120. deutsch.hash $RPM_BUILD_ROOT%{l_prefix}/share/ispell/deutsch-old.hash
  121. )
  122. ( cd igerman98-20001109
  123. %{l_shtool} install -c -m 644 \
  124. german.aff $RPM_BUILD_ROOT%{l_prefix}/share/ispell/deutsch.aff
  125. %{l_shtool} install -c -m 644 \
  126. german.hash $RPM_BUILD_ROOT%{l_prefix}/share/ispell/deutsch.hash
  127. )
  128. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  129. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  130. %files -f files
  131. %clean
  132. rm -rf $RPM_BUILD_ROOT