File dictd.spec of Package dictd

#
# spec file for package dictd (Version 1.10.11)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           dictd
BuildRequires:  bison flex pam-devel zlib-devel
Url:            http://www.dict.org
License:        GPL v2 or later
Group:          Productivity/Office/Dictionary
AutoReqProv:    on
Summary:        Electronic Online Dictionaries
Version:        1.10.11
Release:        37
Source0:        %{name}-%{version}.tar.bz2
Source1:        dictd.init
Source2:        colorit.conf
Patch0:         %{name}-%{version}.patch
PreReq:         %insserv_prereq %fillup_prereq
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
This package contains two programs. With dict, you have access to
powerful electronic dictionaries on the Internet. With dictd, you can
set up your own dictionary. To look up, for example, the word 'grunt',
just type "dict grunt" at a command line. See the man pages of dict and
dictd for details.



Authors:
--------
    Rik Faith <faith@cs.unc.edu>

%prep
%setup -q
%patch0

%build
%{suse_update_config -f libmaa}
autoreconf --force
%configure \
  --enable-dictorg
make %{?jobs:-j%jobs}

%install
%makeinstall
install -D -m 0755 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/init.d/dictd
install -D -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/colorit.conf
ln -sf /etc/init.d/dictd $RPM_BUILD_ROOT%{_sbindir}/rcdictd

%clean
rm -rf $RPM_BUILD_ROOT

%post
%fillup_and_insserv dictd

%preun
%stop_on_removal dictd

%postun
%restart_on_update dictd
%insserv_cleanup

%files
%defattr(-,root,root)
%doc ANNOUNCE COPYING ChangeLog README TODO example*
%doc doc/dicf.ms doc/rfc.ms doc/rfc2229.txt doc/security.doc
%{_bindir}/*
%{_sbindir}/*
%{_mandir}/man1/*
%{_mandir}/man8/*
%config(noreplace) %{_sysconfdir}/colorit.conf
%config %{_sysconfdir}/init.d/dictd
%{_includedir}/*

%changelog
* Tue Nov 04 2008 prusnak@suse.cz
- add missing colorit.conf [bnc#441256]
* Thu Aug 14 2008 prusnak@suse.cz
- small cleanup of spec file
- fixed preun/postun scripts
* Mon Apr 07 2008 zpetrova@suse.cz
- update to version 1.10.11
  - fixed many compiler warnings/failures.
  - dictd: while processing MATCH command unicity of only first
  column of .index was checked, but not fourth column-> fixed.
        - timestamp log marker (log_option "timestamp") is changed
  from :T: to :t:
  - dictfmt: maximum length of headwords was limited to hardcoded
  constant. Now arrays are reallocated.
  - dict: new -F|--flush option for flushing stdout after each
  definition/match
  - colorit: bashism fixed: 'echo -en' -> more portable 'printf'.
* Sun Feb 17 2008 zpetrova@suse.cz
- update to version 1.10.10:
  - dictd: added support for utf-8 symbols other than BMP
  - dict, dictl, colorit do not support paging to a special program,
  i.e.  --pager|-P option. As of this version everything is output
  to stdout only. '-P -' option is allowed.
- fixed compiler warning (bug #361613)
* Thu Jul 12 2007 zpetrova@suse.cz
- update to version 1.10.9:
- added new keywords limit_{time,matches,definitions,queries} to
  dictd to prevent DOS attacks.
- support for the case-sensitive search.
- Two new search strategies, 'first' and 'last'.
- dict -f now enables formatted output for further processing
  by other utilities.
- clean up configure.in and Makefile.in
* Thu Mar 29 2007 dmueller@suse.de
- update BuildRequires
* Fri Jul 07 2006 zpetrova@suse.cz
- update to version 1.10.6
* Wed Jun 28 2006 zpetrova@suse.cz
- update to version 1.10.5
- added configure --enable_dictorg (#169995)
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Tue Jan 17 2006 zpetrova@suse.cz
- fixed build.
* Mon Jan 16 2006 zpetrova@suse.cz
- update to version 1.10.4
* Thu Apr 21 2005 zpetrova@suse.cz
- dictd-gcc4.patch: make dictd compilable with gcc-4.0
* Mon Apr 26 2004 ro@suse.de
- added missing return value (unreached code)
* Sun Jan 11 2004 adrian@suse.de
- add %%defattr
* Thu May 22 2003 coolo@suse.de
- use BuildRoot
* Wed Nov 13 2002 ro@suse.de
- fix for current bison (end all rules with ";")
* Tue Sep 17 2002 ro@suse.de
- removed bogus self-provides
* Mon Aug 19 2002 mmj@suse.de
- Correct PreReq
* Thu Apr 25 2002 uwedr@suse.de
- Removed dictd.conf from specfile. It was not used and examples are
  in /usr/share/doc/packages/dictd anyway.
* Tue Apr 23 2002 schwab@suse.de
- Fix for 64 bit platforms.
- Use RPM_OPT_FLAGS.
* Mon Jan 14 2002 ro@suse.de
- removed START_DICTD
* Wed Dec 12 2001 uwedr@suse.de
- Added some hints in dictd.conf how to install local dictionaris
- Logging to /var/log/dictd  (see startup in /etc/init.d/dictd)
* Wed Jun 06 2001 ro@suse.de
- mark used files as Source
* Wed May 30 2001 uwedr@suse.de
- improved spec file (#7139):
  no more --with-qt and some paths corrected
- new rc.config variable START_DICTD and init script added, so the
  server dictd can be started now (if /etc/dictd.conf is configured
  properly and at least one dictionary is installed)
* Sat Dec 09 2000 nashif@suse.de
- sorted
* Tue Feb 15 2000 ro@suse.de
- man to /usr/share using macro
* Tue Feb 15 2000 aj@suse.de
- Removed prototypes for SunOS/Solaris.
* Fri Sep 17 1999 kettner@suse.de
- Reinserted old # Commandline: line.
* Mon Sep 13 1999 bs@suse.de
- ran old prepare_spec on spec file to switch to new prepare_spec.
* Wed Apr 28 1999 ro@suse.de
- fixed: dict.c: stdout is not constant
* Fri Apr 09 1999 kettner@suse.de
- Created spec file from dictd-1.4.9.tar.gz using autospec script