X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=dict-wn.spec;h=41ada0b1e38650c5a7d71029036bf9c5a2c8ecd4;hb=7c4f6331128dce062053194adba8056bb2420202;hp=93cf100bfa28fc28fb816136550848d2db80e67e;hpb=ffb15743b517107061ef9993898e4f22eadc548e;p=packages%2Fdict-wn.git diff --git a/dict-wn.spec b/dict-wn.spec index 93cf100..41ada0b 100644 --- a/dict-wn.spec +++ b/dict-wn.spec @@ -1,50 +1,56 @@ -%define dictname wn -Summary: WordNet lexical reference system formatted as dictionary for dictd +%define dictname wn +Summary: WordNet lexical reference system for dictd +Summary(pl.UTF-8): System referencji słownikowych WordNet dla dictd Name: dict-%{dictname} -Version: 1.5 -Release: 1 +Version: 2.0 +Release: 2 License: Free to use, but see http://www.cogsci.princeton.edu/~wn/ -Group: Applications/Dictionary +Group: Applications/Dictionaries +# note: pre means preformatted +Source0: ftp://ftp.dict.org/pub/dict/pre/%{name}-%{version}-pre.tar.gz +# Source0-md5: fcfedcc13815cde1e28103b61c05c168 URL: http://www.dict.org/ -Source0: ftp://ftp.dict.org/pub/dict/%{name}-%{version}.tar.gz +Requires: %{_sysconfdir}/dictd +Requires: dictd BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) -BuildRequires: dictzip -Requires: dictd -BuildArch: noarch -%description -This package contains WordNet (r) 1.6 Lexical Database +%description +This package contains WordNet (r) %{version} Lexical Database formatted for use by the dictionary server in the dictd package. -%prep -%setup -q +%description -l pl.UTF-8 +Ten pakiet zawiera leksykalną bazę danych WordNet (r) %{version} +sformatowaną do używania z serwerem słownika dictd. -%build -%configure -%{__make} db +%prep +%setup -c -q %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT%{_datadir}/dictd/ +install -d $RPM_BUILD_ROOT{%{_datadir}/dictd,%{_sysconfdir}/dictd} -DICTDIR="$RPM_BUILD_ROOT%{_datadir}/dictd/" -make install dictdir="$DICTDIR" +dictprefix=%{_datadir}/dictd/%{dictname} +echo "# WordNet %{version} Lexical Database dictionary +database %{dictname} { + data \"$dictprefix.dict.dz\" + index \"$dictprefix.index\" +}" > $RPM_BUILD_ROOT%{_sysconfdir}/dictd/%{dictname}.dictconf +mv %{dictname}.* $RPM_BUILD_ROOT%{_datadir}/dictd %clean rm -rf $RPM_BUILD_ROOT %post -prefix=%{_datadir}/dictd/%{dictname} - -if ! grep ' %{dictname} ' /etc/dictd.conf >/dev/null; then - echo "Edit /etc/dictd.conf to see %{dictname} dictionary under dictd" -echo "# Uncommment this to configure WordNet Lexical Database dictionary -#database %{dictname} { -# data \"$prefix.dict.dz\" -# index \"$prefix.index\" } -" >> /etc/dictd.conf +if [ -f /var/lock/subsys/dictd ]; then + /etc/rc.d/init.d/dictd restart 1>&2 +fi + +%postun +if [ -f /var/lock/subsys/dictd ]; then + /etc/rc.d/init.d/dictd restart 1>&2 || true fi %files %defattr(644,root,root,755) -%{_datadir}/dictd/%{dictname}* +%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dictd/%{dictname}.dictconf +%{_datadir}/dictd/%{dictname}.*