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