File words.spec of Package words
#
# spec file for package words (Version 6)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: words
License: Public Domain, Freeware
Group: Productivity/Text/Utilities
AutoReqProv: on
PreReq: %fillup_prereq
Version: 6
Release: 143
Summary: An English words dictionary
Url: http://wordlist.sourceforge.net/
Source: http://prdownloads.sourceforge.net/wordlist/scowl-6.tar.gz
Source1: sysconfig.words
Source2: SuSEconfig.words
Patch: scowl-6.dif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%description
This packages contains an English words dictionary which will be
installed as
/usr/share/dict/american and linked to /usr/share/dict/words
The symbolic link may be used by look(1) and ispell(1). For a British
or Canadian version of such a words dictionary you may install
words-british respectively words-canadian.
Authors:
--------
Kevin Atkinson <kevina@gnu.org>
%package -n words-british
License: Public Domain, Freeware
Requires: words
Summary: A British words dictionary
Group: Productivity/Text/Utilities
AutoReqProv: on
%description -n words-british
This packages contains an British words dictionary which will be
installed as
/usr/share/dict/british
for a description see the package words.
Authors:
--------
Kevin Atkinson <kevina@gnu.org>
%package -n words-canadian
License: Public Domain, Freeware
Requires: words
Summary: A Canadian words dictionary
Group: Productivity/Text/Utilities
AutoReqProv: on
%description -n words-canadian
This packages contains an Canadian words dictionary which will be
installed as
/usr/share/dict/canadian
for a description see the package words.
Authors:
--------
Kevin Atkinson <kevina@gnu.org>
%prep
%setup -n scowl-6
%patch
%build
test -d working/ || mkdir working
test -d l/ || tar xf l.tar
test -d result/ || mkdir result
#
# We use named pipes herein
#
set +o posix
#
# Size is one of 10, 20, 35 (small),
# 40, 50 (medium), 55, 60, 70 (large),
# 80 (huge), 95 (insane)
#
#sizeext="10 20 35 40 50 55 60 70 80 95"
sizeext="10 20 35 40 50 55 60 70 80"
#sizeext="10 20 35 40 50 55 60 70"
#
# We support those three english spellings
#
spellings="american
british
canadian
"
#
# All classes
#
classes="abbreviations
contractions
hacker
proper-names
roman-numerals
upper
words
"
#
# All variants
#
variants="0 1 2"
LANG=POSIX
export POSIX
for s in $spellings ; do
case "$s" in
american*) LC_CTYPE=en_US ;;
british*) LC_CTYPE=en_GB ;;
canadian*) LC_CTYPE=en_GB ;;
esac
LC_COLLATE=$LC_CTYPE
export LC_CYPTE LC_COLLATE
touch result/${s}.todo
set +x
for c in $classes ; do
for e in $sizeext ; do
f=final/english-${c}.${e}
if test -f $f ; then
cat $f
fi
for v in $variants ; do
f=final/variant_${v}-${c}.${e}
if test -f $f ; then
cat $f
fi
done
f=final/${s}-${c}.${e}
if test -f $f ; then
cat $f
fi
done
done > >(sort -fiu -S1M > result/${s}; rm result/${s}.todo)
set -x
done
for s in $spellings ; do
while test -e result/${s}.todo ; do
sleep 1
done
done
%install
rm -rf ${RPM_BUILD_ROOT}
mkdir -p ${RPM_BUILD_ROOT}/usr/share/dict
cp -p result/* ${RPM_BUILD_ROOT}/usr/share/dict/
mkdir -p ${RPM_BUILD_ROOT}/var/lib/dict
ln -sf ../../../usr/share/dict/american ${RPM_BUILD_ROOT}/var/lib/dict/words
ln -sf ../../../var/lib/dict/words ${RPM_BUILD_ROOT}/usr/share/dict/words
mkdir -p ${RPM_BUILD_ROOT}/sbin/conf.d
mkdir -p ${RPM_BUILD_ROOT}/var/adm/fillup-templates
install -m 644 %{SOURCE1} ${RPM_BUILD_ROOT}/var/adm/fillup-templates/
install -m 755 %{SOURCE2} ${RPM_BUILD_ROOT}/sbin/conf.d/
%clean
rm -rf ${RPM_BUILD_ROOT}
%post
%{fillup_only}
%preun
test -L usr/share/dict/words && rm usr/share/dict/words || true
%files
%defattr(644,root,root,755)
%doc README
/usr/share/dict/american
%attr(755,root,root) /sbin/conf.d/SuSEconfig.words
/var/adm/fillup-templates/sysconfig.words
%dir /var/lib/dict/
%ghost /usr/share/dict/words
%verify(not link mtime) /var/lib/dict/words
%files -n words-british
%defattr(644,root,root,755)
%doc README
/usr/share/dict/british
%files -n words-canadian
%defattr(644,root,root,755)
%doc README
/usr/share/dict/canadian
%changelog
* Thu Jul 26 2007 werner@suse.de
- Increase size which includes `ocular' (bug #294371)
* Tue Apr 03 2007 werner@suse.de
- Enable sorting by correcting a typo in keyword LC_CTYPE (#258445)
* Wed Jun 21 2006 werner@suse.de
- Remove self provide
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Fri Aug 26 2005 ro@suse.de
- SuSEconfig.words back to 755
* Thu Mar 10 2005 werner@suse.de
- Use /var/lib/dict/ to handle ro /usr/share/dict/ and the
symbolic link `words' to the choosen dictionary (bug #67048)
* Thu Feb 24 2005 werner@suse.de
- Add Prerequest for fillup (bug #66420)
* Wed Oct 27 2004 werner@suse.de
- Switch to new source package due license promblems with the
old words list. This new list also provides a British and
Canadian version.
* Thu Feb 05 2004 kukuk@suse.de
- Revert wrong change to %%defattr from 4. Feb.
* Wed Feb 04 2004 hmacht@suse.de
- added option # norootforbuild in specfile
* Thu Jun 12 2003 kukuk@suse.de
- Cleanup specfile
* Thu Feb 07 2002 werner@suse.de
- Remove symbolic link because FHS-2.2 check can not determine
backward symbolic links
* Thu Dec 14 2000 werner@suse.de
- Group tag
* Mon Jun 19 2000 ro@suse.de
- doc relocation
* Mon Sep 13 1999 bs@suse.de
- ran old prepare_spec on spec file to switch to new prepare_spec.
* Tue Jun 08 1999 bs@suse.de
- made package "noarch"
* Mon Feb 09 1998 werner@suse.de
- Move /usr/dict to /usr/share/dict,
add symbolic link or compatibility
* Thu Feb 06 1997 werner@suse.de
- New packages: english word list needed by look or grep