|
|
|
|
##
|
|
|
|
|
## ispell.spec -- OpenPKG RPM Specification
|
|
|
|
|
## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
|
|
|
|
|
## Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.com>
|
|
|
|
|
## Copyright (c) 2000-2003 Cable & Wireless <http://www.cw.com/>
|
|
|
|
|
##
|
|
|
|
|
## Permission to use, copy, modify, and distribute this software for
|
|
|
|
|
## any purpose with or without fee is hereby granted, provided that
|
|
|
|
|
## the above copyright notice and this permission notice appear in all
|
|
|
|
|
## copies.
|
|
|
|
|
##
|
|
|
|
|
## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
|
|
|
|
|
## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
|
|
|
## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
|
|
|
## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
|
|
|
|
|
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
|
|
|
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
|
|
|
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
|
|
|
|
## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
|
|
|
## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
|
|
|
## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
|
|
|
## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
|
## SUCH DAMAGE.
|
|
|
|
|
##
|
|
|
|
|
|
|
|
|
|
# package versions
|
|
|
|
|
%define V_ispell 3.2.06
|
|
|
|
|
%define V_igerman98 20030222
|
|
|
|
|
|
|
|
|
|
# package information
|
|
|
|
|
Name: ispell
|
|
|
|
|
Summary: Interactive Spell Checker
|
|
|
|
|
URL: http://fmg-www.cs.ucla.edu/geoff/ispell.html
|
|
|
|
|
Vendor: R.E. Gorin, Pace Willisson, Geoff Kuenning
|
|
|
|
|
Packager: The OpenPKG Project
|
|
|
|
|
Distribution: OpenPKG [BASE]
|
|
|
|
|
Group: Text
|
|
|
|
|
License: BSD
|
|
|
|
|
Version: %{V_ispell}
|
|
|
|
|
Release: 20030728
|
|
|
|
|
|
|
|
|
|
# list of sources
|
|
|
|
|
Source0: http://fmg-www.cs.ucla.edu/geoff/tars/ispell-%{V_ispell}.tar.gz
|
|
|
|
|
Source1: ftp://ftp.informatik.uni-kiel.de/pub/kiel/dicts/hk-deutsch.tar.gz
|
|
|
|
|
Source2: http://lisa.goe.net/~bjacke/igerman98/dict/igerman98-%{V_igerman98}.tar.bz2
|
|
|
|
|
Source3: ftp://ftp.openpkg.org/DST/ispell/words.gz
|
|
|
|
|
Patch0: ispell.patch
|
|
|
|
|
|
|
|
|
|
# build information
|
|
|
|
|
Prefix: %{l_prefix}
|
|
|
|
|
BuildRoot: %{l_buildroot}
|
|
|
|
|
BuildPreReq: OpenPKG, openpkg >= 20020206, make, bison, perl
|
|
|
|
|
PreReq: OpenPKG, openpkg >= 20020206
|
|
|
|
|
AutoReq: no
|
|
|
|
|
AutoReqProv: no
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
Ispell is a fast screen-oriented spelling checker that shows you
|
|
|
|
|
your errors in the context of the original file, and suggests
|
|
|
|
|
possible corrections when it can figure them out. Compared to UNIX
|
|
|
|
|
spell, it is faster and much easier to use. Ispell can also handle
|
|
|
|
|
languages other than English.
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q
|
|
|
|
|
%patch -p0
|
|
|
|
|
|
|
|
|
|
# unpack Unix dictionary
|
|
|
|
|
%{l_gzip} -d -c %{SOURCE words.gz} >$RPM_BUILD_DIR/words
|
|
|
|
|
|
|
|
|
|
# unpack German dictionaries
|
|
|
|
|
mkdir hk-deutsch
|
|
|
|
|
( cd hk-deutsch
|
|
|
|
|
%{l_gzip} -d -c %{SOURCE hk-deutsch.tar.gz} | %{l_tar} xf -
|
|
|
|
|
) || exit $?
|
|
|
|
|
%{l_bzip2} -d -c %{SOURCE igerman98-%{V_igerman98}.tar.bz2} | %{l_tar} xf -
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
# configure package
|
|
|
|
|
# kludge: determine whether vendor termcap, termlib or curses library exists
|
|
|
|
|
# reason: some brean-dead platforms (like SuSE, etc) have no termcap library installed.
|
|
|
|
|
termlib=""
|
|
|
|
|
echo "int main(int argc, char *argv[]) { return 0; }" >dummy.c
|
|
|
|
|
for lib in termcap termlib curses ncurses; do
|
|
|
|
|
rc=0; %{l_cc} -o dummy dummy.c -l$lib >/dev/null 2>&1 || rc=1
|
|
|
|
|
if [ $rc -eq 0 ]; then termlib="-l$lib"; break; fi
|
|
|
|
|
done
|
|
|
|
|
[ ".$termlib" = . ] && exit 1
|
|
|
|
|
( echo "#define MINIMENU"
|
|
|
|
|
echo "#undef NO8BIT"
|
|
|
|
|
echo "#define MASKBITS 64"
|
|
|
|
|
echo "#define CC \"%{l_cc}\""
|
|
|
|
|
echo "#define CFLAGS \"%{l_cflags -O}\""
|
|
|
|
|
echo "#define BINDIR \"%{l_prefix}/bin\""
|
|
|
|
|
echo "#define LIBDIR \"%{l_prefix}/share/ispell\""
|
|
|
|
|
echo "#define MAN1DIR \"%{l_prefix}/man/man1\""
|
|
|
|
|
echo "#define MAN4DIR \"%{l_prefix}/man/man4\""
|
|
|
|
|
echo "#define WORDS \"$RPM_BUILD_DIR/words\""
|
|
|
|
|
echo "#define YACC \"%{l_prefix}/bin/bison -y\""
|
|
|
|
|
echo "#define TERMLIB \"$termlib\""
|
|
|
|
|
case "%{l_target}" in
|
|
|
|
|
*-linux* | *-solaris* ) echo "#define USG" ;;
|
|
|
|
|
esac
|
|
|
|
|
# echo "#define LANGUAGES \"{american,MASTERDICTS=american.med+,HASHFILES=americanmed+.hash,EXTRADICT=$RPM_BUILD_DIR/words}\""
|
|
|
|
|
) >local.h
|
|
|
|
|
|
|
|
|
|
# build package
|
|
|
|
|
%{l_make} %{l_mflags}
|
|
|
|
|
|
|
|
|
|
# build additional German dictionaries
|
|
|
|
|
( cd hk-deutsch
|
|
|
|
|
cat worte.txt verben.txt \
|
|
|
|
|
adjektive.txt klein.txt geographie.txt vornamen.txt \
|
|
|
|
|
abkuerz.txt imperat.txt latein.txt informatik.txt \
|
|
|
|
|
infoabk.txt elektronik.txt orgabk.txt marken.txt \
|
|
|
|
|
alphabeta.txt roemisch.txt zusammen.txt | \
|
|
|
|
|
sort -u >all.words
|
|
|
|
|
../buildhash all.words deutsch.aff deutsch.hash
|
|
|
|
|
) || exit $?
|
|
|
|
|
( cd igerman98-%{V_igerman98}
|
|
|
|
|
%{l_shtool} subst \
|
|
|
|
|
-e 's;/usr/bin/perl;%{l_prefix}/bin/perl;g' \
|
|
|
|
|
bin/*.pl
|
|
|
|
|
%{l_shtool} subst \
|
|
|
|
|
-e 's;munchlist;../munchlist;g' \
|
|
|
|
|
Makefile
|
|
|
|
|
%{l_make} %{l_mflags} \
|
|
|
|
|
UNSQ=cat BUILDHASH=`pwd`/../buildhash \
|
|
|
|
|
german.hash 2>/dev/null
|
|
|
|
|
) || exit $?
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
# install package
|
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
%{l_shtool} mkdir -f -p -m 755 \
|
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/bin \
|
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/man \
|
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/share/ispell
|
|
|
|
|
( echo "#define MINIMENU"
|
|
|
|
|
echo "#undef NO8BIT"
|
|
|
|
|
echo "#define MASKBITS 64"
|
|
|
|
|
echo "#define CC \"%{l_cc}\""
|
|
|
|
|
echo "#define CFLAGS \"%{l_cflags -O}\""
|
|
|
|
|
echo "#define BINDIR \"$RPM_BUILD_ROOT%{l_prefix}/bin\""
|
|
|
|
|
echo "#define LIBDIR \"$RPM_BUILD_ROOT%{l_prefix}/share/ispell\""
|
|
|
|
|
echo "#define MAN1DIR \"$RPM_BUILD_ROOT%{l_prefix}/man/man1\""
|
|
|
|
|
echo "#define MAN4DIR \"$RPM_BUILD_ROOT%{l_prefix}/man/man4\""
|
|
|
|
|
echo "#define WORDS \"$RPM_BUILD_DIR/words\""
|
|
|
|
|
# echo "#define LANGUAGES \"{american,MASTERDICTS=american.med+,HASHFILES=americanmed+.hash,EXTRADICT=$RPM_BUILD_DIR/words}\""
|
|
|
|
|
) >local.h
|
|
|
|
|
%{l_make} %{l_mflags} \
|
|
|
|
|
config.sh install-basic install-deformatters install-dictbuild install-languages
|
|
|
|
|
|
|
|
|
|
# strip down installation
|
|
|
|
|
strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
|
|
|
|
|
rm -f $RPM_BUILD_ROOT%{l_prefix}/share/ispell/american*
|
|
|
|
|
|
|
|
|
|
# install German dictionaries
|
|
|
|
|
( cd hk-deutsch
|
|
|
|
|
%{l_shtool} install -c -m 644 \
|
|
|
|
|
deutsch.aff $RPM_BUILD_ROOT%{l_prefix}/share/ispell/deutsch-old.aff
|
|
|
|
|
%{l_shtool} install -c -m 644 \
|
|
|
|
|
deutsch.hash $RPM_BUILD_ROOT%{l_prefix}/share/ispell/deutsch-old.hash
|
|
|
|
|
) || exit $?
|
|
|
|
|
( cd igerman98-%{V_igerman98}
|
|
|
|
|
%{l_shtool} install -c -m 644 \
|
|
|
|
|
german.aff $RPM_BUILD_ROOT%{l_prefix}/share/ispell/deutsch.aff
|
|
|
|
|
%{l_shtool} install -c -m 644 \
|
|
|
|
|
german.hash $RPM_BUILD_ROOT%{l_prefix}/share/ispell/deutsch.hash
|
|
|
|
|
) || exit $?
|
|
|
|
|
|
|
|
|
|
# determine installation files
|
|
|
|
|
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
|
|
|
|
|
|
|
|
|
|
%files -f files
|
|
|
|
|
|
|
|
|
|
%clean
|
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|