]> git.pld-linux.org Git - packages/dictd.git/blobdiff - dictd.spec
- fix improper usage of %%{_sysconfdir}
[packages/dictd.git] / dictd.spec
index 17a20264b4075b500171f52aaeff6880514ece9a..1172989186eafe599bff87e3f3cb51116e40c5ac 100644 (file)
@@ -1,36 +1,57 @@
 Summary:       Dictionary database server
+Summary(pl):   Serwer bazy s³owników
 Name:          dictd
-Version:       1.5.0
-Release:       2
+Version:       1.8.0
+Release:       3
 License:       GPL
-Group:         Daemons
-Group(pl):     Serwery
-URL:           http://www.dict.org/
+Group:         Networking/Daemons
 Source0:       ftp://ftp.dict.org/pub/dict/%{name}-%{version}.tar.gz
 Source1:       %{name}.init
 Source2:       %{name}.sysconfig
+Patch0:                %{name}-no_libnsl.patch
+Patch1:                %{name}-opt.patch
+Patch2:                %{name}-smp.patch
+Patch3:                %{name}-ac253.patch
+URL:           http://www.dict.org/
+BuildRequires: autoconf
+BuildRequires: automake
+BuildRequires: bison
+BuildRequires: flex
+BuildRequires: libltdl-devel
+BuildRequires: zlib-devel
+PreReq:                /sbin/chkconfig
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%description 
+%description
 Server for the Dictionary Server Protocol (DICT), a TCP transaction
 based query/response protocol that allows a client to access
 dictionary definitions from a set of natural language dictionary
 databases.
 
-%package        -n dict
+%description -l pl
+Serwer dla Dictionary Server Protocol(DICT), bazuj±cego na TCP
+protoko³u zapytañ i odpowiedzi umo¿liwiaj±cego klientom na dostêp do
+definicji s³ownikowych z zestawu baz danych.
+
+%package -n dict
 Summary:       DICT Protocol Client
+Summary(pl):   Klient protoko³u DICT
 Group:         Applications/Networking
-Group(pl):     Aplikacje/Sieciowe
 
 %description -n dict
 Client for the Dictionary Server Protocol (DICT), a TCP transaction
 based query/response protocol that provides access to dictionary
 definitions from a set of natural language dictionary databases.
 
-%package        -n dictzip
+%description -n dict -l pl
+Klient dla Dictionary Server Protocol(DICT), bazuj±cego na TCP
+protoko³u zapytañ i odpowiedzi umo¿liwiaj±cego klientom na dostêp do
+definicji s³ownikowych z zestawu baz danych.
+
+%package -n dictzip
 Summary:       Compress (or expand) files, allowing random access
-Group:         Utilities/Archiving
-Group(pl):     Narzêdzia/Archiwizacja
+Summary(pl):   Kompresja (i dekompresja) plików pozwalaj±ca na swobodny dostêp
+Group:         Applications/Archiving
 
 %description -n dictzip
 dictzip compresses files using the gzip(1) algorithm (LZ77) in a
@@ -40,81 +61,95 @@ of RFC 1952) allows extra data to be stored in the header of a
 compressed file. Dictd, the DICT protocol dictionary server will make
 use of this data to perform pseudo-random access on the file.
 
+%description -n dictzip -l pl
+dictzip kompresuje pliki korzystaj±c z zawartego w gzip(1) algorytmu
+(LZ77) który jest ca³kowicie kompatybilny z formatem plików gzip.
+Rozszerzenie do formatu plików gzip (pole dodatkowe, opisane w 2.3.1.1
+RFC 1952) pozwalaj±cego na dodatkowe dane zapisane w nag³ówku
+skompresowanego pliku. Dictd, serwer protoko³u DICT wykorzystuje te
+dane do pseudo-swobodnego dostêpu do pliku.
+
 %prep
-%setup -q -n %{name}-%{version}
+%setup -q
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
 
 %build
-# --without-local-zlib option gives no effect. Usage of zlib from dictd tarball 
-# is hardcoded in configure. 
-# 
-# TODO: 
-# - patch needed instead of use -DUID_NOBODY=`id -u nobody`
-#
-%configure --with-cflags="-DUID_NOBODY=`id -u nobody` $RPM_OPT_FLAGS"
+cp -f /usr/share/automake/config.* .
+%{__aclocal}
+%{__autoconf}
+cd libmaa
+cp -f /usr/share/automake/config.* .
+%{__aclocal}
+%{__autoconf}
+cd ..
+CFLAGS="%{rpmcflags} -DUID_NOBODY=99 -DGID_NOBODY=99"
+%configure
+
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig},%{_bindir},%{_sbindir}} \
-          $RPM_BUILD_ROOT{%{_datadir}/dictd,%{_mandir}/man{1,8}}
+install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig,%{name}},%{_bindir},%{_sbindir}} \
+               $RPM_BUILD_ROOT{%{_datadir}/%{name},%{_mandir}/man{1,8}}
 
-for f in dict dictzip; do
-       install -s $f $RPM_BUILD_ROOT/%{_bindir}
-        gzip -9nf $f.1
-       install $f.1.gz $RPM_BUILD_ROOT/%{_mandir}/man1
-done 
+install dict dictzip $RPM_BUILD_ROOT%{_bindir}
+install {dict,dictzip}.1 $RPM_BUILD_ROOT%{_mandir}/man1
 
-install -s dictd $RPM_BUILD_ROOT/%{_sbindir}
-gzip -9nf dictd.8
-install dictd.8.gz $RPM_BUILD_ROOT/%{_mandir}/man8
+install %{name} $RPM_BUILD_ROOT%{_sbindir}
+install %{name}.8 $RPM_BUILD_ROOT%{_mandir}/man8
 
 echo "server localhost" > dict.conf
-echo -e "access {\n\tallow localhost\n\tdeny *\n}\n" > dictd.conf 
+echo -e "access {\n\tallow localhost\n\tdeny *\n}\n" > %{name}-main.conf
 
-install dict.conf dictd.conf $RPM_BUILD_ROOT%{_sysconfdir}/
-touch %{buildroot}%{_sysconfdir}/%{name}.conf
-install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/%{name}
-install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/%{name}
+install dict.conf $RPM_BUILD_ROOT%{_sysconfdir}
+install dictd-main.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
+touch $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf
+install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
+install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
 
 mv -f doc/security.doc security.txt
-gzip -9nf {ANNOUNCE,ChangeLog,README,TODO,%{name}.conf,example*.conf,example.site,security.txt}
-gzip -9nf example.dictrc
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %post
 /sbin/chkconfig --add %{name}
-
-if [ -f /var/lock/subsystem/%{name} ]; then
-        /etc/rc.d/init.d/%{name} restart >&2
+if [ -f /var/lock/subsys/%{name} ]; then
+       /etc/rc.d/init.d/%{name} restart >&2
 else
-        echo "Run \"/etc/rc.d/init.d/%{name} start\" to start %{name} daemon."
+       echo "Run \"/etc/rc.d/init.d/%{name} start\" to start %{name} daemon."
 fi
-    
+
 %preun
-if [ $1 = 0 ]; then
-        /sbin/chkconfig --del %{name}
-        /etc/rc.d/init.d/%{name} stop >&2 || true
+if [ "$1" = "0" ]; then
+       if [ -f /var/lock/subsys/%{name} ]; then
+               /etc/rc.d/init.d/%{name} stop >&2
+       fi
+       /sbin/chkconfig --del %{name}
 fi
 
 %files
 %defattr(644,root,root,755)
-%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}.conf
-%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/sysconfig/%{name}
+%doc ANNOUNCE ChangeLog README* TODO dictd.conf example* security.txt
+%ghost %{_sysconfdir}/%{name}.conf
+%dir %{_sysconfdir}/%{name}
+%config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/%{name}/%{name}-main.conf
+%config(noreplace) %verify(not md5 size mtime) /etc/sysconfig/%{name}
+%attr(754,root,root) /etc/rc.d/init.d/%{name}
 %attr(755,root,root) %{_sbindir}/%{name}
-%attr(755,root,root) /etc/rc.d/init.d/%{name}
-%dir %{_datadir}/dictd
+%dir %{_datadir}/%{name}
 %{_mandir}/man8/%{name}*
-%doc {ANNOUNCE,ChangeLog,README,TODO,%{name}.conf,example*.conf,example.site,security.txt}.gz
 
 %files -n dict
 %defattr(644,root,root,755)
-%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/dict.conf
+%config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/dict.conf
 %attr(755,root,root) %{_bindir}/dict
-%{_mandir}/man1/dict.1.gz
+%{_mandir}/man1/dict.1*
 
 %files -n dictzip
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/dictzip
-%{_mandir}/man1/dictzip.1.gz
+%{_mandir}/man1/dictzip.1*
This page took 0.086564 seconds and 4 git commands to generate.