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