Sophie

Sophie

distrib > Mandriva > 10.2 > x86_64 > by-pkgid > 52b9e2d293c845cb3410959ed1f0eb05 > files > 5

dictd-1.9.7-4mdk.src.rpm

%define	version	1.9.7
%define	release	4mdk

# NEC Socks V5 support
%define enable_socks 0
%{?_with_plf: %global enable_socks 1}

Summary:	Client/server software implementing the Dictionary Server Protocol
Name:		dictd
Version:	%{version}
Release:	%{release}
License:	GPL
Group:		Text tools
URL:		http://www.dict.org/
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-buildroot

Source0:	ftp://ftp.dict.org/pub/dict/%{name}-%{version}.tar.bz2
Source1:	%{name}.init.bz2
Source2:	%{name}.sysconfig.bz2
# (Abel) Add missing include when compiling sample plugins
Patch0:		%{name}-1.9.7-missing-header.patch.bz2
Patch1:		%{name}-1.9.7-gcc34.patch.bz2

Requires:	%{name}-server
Requires:	%{name}-client
Requires:	%{name}-utils

BuildRequires:	bison
BuildRequires:	flex
BuildRequires:	groff-for-man
BuildRequires:	libtool-devel
BuildRequires:	zlib-devel
%if %enable_socks
BuildRequires:	socks5-devel
%endif

%description 
The DICT Protocol, described in RFC 2229 is a TCP transaction based
query/response protocol that allows a client to access dictionary
definitions from a set of natural language dictionary databases.

This package contains documentation about DICT.

Build Options:
--with plf		compile with Socks V5 support

%package	utils
Summary:	Dictionary management/maintenance utilities
Group:		Text tools

%description	utils
The DICT Protocol, described in RFC 2229 is a TCP transaction based
query/response protocol that allows a client to access dictionary
definitions from a set of natural language dictionary databases.

This package contains various utilities handling file format used by
dictd, such as dict file (de)compression.

%package	client
Summary:	Command line software accessing Dictionary Server Protocol
Group:		Text tools

%description	client
The DICT Protocol, described in RFC 2229 is a TCP transaction based
query/response protocol that allows a client to access dictionary
definitions from a set of natural language dictionary databases.

This packages contains dict(1) which can access DICT servers from the
command line.

%package	server
Summary:	Server software implementing the Dictionary Server Protocol
Group:		System/Servers
PreReq:		rpm-helper
Requires:	dictd-dictionaries, dictd-dictionary

%description	server
The DICT Protocol, described in RFC 2229 is a TCP transaction based
query/response protocol that allows a client to access dictionary
definitions from a set of natural language dictionary databases.

This packages contains dictd(8) which is a server supporting the DICT
protocol.

%package	static-devel
Summary:	Development related file for DICT plugins
Group:		Development/C

%description	static-devel
This package contains various development related files from dict.
You need to install this package if you want to develop or compile
anything that has dict plugin support. 

%prep
%setup -q 
%patch0 -p1 -b .include
%patch1 -p1 -b .gcc34

perl -pi -e 's!/usr/lib/dict!%{_datadir}/dict!g' dictd.conf example.conf

%build
# Plugins are install in $libexecdir
%define _libexecdir %{_libdir}/%{name}

%configure2_5x \
%if %enable_socks
	--with-nec-socks \
%endif
	--with-cflags="$RPM_OPT_FLAGS" \
	--datadir=%{_datadir}/dict

# Do NOT use %make here!  Compiliation *WILL* fail!
make

%install
rm -rf %{buildroot}
%makeinstall_std install.samples

# dict client config
mkdir -p %{buildroot}%{_sysconfdir}
cat > %{buildroot}%{_sysconfdir}/dict.conf << _EOF_
# pager less
# server test.dict.org
# server dict.dom.ain { port 2628 user joe mysecretpasswd }
server localhost
_EOF_
chmod 644 %{buildroot}%{_sysconfdir}/dict.conf

# server initscript
mkdir -p %{buildroot}%{_initrddir}
bzcat %{SOURCE1} > %{buildroot}%{_initrddir}/%{name}-server
chmod 700 %{buildroot}%{_initrddir}/%{name}-server

mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
bzcat %{SOURCE2} > %{buildroot}%{_sysconfdir}/sysconfig/%{name}
chmod 644 %{buildroot}%{_sysconfdir}/sysconfig/%{name}

# owns /etc/dictd.conf
echo > %{buildroot}%{_sysconfdir}/dictd.conf

%clean
rm -rf %{buildroot}

%post server
%_post_service %{name}-server

%preun server
%_preun_service %{name}-server

%files

%files utils
%defattr(-,root,root)
%doc ANNOUNCE COPYING INSTALL README TODO
%{_mandir}/man1/dictfmt*
%{_mandir}/man1/dictunformat.*
%{_mandir}/man1/dictzip.*
%{_bindir}/dictfmt*
%{_bindir}/dictunformat
%{_bindir}/dictzip

%files server
%defattr(-,root,root)
%doc dictd.conf example.conf example?.conf example.site example_*.conf
%doc doc/rfc2229.txt doc/security.doc
%doc ANNOUNCE COPYING INSTALL README TODO
%config(noreplace) %{_sysconfdir}/dictd.conf
%config(noreplace) %{_initrddir}/%{name}-server
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
%{_sbindir}/*
%{_libdir}/%{name}
%{_datadir}/dict/*
%{_mandir}/man8/*

%files client
%defattr(-,root,root)
%doc example.dictrc
%config(noreplace) %{_sysconfdir}/dict.conf
%{_bindir}/dict
%{_mandir}/man1/dict.*

%files static-devel
%defattr(-,root,root)
%doc ChangeLog
%{_bindir}/dictdplugin-config
%{_includedir}/dictdplugin.h
%{_libdir}/libdictdplugin.a

%changelog
* Tue Jun 22 2004 Abel Cheung <deaddog@deaddog.org> 1.9.7-4mdk
- Fix patch1 (thx gb, I sucks)

* Sat Jun 19 2004 Abel Cheung <deaddog@deaddog.org> 1.9.7-3mdk
- Rebuild with new gcc
- Patch1: Fix build with gcc 3.4

* Tue Jun 01 2004 Abel Cheung <deaddog@deaddog.org> 1.9.7-2mdk
- Spec file rewrite
- Main package becomes a virtual package requiring all subpackages
- Patch0: Add missing include if compiling sample plugins
- Don't include /var/lock/subsys file into package
- Remove useless menu entry and icons
- Neither client nor server need main package
- Split devel package
- Can optionally build with socks support (untested)
- Server owns /etc/dictd.conf

* Mon Feb 23 2004 Lenny Cartier <lenny@mandrakesoft.com> 1.9.7-1mdk
- 1.9.7

* Sat Apr 26 2003 Alexander Skwar <ASkwar@DigitalProjects.com> 1.9.1-2mdk
- Add explicit BuildRequires: libtool-devel, to make Stefans 
  build robot be happy.

* Sat Dec 28 2002 Alexander Skwar <ASkwar@DigitalProjects.com> 1.9.1-1mdk
- 1.9.1

* Fri Feb  8 2002 Alexander Skwar <ASkwar@DigitalProjects.com> 1.5.5-2mdk
- Make the server require dictd-dictionary, which is provided
  by all the dict-dictionaries packages

* Fri Jan 25 2002 Alexander Skwar <ASkwar@DigitalProjects.com> 1.5.5-1mdk
- First release for Mandrake, built upon the RedHat SPEC file

* Fri Jun 29 2001 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
- splitted (X)Emacs modules into own dictionary-el RPM

* Tue Jun 26 2001 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
- updated .el-modules to 1.3.2

* Wed Jun 13 2001 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
- added (X)Emacs-modules

* Wed May 30 2001 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
- Fixed init-script
- Moved dictzip into main-package
- Added /etc/sysconfig/dictd-support

* Wed Sep 13 2000 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
- Made the paths FHS compliant
- Enabled build as non-root
- Splitted into seperate packages

* Sun Jan 16 2000 Chris Ausbrooks <weed@bucket.pp.ualr.edu>
- fixed clean (damn I'm an idiot sometimes)

* Sat Jan 15 2000 Chris Ausbrooks <weed@bucket.pp.ualr.edu>
- updated to 1.5.0
- made relocatable
- cleaned up specfile
- added sysv init file
- modified config file
- moved data dir
- added post and preun
- note:  package would not build with 2.3 headers in /usr/src/linux.
-        worked fine with 2.2.13

* Tue Jul 14 1998 Anthony Y.P. Wong <ypwong@poboxes.com>
- original rpm