2011-05-30 19:40:07 +02:00
|
|
|
#
|
2018-10-16 07:12:41 +02:00
|
|
|
# spec file for package dictd
|
2011-05-30 19:40:07 +02:00
|
|
|
#
|
2018-10-16 07:12:41 +02:00
|
|
|
# Copyright (c) 2018 SUSE LINUX 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 https://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2011-05-30 19:40:07 +02:00
|
|
|
|
|
|
|
Name: dictd
|
2019-01-26 19:37:08 +01:00
|
|
|
Version: 1.12.1.git.1520674574.9a2f53e
|
2018-10-16 07:12:41 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: DICT protocol (RFC 2229) server and command-line client
|
|
|
|
License: GPL-1.0-or-later AND Zlib AND MIT
|
2011-05-30 19:40:07 +02:00
|
|
|
Group: Productivity/Office/Dictionary
|
2019-01-26 19:37:08 +01:00
|
|
|
URL: https://github.com/cheusov/dictd
|
|
|
|
Source0: %{name}-%{version}.tar.xz
|
2018-10-16 07:12:41 +02:00
|
|
|
Source1: colorit.conf
|
|
|
|
Source2: dictd.service
|
|
|
|
Patch0: dictd-1.12.1-unused-return.patch
|
2019-01-26 19:37:08 +01:00
|
|
|
BuildRequires: autoconf
|
2011-05-30 19:40:07 +02:00
|
|
|
BuildRequires: bison
|
|
|
|
BuildRequires: flex
|
2018-10-16 07:12:41 +02:00
|
|
|
BuildRequires: gawk
|
2012-10-14 05:20:27 +02:00
|
|
|
BuildRequires: gcc
|
2018-10-16 07:12:41 +02:00
|
|
|
BuildRequires: libdbi-devel
|
|
|
|
BuildRequires: libmaa-devel
|
2012-10-14 05:20:27 +02:00
|
|
|
BuildRequires: libtool
|
2018-10-16 07:12:41 +02:00
|
|
|
BuildRequires: systemd
|
|
|
|
BuildRequires: zlib-devel
|
|
|
|
# libtool-ltdl-devel byacc
|
2012-10-14 05:20:27 +02:00
|
|
|
%if 0%{?suse_version}
|
2018-10-16 07:12:41 +02:00
|
|
|
BuildRequires: systemd-rpm-macros
|
|
|
|
%{?systemd_requires}
|
2012-10-14 05:20:27 +02:00
|
|
|
%endif
|
2011-05-30 19:40:07 +02:00
|
|
|
|
|
|
|
%description
|
2019-02-05 08:26:08 +01:00
|
|
|
This package contains two programs. dict gives access to
|
|
|
|
electronic dictionaries on the Internet. With dictd, one can
|
|
|
|
set up a custom dictionary. To look up, for example, the word "grunt",
|
|
|
|
execute `dict grunt` at a command line. See the man pages of dict and
|
2011-05-30 19:40:07 +02:00
|
|
|
dictd for details.
|
|
|
|
|
|
|
|
%prep
|
2018-10-16 07:12:41 +02:00
|
|
|
%setup
|
2019-01-26 01:14:17 +01:00
|
|
|
%autopatch -p1
|
2019-01-26 21:11:32 +01:00
|
|
|
|
2019-01-26 19:37:08 +01:00
|
|
|
autoreconf -fv
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: Development files for dictd
|
|
|
|
Group: Development/Languages/C and C++
|
|
|
|
Requires: %{name} = %{version}
|
|
|
|
|
|
|
|
%description devel
|
2019-02-05 08:26:08 +01:00
|
|
|
This package contains two programs. dict gives access to
|
|
|
|
electronic dictionaries on the Internet. With dictd, one can
|
|
|
|
set up a custom dictionary. To look up, for example, the word "grunt",
|
|
|
|
execute `dict grunt` at a command line. See the man pages of dict and
|
2019-01-26 19:37:08 +01:00
|
|
|
dictd for details.
|
|
|
|
|
|
|
|
This package contains development files for the dictd package.
|
|
|
|
|
2011-05-30 19:40:07 +02:00
|
|
|
%build
|
2019-02-05 08:26:08 +01:00
|
|
|
export LDFLAGS="%{?__global_ldflags}" CPPFLAGS="%{optflags} -fPIC"
|
2019-01-26 19:37:08 +01:00
|
|
|
%configure --enable-dictorg --with-plugin-dbi
|
|
|
|
# --disable-plugin
|
2011-05-30 19:40:07 +02:00
|
|
|
make %{?_smp_mflags}
|
|
|
|
|
2019-01-26 19:37:08 +01:00
|
|
|
|
2011-05-30 19:40:07 +02:00
|
|
|
%install
|
|
|
|
%make_install
|
2018-10-16 07:12:41 +02:00
|
|
|
install -D -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/colorit.conf
|
2019-02-05 08:26:08 +01:00
|
|
|
cat <<EOF >%{buildroot}/%{_sysconfdir}/dictd.conf
|
2018-10-16 07:12:41 +02:00
|
|
|
global {
|
|
|
|
#syslog
|
|
|
|
#syslog_facility daemon
|
|
|
|
}
|
|
|
|
|
|
|
|
# Add database definitions here...
|
|
|
|
|
|
|
|
# We stop the search here
|
|
|
|
database_exit
|
|
|
|
|
|
|
|
# Add hidden database definitions here...
|
|
|
|
|
|
|
|
EOF
|
|
|
|
|
|
|
|
install -D -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}/dictd.service
|
|
|
|
|
|
|
|
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcdictd
|
|
|
|
|
2019-01-26 19:37:08 +01:00
|
|
|
# Makefile doesn't work correctly with libdir
|
2019-01-26 19:45:33 +01:00
|
|
|
if [ "x%{_libdir}" != "x%{_libexecdir}" ] ; then
|
|
|
|
mkdir -p %{buildroot}%{_libdir}/
|
|
|
|
mv -v %{buildroot}%{_libexecdir}/dictdplugin* %{buildroot}%{_libdir}/
|
|
|
|
fi
|
2019-01-26 19:37:08 +01:00
|
|
|
rm -fv %{buildroot}%{_libdir}/*.{la,a}
|
|
|
|
|
|
|
|
|
2018-10-16 07:12:41 +02:00
|
|
|
%pre
|
|
|
|
%service_add_pre dictd.service
|
2011-05-30 19:40:07 +02:00
|
|
|
|
|
|
|
%post
|
2018-10-16 07:12:41 +02:00
|
|
|
%service_add_post dictd.service
|
2011-05-30 19:40:07 +02:00
|
|
|
touch %{_localstatedir}/log/dictd
|
|
|
|
chmod 644 %{_localstatedir}/log/dictd
|
|
|
|
|
|
|
|
%preun
|
2018-10-16 07:12:41 +02:00
|
|
|
%service_del_preun dictd.service
|
2011-05-30 19:40:07 +02:00
|
|
|
|
|
|
|
%postun
|
2018-10-16 07:12:41 +02:00
|
|
|
%service_del_postun dictd.service
|
2011-05-30 19:40:07 +02:00
|
|
|
|
2019-01-26 19:37:08 +01:00
|
|
|
|
2011-05-30 19:40:07 +02:00
|
|
|
%files
|
2018-10-16 07:12:41 +02:00
|
|
|
%license COPYING
|
2019-01-26 19:37:08 +01:00
|
|
|
%doc ANNOUNCE NEWS README example*
|
2011-05-30 19:40:07 +02:00
|
|
|
%doc doc/dicf.ms doc/rfc.ms doc/rfc2229.txt doc/security.doc
|
|
|
|
%{_bindir}/*
|
|
|
|
%{_sbindir}/*
|
2019-01-26 19:37:08 +01:00
|
|
|
%{_libdir}/*
|
2011-05-30 19:40:07 +02:00
|
|
|
%{_mandir}/man1/*
|
|
|
|
%{_mandir}/man8/*
|
2018-10-16 07:12:41 +02:00
|
|
|
%attr(0644,root,root) %{_unitdir}/dictd.service
|
2011-05-30 19:40:07 +02:00
|
|
|
%config(noreplace) %{_sysconfdir}/colorit.conf
|
2018-10-16 07:12:41 +02:00
|
|
|
%config(noreplace) %{_sysconfdir}/dictd.conf
|
2011-05-30 19:40:07 +02:00
|
|
|
|
2019-01-26 19:37:08 +01:00
|
|
|
%files devel
|
|
|
|
%license COPYING
|
|
|
|
%doc ANNOUNCE README TODO
|
|
|
|
%{_includedir}/*
|
|
|
|
|
2018-10-16 07:12:41 +02:00
|
|
|
%changelog
|