1 Summary: Dictionary database server
8 URL: http://www.dict.org/
9 Source0: ftp://ftp.dict.org/pub/dict/%{name}-%{version}.tar.gz
11 Source2: %{name}.sysconfig
12 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
15 Server for the Dictionary Server Protocol (DICT), a TCP transaction
16 based query/response protocol that allows a client to access
17 dictionary definitions from a set of natural language dictionary
21 Summary: DICT Protocol Client
22 Group: Applications/Networking
23 Group(pl): Aplikacje/Sieciowe
26 Client for the Dictionary Server Protocol (DICT), a TCP transaction
27 based query/response protocol that provides access to dictionary
28 definitions from a set of natural language dictionary databases.
31 Summary: Compress (or expand) files, allowing random access
32 Group: Utilities/Archiving
33 Group(pl): Narzêdzia/Archiwizacja
35 %description -n dictzip
36 dictzip compresses files using the gzip(1) algorithm (LZ77) in a
37 manner which is completely compatible with the gzip file format. An
38 extension to the gzip file format (Extra Field, described in 2.3.1.1
39 of RFC 1952) allows extra data to be stored in the header of a
40 compressed file. Dictd, the DICT protocol dictionary server will make
41 use of this data to perform pseudo-random access on the file.
44 %setup -q -n %{name}-%{version}
47 # --without-local-zlib option gives no effect. Usage of zlib from dictd tarball
48 # is hardcoded in configure.
51 # - patch needed instead of use -DUID_NOBODY=`id -u nobody`
53 %configure --with-cflags="-DUID_NOBODY=`id -u nobody` $RPM_OPT_FLAGS"
57 rm -rf $RPM_BUILD_ROOT
58 install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig},%{_bindir},%{_sbindir}} \
59 $RPM_BUILD_ROOT{%{_datadir}/dictd,%{_mandir}/man{1,8}}
61 for f in dict dictzip; do
62 install -s $f $RPM_BUILD_ROOT/%{_bindir}
64 install $f.1.gz $RPM_BUILD_ROOT/%{_mandir}/man1
67 install -s dictd $RPM_BUILD_ROOT/%{_sbindir}
69 install dictd.8.gz $RPM_BUILD_ROOT/%{_mandir}/man8
71 echo "server localhost" > dict.conf
72 echo -e "access {\n\tallow localhost\n\tdeny *\n}\n" > dictd.conf
74 install dict.conf dictd.conf $RPM_BUILD_ROOT%{_sysconfdir}/
75 touch %{buildroot}%{_sysconfdir}/%{name}.conf
76 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/%{name}
77 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/%{name}
79 mv -f doc/security.doc security.txt
80 gzip -9nf {ANNOUNCE,ChangeLog,README,TODO,%{name}.conf,example*.conf,example.site,security.txt}
81 gzip -9nf example.dictrc
84 rm -rf $RPM_BUILD_ROOT
87 /sbin/chkconfig --add %{name}
89 if [ -f /var/lock/subsystem/%{name} ]; then
90 /etc/rc.d/init.d/%{name} restart >&2
92 echo "Run \"/etc/rc.d/init.d/%{name} start\" to start %{name} daemon."
97 /sbin/chkconfig --del %{name}
98 /etc/rc.d/init.d/%{name} stop >&2 || true
102 %defattr(644,root,root,755)
103 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}.conf
104 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/sysconfig/%{name}
105 %attr(755,root,root) %{_sbindir}/%{name}
106 %attr(755,root,root) /etc/rc.d/init.d/%{name}
107 %dir %{_datadir}/dictd
108 %{_mandir}/man8/%{name}*
109 %doc {ANNOUNCE,ChangeLog,README,TODO,%{name}.conf,example*.conf,example.site,security.txt}.gz
112 %defattr(644,root,root,755)
113 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/dict.conf
114 %attr(755,root,root) %{_bindir}/dict
115 %{_mandir}/man1/dict.1.gz
118 %defattr(644,root,root,755)
119 %attr(755,root,root) %{_bindir}/dictzip
120 %{_mandir}/man1/dictzip.1.gz