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
14 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17 Server for the Dictionary Server Protocol (DICT), a TCP transaction
18 based query/response protocol that allows a client to access
19 dictionary definitions from a set of natural language dictionary
23 Summary: DICT Protocol Client
24 Group: Applications/Networking
25 Group(pl): Aplikacje/Sieciowe
28 Client for the Dictionary Server Protocol (DICT), a TCP transaction
29 based query/response protocol that provides access to dictionary
30 definitions from a set of natural language dictionary databases.
33 Summary: Compress (or expand) files, allowing random access
34 Group: Utilities/Archiving
35 Group(pl): Narzêdzia/Archiwizacja
37 %description -n dictzip
38 dictzip compresses files using the gzip(1) algorithm (LZ77) in a
39 manner which is completely compatible with the gzip file format. An
40 extension to the gzip file format (Extra Field, described in 2.3.1.1
41 of RFC 1952) allows extra data to be stored in the header of a
42 compressed file. Dictd, the DICT protocol dictionary server will make
43 use of this data to perform pseudo-random access on the file.
46 %setup -q -n %{name}-%{version}
49 # --without-local-zlib option gives no effect. Usage of zlib from dictd tarball
50 # is hardcoded in configure.
53 # - patch needed instead of use -DUID_NOBODY=`id -u nobody`
55 %configure --with-cflags="-DUID_NOBODY=`id -u nobody` $RPM_OPT_FLAGS"
59 rm -rf $RPM_BUILD_ROOT
60 install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig},%{_bindir},%{_sbindir}} \
61 $RPM_BUILD_ROOT{%{_datadir}/dictd,%{_mandir}/man{1,8}}
63 for f in dict dictzip; do
64 install -s $f $RPM_BUILD_ROOT/%{_bindir}
66 install $f.1.gz $RPM_BUILD_ROOT/%{_mandir}/man1
69 install -s dictd $RPM_BUILD_ROOT/%{_sbindir}
71 install dictd.8.gz $RPM_BUILD_ROOT/%{_mandir}/man8
73 echo "server localhost" > dict.conf
74 echo -e "access {\n\tallow localhost\n\tdeny *\n}\n" > dictd.conf
75 install dict.conf dictd.conf $RPM_BUILD_ROOT%{_sysconfdir}
77 mkdir $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
78 install %{name}.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}-main.conf
79 touch %{buildroot}%{_sysconfdir}/%{name}.conf
80 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/%{name}
81 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/%{name}
83 mv -f doc/security.doc security.txt
84 gzip -9nf {ANNOUNCE,ChangeLog,README,TODO,%{name}.conf,example*.conf,example.site,security.txt}
85 gzip -9nf example.dictrc
88 rm -rf $RPM_BUILD_ROOT
91 /sbin/chkconfig --add %{name}
92 if [ -f /var/lock/subsystem/%{name} ]; then
93 /etc/rc.d/init.d/%{name} restart >&2
95 echo "Run \"/etc/rc.d/init.d/%{name} start\" to start %{name} daemon."
100 /sbin/chkconfig --del %{name}
101 /etc/rc.d/init.d/%{name} stop >&2 || true
105 %defattr(644,root,root,755)
106 %attr(750,root,root) %dir %{_sysconfdir}/%{name}
107 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}/%{name}-main.conf
108 %attr(640,root,root) %verify(not size mtime md5) %{_sysconfdir}/%{name}.conf
109 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/sysconfig/%{name}
110 %attr(754,root,root) /etc/rc.d/init.d/%{name}
111 %attr(755,root,root) %{_sbindir}/%{name}
112 %dir %{_datadir}/dictd
113 %{_mandir}/man8/%{name}*
114 %doc {ANNOUNCE,ChangeLog,README,TODO,%{name}.conf,example*.conf,example.site,security.txt}.gz
117 %defattr(644,root,root,755)
118 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/dict.conf
119 %attr(755,root,root) %{_bindir}/dict
120 %{_mandir}/man1/dict.1.gz
123 %defattr(644,root,root,755)
124 %attr(755,root,root) %{_bindir}/dictzip
125 %{_mandir}/man1/dictzip.1.gz