X-Git-Url: http://git.pld-linux.org/?p=packages%2Fdict-jargon.git;a=blobdiff_plain;f=dict-jargon.spec;h=89e26c1dedb35eedd8d390d35a5e01a128964931;hp=52e49b1dc7e46e3501f2dc3b3d8a5989e3ff8fe9;hb=3130eacee77fd01d2822df43f0ae31e5fc07c8f6;hpb=f6f9148a5caf5948c376f3f18d0b08a8713302ea diff --git a/dict-jargon.spec b/dict-jargon.spec index 52e49b1..89e26c1 100644 --- a/dict-jargon.spec +++ b/dict-jargon.spec @@ -1,49 +1,62 @@ %define dictname jargon Summary: The On-Line Hacker Jargon File dictionary for dictd +Summary(pl): S³ownik Hacker Jargon dla dictd Name: dict-%{dictname} Version: 4.2.0 -Release: 1 +Release: 2 License: GPL -Group: Applications/Dictionary -URL: http://www.dict.org/ +Group: Applications/Dictionaries 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 -Requires: dictd -BuildArch: noarch +BuildRequires: dictzip +BuildRequires: autoconf +Requires: dictd +Requires: %{_sysconfdir}/dictd + +%description +This package contains The On-Line Hacker Jargon File, version 4.2.0, +formatted for use by the dictionary server in the dictd package. -%description -This package contains The On-Line Hacker Jargon File, version 4.2.0, formatted for use by the dictionary server in the dictd package. +%description -l pl +Ten pakiet zawiera s³ownik The On-Line Hacker Jargon File w wersji +4.2.0, sformatowany do u¿ytku z serwerem s³ownika dictd. %prep %setup -q %build -%configure -%{__make} db +autoconf +%configure +%{__make} db %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/%{dictname} +echo "# The On-Line Hacker Jargon File dictionary +database %{dictname} { + data \"$dictprefix.dict.dz\" + index \"$dictprefix.index\" +} +" > $RPM_BUILD_ROOT%{_sysconfdir}/dictd/%{dictname}.dictconf %clean rm -rf $RPM_BUILD_ROOT +%postun +if [ -f /var/lock/subsys/dictd ]; then + /etc/rc.d/init.d/dictd restart 1>&2 +fi + %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 The On-Line Hacker Jargon File 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) +%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/dictd/*.dictconf %{_datadir}/dictd/%{dictname}*