Source0: ftp://ftp.dict.org/pub/dict/%{name}-%{version}.tar.gz
Source1: http://dsl.org/faq/fjd/journo-1.1.tar.gz
Source2: http://wiretap.area.com/Gopher/Library/Classic/devils.txt
+Source3: http://ptm.linux.pl/slownik
URL: http://www.dict.org/
BuildRequires: autoconf
BuildRequires: dictzip
Ten pakiet zawiera s³ownik Free Journalism Dictionary do u¿ywania z
serwerem s³ownika dictd.
+%package -n dict-ptm
+Summary: PTM dictionary for DICTD
+Summary(pl): S³ownik PTM dla dictd
+Group: Applications/Dictionaries
+Requires: dictd
+Requires: %{_sysconfdir}/dictd
+
+%description -n dict-ptm
+This package contains dictionary created by Projekt Tlumaczenia Manuali
+for use by the dicitonary server in the dictd package.
+
+%description -n dict-ptm -l pl
+Ten pakiet zawiera s³ownik Projektu T³umaczenia Manuali, do u¿ycia z serwerem
+dictd.
+
%package -n dict-world95
Summary: world95 dictionary for DICTD
Summary(pl): S³ownik world95 dla dictd
%prep
%setup -q -a1
cp %{SOURCE2} ./
+cp %{SOURCE3} ./
%build
%{__autoconf}
dictzip devil.dict
+egrep -v "^#" slownik > slownik.1
+tr -d \[\] <slownik.1 > slownik.2
+sed -e 's/^\([[:alnum:]]\{2,\}\)\ \ /:\1:/' < slownik.2 > slownik.3
+./dictfmt -j -u "http://ptm.linux.pl/slownik" -s PTM slownik < slownik.3
+mv slownik.3 ptm
+dictzip ptm
+
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{_datadir}/dictd/,%{_sysconfdir}/dictd,%{_bindir}}
%{__make} install dictdir="$RPM_BUILD_ROOT%{_datadir}/dictd/"
-install journo.* devil.* $RPM_BUILD_ROOT%{_datadir}/dictd/
+install ptm.* journo.* devil.* $RPM_BUILD_ROOT%{_datadir}/dictd/
# jargon has separate package
rm -f $RPM_BUILD_ROOT%{_datadir}/dictd/jargon.*
-for i in easton elements foldoc hitchcock world95 journo devil; do
+for i in easton elements foldoc hitchcock world95 journo ptm devil; do
dictprefix=%{_datadir}/dictd/$i
echo "# Misc Dictionaries - $i
database $i {
/etc/rc.d/init.d/dictd restart 1>&2
fi
+%post -n dict-ptm
+if [ -f /var/lock/subsys/dictd ]; then
+ /etc/rc.d/init.d/dictd restart 1>&2
+fi
+
+%postun -n dict-ptm
+if [ -f /var/lock/subsys/dictd ]; then
+ /etc/rc.d/init.d/dictd restart 1>&2
+fi
+
%post -n dict-world95
if [ -f /var/lock/subsys/dictd ]; then
/etc/rc.d/init.d/dictd restart 1>&2
%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/dictd/journo.dictconf
%{_datadir}/dictd/journo.*
+%files -n dict-ptm
+%defattr(644,root,root,755)
+%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/dictd/ptm.dictconf
+%{_datadir}/dictd/ptm.*
+
%files -n dict-world95
%defattr(644,root,root,755)
%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/dictd/world95.dictconf