]> git.pld-linux.org Git - packages/dictd.git/blob - dictd.spec
- more specific Requires()
[packages/dictd.git] / dictd.spec
1 Summary:        Dictionary database server
2 Summary(pl):    Serwer bazy s³owników
3 Name:           dictd
4 Version:        1.9.1
5 Release:        1
6 License:        GPL
7 Group:          Networking/Daemons
8 Source0:        ftp://ftp.dict.org/pub/dict/%{name}-%{version}.tar.gz
9 Source1:        %{name}.init
10 Source2:        %{name}.sysconfig
11 Patch0:         %{name}-no_libnsl.patch
12 Patch1:         %{name}-opt.patch
13 Patch2:         %{name}-ac253.patch
14 URL:            http://www.dict.org/
15 BuildRequires:  autoconf
16 BuildRequires:  automake
17 BuildRequires:  bison
18 BuildRequires:  flex
19 BuildRequires:  libltdl-devel
20 BuildRequires:  zlib-devel
21 Requires(post,preun):   /sbin/chkconfig
22 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24 %description
25 Server for the Dictionary Server Protocol (DICT), a TCP transaction
26 based query/response protocol that allows a client to access
27 dictionary definitions from a set of natural language dictionary
28 databases.
29
30 %description -l pl
31 Serwer dla Dictionary Server Protocol(DICT), bazuj±cego na TCP
32 protoko³u zapytañ i odpowiedzi umo¿liwiaj±cego klientom na dostêp do
33 definicji s³ownikowych z zestawu baz danych.
34
35 %package -n dict
36 Summary:        DICT Protocol Client
37 Summary(pl):    Klient protoko³u DICT
38 Group:          Applications/Networking
39
40 %description -n dict
41 Client for the Dictionary Server Protocol (DICT), a TCP transaction
42 based query/response protocol that provides access to dictionary
43 definitions from a set of natural language dictionary databases.
44
45 %description -n dict -l pl
46 Klient dla Dictionary Server Protocol(DICT), bazuj±cego na TCP
47 protoko³u zapytañ i odpowiedzi umo¿liwiaj±cego klientom na dostêp do
48 definicji s³ownikowych z zestawu baz danych.
49
50 %package -n dictzip
51 Summary:        Compress (or expand) files, allowing random access
52 Summary(pl):    Kompresja (i dekompresja) plików pozwalaj±ca na swobodny dostêp
53 Group:          Applications/Archiving
54
55 %description -n dictzip
56 dictzip compresses files using the gzip(1) algorithm (LZ77) in a
57 manner which is completely compatible with the gzip file format. An
58 extension to the gzip file format (Extra Field, described in 2.3.1.1
59 of RFC 1952) allows extra data to be stored in the header of a
60 compressed file. Dictd, the DICT protocol dictionary server will make
61 use of this data to perform pseudo-random access on the file.
62
63 %description -n dictzip -l pl
64 dictzip kompresuje pliki korzystaj±c z zawartego w gzip(1) algorytmu
65 (LZ77) który jest ca³kowicie kompatybilny z formatem plików gzip.
66 Rozszerzenie do formatu plików gzip (pole dodatkowe, opisane w 2.3.1.1
67 RFC 1952) pozwalaj±cego na dodatkowe dane zapisane w nag³ówku
68 skompresowanego pliku. Dictd, serwer protoko³u DICT wykorzystuje te
69 dane do pseudo-swobodnego dostêpu do pliku.
70
71 %prep
72 %setup -q
73 %patch0 -p1
74 %patch1 -p1
75 %patch2 -p1
76
77 %build
78 cp -f %{_datadir}/automake/config.* .
79 %{__aclocal}
80 %{__autoconf}
81 cd libmaa
82 cp -f %{_datadir}/automake/config.* .
83 %{__aclocal}
84 %{__autoconf}
85 cd ..
86 CFLAGS="%{rpmcflags} -DUID_NOBODY=99 -DGID_NOBODY=99"
87 %configure
88
89 %{__make}
90
91 %install
92 rm -rf $RPM_BUILD_ROOT
93 install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig,%{name}},%{_bindir},%{_sbindir}} \
94                 $RPM_BUILD_ROOT{%{_datadir}/%{name},%{_mandir}/man{1,8}}
95
96 install dict dictzip $RPM_BUILD_ROOT%{_bindir}
97 install {dict,dictzip}.1 $RPM_BUILD_ROOT%{_mandir}/man1
98
99 install %{name} $RPM_BUILD_ROOT%{_sbindir}
100 install %{name}.8 $RPM_BUILD_ROOT%{_mandir}/man8
101
102 echo "server localhost" > dict.conf
103 echo -e "access {\n\tallow localhost\n\tdeny *\n}\n" > %{name}-main.conf
104
105 install dict.conf $RPM_BUILD_ROOT%{_sysconfdir}
106 install dictd-main.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
107 touch $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf
108 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
109 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
110
111 mv -f doc/security.doc security.txt
112
113 %clean
114 rm -rf $RPM_BUILD_ROOT
115
116 %post
117 /sbin/chkconfig --add %{name}
118 if [ -f /var/lock/subsys/%{name} ]; then
119         /etc/rc.d/init.d/%{name} restart >&2
120 else
121         echo "Run \"/etc/rc.d/init.d/%{name} start\" to start %{name} daemon."
122 fi
123
124 %preun
125 if [ "$1" = "0" ]; then
126         if [ -f /var/lock/subsys/%{name} ]; then
127                 /etc/rc.d/init.d/%{name} stop >&2
128         fi
129         /sbin/chkconfig --del %{name}
130 fi
131
132 %files
133 %defattr(644,root,root,755)
134 %doc ANNOUNCE ChangeLog README* TODO dictd.conf example* security.txt
135 %ghost %{_sysconfdir}/%{name}.conf
136 %dir %{_sysconfdir}/%{name}
137 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/%{name}/%{name}-main.conf
138 %config(noreplace) %verify(not md5 size mtime) /etc/sysconfig/%{name}
139 %attr(754,root,root) /etc/rc.d/init.d/%{name}
140 %attr(755,root,root) %{_sbindir}/%{name}
141 %dir %{_datadir}/%{name}
142 %{_mandir}/man8/%{name}*
143
144 %files -n dict
145 %defattr(644,root,root,755)
146 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/dict.conf
147 %attr(755,root,root) %{_bindir}/dict
148 %{_mandir}/man1/dict.1*
149
150 %files -n dictzip
151 %defattr(644,root,root,755)
152 %attr(755,root,root) %{_bindir}/dictzip
153 %{_mandir}/man1/dictzip.1*
This page took 0.049849 seconds and 3 git commands to generate.