dictd/dictd.spec
Lars Vogdt 96ca9aad08 - update dictd to 1.12.0:
+ New script dict_lookup for translating words and phrases
  + dictfmt: Internal buffer size was increased from 10240 to 
    102400 bytes
  + dictfmt: superfluous spaces are removed not only from the beginng
    and the end of a headword but also inside a multiword headwords.
  + dictfmt spawns sort command to sort the index. When there are
    several entries for the same headword, they get sorted BY OFFSET 
    AND SIZE (in addition to headwords). As a result, the order of 
    identical headwords is messed up.  To fix these problem -k1,3 
    option is replaced with -k1,1.
  + FIX: When search is handled by dict_search_bmh() function, the 
    first character from the first entry in the index file is 
    missing. Usually this is some of 00-database-* entries.
  + Other minor fixes and cleanups
- update libmaa to 1.3.1:
  + Build failure with gcc-4.6 was fixed
  + Only maa's symbols are exported from libmaa shared library
    ^^ INCLUDES ABI INCOMPATIBILITIES
  + For better conformance with POSIX/SUS xmalloc, xrealloc and 
    xcalloc functions take 'size_t' args, not 'unsigned int'.
- small init script beaufify
- split out devel package

OBS-URL: https://build.opensuse.org/package/show/Education/dictd?expand=0&rev=2
2012-02-15 21:44:00 +00:00

150 lines
3.7 KiB
RPMSpec

#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define maa_ver 1.3.1
Name: dictd
Version: 1.12.0
Release: 1
License: GPLv2+
Summary: Electronic Online Dictionaries
Url: http://www.dict.org
Group: Productivity/Office/Dictionary
Source0: %{name}-%{version}.tar.bz2
Source1: libmaa-%{maa_ver}.tar.bz2
Source2: dictd.init
Source3: colorit.conf
Patch0: %{name}-%{version}.patch
Patch1: libmaa-%{maa_ver}.patch
BuildRequires: bison
BuildRequires: flex
BuildRequires: pam-devel
BuildRequires: zlib-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires(pre): %insserv_prereq %fillup_prereq
%define separate_maa 0
%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.
%package devel
Summary: Development files for dictd
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
%description devel
Development files for dictd (header files).
%if %{separate_maa}
%package -n libmaa1
Version: %{maa_ver}
Summary: Library providing many low-level data structures
Group: System/Libraries/C and C++
%description -n libmaa1
The libmaa library provides many low-level data structures which are
helpful for writing compilers, including hash tables, sets, lists,
debugging support, and memory management. Although libmaa was designed
and implemented as a foundation for the kheperalong, the data structures
are generally applicable to a wide range of programming problems.
The memory management routines are especially helpful for improving the
performance of memory-intensive applications.
%package -n libmaa-devel
Version: %{maa_ver}
Summary: Development files for libmaa
Group: Development/Libraries/C and C++
Requires: libmaa1 = %{maa_ver}
%description -n libmaa-devel
Development files for libmaa
%endif
%prep
%setup -q -a 1
%patch0 -p0
cd libmaa-%{maa_ver}
%patch1 -p0
%build
cd libmaa-%{maa_ver}
%configure \
--enable-dictorg
make %{?_smp_mflags}
cd ..
export CFLAGS="%{optflags} -Ilibmaa-%{maa_ver}"
export LDFLAGS="$LDFLAGS -L./libmaa-%{maa_ver}/.libs"
%configure
make %{?_smp_mflags}
%install
%make_install
install -D -m 0755 %{SOURCE2} %{buildroot}%{_sysconfdir}/init.d/dictd
install -D -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/colorit.conf
ln -sf /etc/init.d/dictd %{buildroot}%{_sbindir}/rcdictd
%if %{separate_maa}
cd libmaa-%{maa_ver}
%make_install
rm -f %{buildroot}%{_libdir}/*.la
rm -f %{buildroot}%{_libdir}/*.a
%endif
%clean
rm -rf %{buildroot}
%post
%fillup_and_insserv dictd
touch %{_localstatedir}/log/dictd
chown nobody:nogroup %{_localstatedir}/log/dictd
chmod 644 %{_localstatedir}/log/dictd
%preun
%stop_on_removal dictd
%postun
%restart_on_update dictd
%insserv_cleanup
rm -rf %{_localstatedir}/log/dictd
%if %{separate_maa}
%post -n libmaa1 -p /sbin/ldconfig
%postun -n libmaa1 -p /sbin/ldconfig
%endif
%files
%defattr(-,root,root)
%doc ANNOUNCE COPYING ChangeLog NEWS 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
%files devel
%defattr(-,root,root)
%{_includedir}/dict*
%if %{separate_maa}
%files -n libmaa1
%defattr(-,root,root)
%{_libdir}/*.so.*
%files -n libmaa-devel
%defattr(-,root,root)
%{_includedir}/maa*
%{_libdir}/*.so
%endif
%changelog