Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37561996
en ru br
ALT Linux repos
S:20080103-alt1
5.0: 20080103-alt1
4.1: 20080103-alt1
4.0: 20060213-alt1
3.0: 20041107-alt1

Group :: Text tools
RPM: foldoc

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Name: foldoc
Version: 20041107
Release: alt1

Summary: FOLDOC - The Free On-line Dictionary of Computing
License: FDL
Group: Text tools
#Group: Applications/Dictionaries

Packager: Vitaly Lipatov <lav at altlinux.ru>

Source0: %name.bz2
Url: http://www.foldoc.org
BuildArchitectures: noarch

%define dictname %name
%define dictdesc FOLDOC -- Free On-line Dictionary of Computing
%define dictdir %_datadir/dictd

# Please do not use buildreq

BuildPreReq: dict-tools stardict-tools

%description
This package contains Free On-line Dictionary of Computing
for use by the dictionary server in the dictd package.

FOLDOC is a searchable dictionary of acronyms, jargon,
programming languages, tools, architecture, operating systems,
networking, theory, conventions, standards, mathematics,
telecoms, electronics, institutions, companies, projects,
products, history, in fact anything to do with computing.

%package -n dict-%name
Summary: FOLDOC - The Free On-line Dictionary of Computing for DICTD
#Group: Applications/Dictionaries
Group: Text tools

%description -n dict-%name
This package contains Free On-line Dictionary of Computing
for use by the dictionary server in the dictd package.

FOLDOC is a searchable dictionary of acronyms, jargon,
programming languages, tools, architecture, operating systems,
networking, theory, conventions, standards, mathematics,
telecoms, electronics, institutions, companies, projects,
products, history, in fact anything to do with computing.

%package -n stardict-%name
Summary: FOLDOC - The Free On-line Dictionary of Computing for Stardict
#Group: Applications/Dictionaries
Group: Text tools

%description -n stardict-%name
This package contains Free On-line Dictionary of Computing
for use with stardict.

FOLDOC is a searchable dictionary of acronyms, jargon,
programming languages, tools, architecture, operating systems,
networking, theory, conventions, standards, mathematics,
telecoms, electronics, institutions, companies, projects,
products, history, in fact anything to do with computing.

%prep
bzcat %SOURCE0 >%dictname.temp

%build
# prepare DictD
iconv -f ISO-8859-1 -t utf8 <%dictname.temp | \
dictfmt --locale ru_RU.UTF-8 -f \
-u "ftp://wombat.doc.ic.ac.uk/foldoc/Dictionary.gz" \
-s "%dictdesc (%version)" %dictname

# prepare stardict

cat <<EOF >%dictname.idxhead
StarDict's dict idx file
version=2.4.2
bookname=%dictname
website=http://www.foldoc.org
description=%dictdesc
date=%version
sametypesequence=m
BEGIN:
EOF

# С ним не работает :)

%__rm -f %dictname.idxhead

# dictd to stardict conversion

word=`dictd2dic %dictname | grep wordcount | cut -d " " -f 2`
size=`zcat dict*%dictname.idx.gz | wc -c`

cat << EOF > %dictname.ifo
StarDict's dict ifo file
version=2.4.2
wordcount=$word
website=http://www.foldoc.org
date=%version
idxfilesize=$size
bookname=%dictname
description=%dictdesc
sametypesequence=m
EOF

# compress dict file

dictzip %dictname.dict

%install
# dictd
%__install -d $RPM_BUILD_ROOT/{%_sysconfdir/dictd,%dictdir}
%__install -m 644 %dictname.dict.dz $RPM_BUILD_ROOT/%dictdir
%__install -m 644 %dictname.index $RPM_BUILD_ROOT/%dictdir

echo "# %dictdesc
database %dictname {
data  \"%dictdir/%dictname.dict.dz\"
index \"%dictdir/%dictname.index\"
}" > $RPM_BUILD_ROOT%_sysconfdir/dictd/%dictname.dictconf

# stardict

%__install -d $RPM_BUILD_ROOT/%_datadir/stardict/dic

%__install -m 644 dict*%dictname.dict.dz $RPM_BUILD_ROOT/%_datadir/stardict/dic/%dictname.dict.dz
%__install -m 644 dict*%dictname.idx.gz $RPM_BUILD_ROOT/%_datadir/stardict/dic/%dictname.idx.gz
%__install -m 644 %dictname.ifo $RPM_BUILD_ROOT/%_datadir/stardict/dic/%dictname.ifo

%post -n dict-%name
/usr/sbin/dictdconfig -w
%_initdir/dictd condreload

%postun -n dict-%name
/usr/sbin/dictdconfig -w
%_initdir/dictd condreload

%files -n dict-%name
%_sysconfdir/dictd/%dictname.dictconf
%dictdir/%dictname.*

%files -n stardict-%name
%_datadir/stardict/dic/*

%changelog

Full changelog you can see here

 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin