]> git.pld-linux.org Git - packages/dict-jargon.git/blobdiff - dict-jargon.spec
- massive attack: source-md5
[packages/dict-jargon.git] / dict-jargon.spec
index 0136017354dc20f69f72e11b1498eee683489d82..4840027f8988cc8c0fc201f725639f0715aeb043 100644 (file)
@@ -1,51 +1,62 @@
-%define         dictname jargon
+%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
+Version:       4.3.3
 Release:       1
 License:       GPL
 Group:         Applications/Dictionaries
-Group(pl):     Aplikacje/S³owniki
+Source0:       http://www.tuxedo.org/~esr/jargon/jarg433.gz
+# Source0-md5: d68a6c42dfbf5bdd9f42792d11563d5b
 URL:           http://www.dict.org/
-Source0:       ftp://ftp.dict.org/pub/dict/%{name}-%{version}.tar.gz
-BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+BuildRequires: dictfmt
 BuildRequires: dictzip
-Requires:      dictd 
-BuildArch:     noarch
+Requires:      dictd
+Requires:      %{_sysconfdir}/dictd
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%description 
-This package contains The On-Line Hacker Jargon File, version 4.2.0,
+%description
+This package contains The On-Line Hacker Jargon File, version %version,
 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
+%version, sformatowany do u¿ytku z serwerem s³ownika dictd.
+
 %prep
-%setup -q
+%setup -c -T
+%{__gzip} -dc %{SOURCE0} > jarg433
 
 %build
-%configure 
-%{__make} db 
+dictfmt -j -u http://www.jargon.org/ -s "Jargon File (4.3.3, 20 Sep 2002)" %{dictname} < jarg433
+dictzip %{dictname}.dict
 
 %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 "# The On-Line Hacker Jargon File 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 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
+
+%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 size mtime md5) %{_sysconfdir}/dictd/%{dictname}.dictconf
+%{_datadir}/dictd/%{dictname}.*
This page took 0.073548 seconds and 4 git commands to generate.