]> git.pld-linux.org Git - packages/dict-wn.git/blobdiff - dict-wn.spec
- adapterized.
[packages/dict-wn.git] / dict-wn.spec
index 884e5c94cf76da418133744d77437c9a278ab405..7d7350fcb1530766001381d8c9d5e7794c924d15 100644 (file)
@@ -1,51 +1,61 @@
-%define         dictname wn
+%define                dictname wn
 Summary:       WordNet lexical reference system formatted as dictionary for dictd
 Summary:       WordNet lexical reference system formatted as dictionary for dictd
-Name:          dict-%{dictname}
+Summary(pl):   System referencji s³ownikowych WordNet dla dictd
+Name:          dict-wn
 Version:       1.5
 Version:       1.5
-Release:       1
+Release:       2
 License:       Free to use, but see http://www.cogsci.princeton.edu/~wn/
 Group:         Applications/Dictionaries
 License:       Free to use, but see http://www.cogsci.princeton.edu/~wn/
 Group:         Applications/Dictionaries
-Group(pl):     Aplikacje/S³owniki
-URL:           http://www.dict.org/
 Source0:       ftp://ftp.dict.org/pub/dict/%{name}-%{version}.tar.gz
 Source0:       ftp://ftp.dict.org/pub/dict/%{name}-%{version}.tar.gz
+URL:           http://www.dict.org/
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 BuildRequires: dictzip
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 BuildRequires: dictzip
-Requires:      dictd 
-BuildArch:     noarch
+BuildRequires: autoconf
+Requires:      dictd
+Requires:      %{_sysconfdir}/dictd
 
 
-%description 
+%description
 This package contains WordNet (r) 1.6 Lexical Database formatted for
 use by the dictionary server in the dictd package.
 
 This package contains WordNet (r) 1.6 Lexical Database formatted for
 use by the dictionary server in the dictd package.
 
-%prep 
+%description -l pl
+Ten pakiet zawiera leksykaln± bazê danych WordNet sformatowan± do
+u¿ywania z serwerem s³ownika dictd.
+
+%prep
 %setup -q
 
 %build
 %setup -q
 
 %build
-%configure 
-%{__make} db 
+autoconf
+%configure
+%{__make} db
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_datadir}/dictd/
+install -d $RPM_BUILD_ROOT{%{_datadir}/dictd/,%{_sysconfdir}/dictd}
+%{__make} install dictdir="$RPM_BUILD_ROOT%{_datadir}/dictd/"
 
 
-DICTDIR="$RPM_BUILD_ROOT%{_datadir}/dictd/"
-%{__make} install dictdir="$DICTDIR" 
+dictprefix=%{_datadir}/dictd/wn
+echo "# WordNet 1.6 Lexical Database dictionary
+database %{dictname} {
+    data  \"$dictprefix.dict.dz\"
+    index \"$dictprefix.index\"
+}" > $RPM_BUILD_ROOT%{_sysconfdir}/dictd/%{dictname}.dictconf
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%postun
+if [ -f /var/lock/subsys/dictd ]; then
+       /etc/rc.d/init.d/dictd restart 1>&2 || true
+fi
+
 %post
 %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
 
 %files
 %defattr(644,root,root,755)
 fi
 
 %files
 %defattr(644,root,root,755)
+%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/dictd/%{dictname}.dictconf
 %{_datadir}/dictd/%{dictname}*
 %{_datadir}/dictd/%{dictname}*
This page took 0.073537 seconds and 4 git commands to generate.