]> git.pld-linux.org Git - packages/dictd.git/blob - dictd.spec
- do not verify size, time and md5sum of config files
[packages/dictd.git] / dictd.spec
1 Summary:        Dictionary database server
2 Name:           dictd
3 Version:        1.5.0
4 Release:        2
5 License:        GPL
6 Group:          Daemons
7 Group(pl):      Serwery
8 URL:            http://www.dict.org/
9 Source0:        ftp://ftp.dict.org/pub/dict/%{name}-%{version}.tar.gz
10 Source1:        %{name}.init
11 Source2:        %{name}.sysconfig
12 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
13
14 %description 
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
18 databases.
19
20 %package        -n dict
21 Summary:        DICT Protocol Client
22 Group:          Applications/Networking
23 Group(pl):      Aplikacje/Sieciowe
24
25 %description -n dict
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.
29
30 %package        -n dictzip
31 Summary:        Compress (or expand) files, allowing random access
32 Group:          Utilities/Archiving
33 Group(pl):      Narzêdzia/Archiwizacja
34
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.
42
43 %prep
44 %setup -q -n %{name}-%{version}
45
46 %build
47 # --without-local-zlib option gives no effect. Usage of zlib from dictd tarball 
48 # is hardcoded in configure. 
49
50 # TODO: 
51 # - patch needed instead of use -DUID_NOBODY=`id -u nobody`
52 #
53 %configure --with-cflags="-DUID_NOBODY=`id -u nobody` $RPM_OPT_FLAGS"
54 %{__make}
55
56 %install
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}}
60
61 for f in dict dictzip; do
62         install -s $f $RPM_BUILD_ROOT/%{_bindir}
63         gzip -9nf $f.1
64         install $f.1.gz $RPM_BUILD_ROOT/%{_mandir}/man1
65 done 
66
67 install -s dictd $RPM_BUILD_ROOT/%{_sbindir}
68 gzip -9nf dictd.8
69 install dictd.8.gz $RPM_BUILD_ROOT/%{_mandir}/man8
70
71 echo "server localhost" > dict.conf
72 echo -e "access {\n\tallow localhost\n\tdeny *\n}\n" > dictd.conf 
73
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}
78
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
82
83 %clean
84 rm -rf $RPM_BUILD_ROOT
85
86 %post
87 /sbin/chkconfig --add %{name}
88
89 if [ -f /var/lock/subsystem/%{name} ]; then
90         /etc/rc.d/init.d/%{name} restart >&2
91 else
92         echo "Run \"/etc/rc.d/init.d/%{name} start\" to start %{name} daemon."
93 fi
94     
95 %preun
96 if [ $1 = 0 ]; then
97         /sbin/chkconfig --del %{name}
98         /etc/rc.d/init.d/%{name} stop >&2 || true
99 fi
100
101 %files
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
110
111 %files -n dict
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
116
117 %files -n dictzip
118 %defattr(644,root,root,755)
119 %attr(755,root,root) %{_bindir}/dictzip
120 %{_mandir}/man1/dictzip.1.gz
This page took 0.097985 seconds and 3 git commands to generate.