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
|
|
|
#
|
2024-03-07 19:19:08 +01:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2018-10-16 07:12:41 +02:00
|
|
|
#
|
|
|
|
# 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
|
2024-11-02 22:40:44 +01:00
|
|
|
Version: 1.13.2
|
2018-10-16 07:12:41 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: DICT protocol (RFC 2229) server and command-line client
|
2024-03-07 19:19:08 +01:00
|
|
|
License: BSD-3-Clause AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND MIT AND SUSE-Public-Domain
|
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
|
2020-04-01 14:34:51 +02:00
|
|
|
Source0: https://github.com/cheusov/dictd/archive/%{version}.tar.gz#/dictd-%{version}.tar.gz
|
2018-10-16 07:12:41 +02:00
|
|
|
Source1: colorit.conf
|
|
|
|
Source2: dictd.service
|
2022-02-21 00:13:23 +01:00
|
|
|
Source99: dictd-rpmlintrc
|
2018-10-16 07:12:41 +02:00
|
|
|
Patch0: dictd-1.12.1-unused-return.patch
|
2024-11-02 22:40:44 +01:00
|
|
|
# PATCH-FIX-UPSTREAM index-buf-ovrflw.patch mcepl@suse.com
|
|
|
|
# A buffer overflow
|
|
|
|
Patch1: index-buf-ovrflw.patch
|
|
|
|
# BuildRequires: mk-configure
|
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
|
2024-11-02 22:40:44 +01:00
|
|
|
BuildRequires: judy-devel
|
2018-10-16 07:12:41 +02:00
|
|
|
BuildRequires: libdbi-devel
|
|
|
|
BuildRequires: libmaa-devel
|
2012-10-14 05:20:27 +02:00
|
|
|
BuildRequires: libtool
|
2024-03-07 19:19:08 +01:00
|
|
|
BuildRequires: pkgconfig
|
2018-10-16 07:12:41 +02:00
|
|
|
BuildRequires: zlib-devel
|
2020-02-19 12:30:19 +01:00
|
|
|
BuildRequires: pkgconfig(systemd)
|
2018-10-16 07:12:41 +02:00
|
|
|
# libtool-ltdl-devel byacc
|
2012-10-14 05:20:27 +02:00
|
|
|
%if 0%{?suse_version}
|
2019-04-24 12:17:05 +02:00
|
|
|
BuildRequires: systemd-rpm-macros
|
2019-06-06 00:42:49 +02:00
|
|
|
%{?systemd_ordering}
|
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.
|
|
|
|
|
2019-01-26 19:37:08 +01:00
|
|
|
%package devel
|
|
|
|
Summary: Development files for dictd
|
|
|
|
Group: Development/Languages/C and C++
|
|
|
|
Requires: %{name} = %{version}
|
2024-03-07 19:19:08 +01:00
|
|
|
BuildArch: noarch
|
2019-01-26 19:37:08 +01:00
|
|
|
|
|
|
|
%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.
|
|
|
|
|
2024-11-02 22:40:44 +01:00
|
|
|
%prep
|
|
|
|
%autosetup -p1
|
|
|
|
|
|
|
|
autoreconf --force --install --verbose
|
|
|
|
|
2011-05-30 19:40:07 +02:00
|
|
|
%build
|
2019-02-05 08:26:08 +01:00
|
|
|
export LDFLAGS="%{?__global_ldflags}" CPPFLAGS="%{optflags} -fPIC"
|
2024-11-02 22:40:44 +01:00
|
|
|
# export USE_PLUGIN=1
|
|
|
|
# export PREFIX="%%{_prefix}"
|
|
|
|
# export MANDIR="%%{_mandir}"
|
|
|
|
# export SYSCONFDIR="%%{_sysconfdir}"
|
|
|
|
# export CC="%%{__cc}"
|
|
|
|
# export DESTDIR="%%{buildroot}"
|
|
|
|
# export COPTS="%%{optflags} -fPIC"
|
|
|
|
# mkc_compiler_settings
|
|
|
|
# mkcmake all
|
|
|
|
export LEXLIB="-fl"
|
2019-01-26 19:37:08 +01:00
|
|
|
%configure --enable-dictorg --with-plugin-dbi
|
|
|
|
# --disable-plugin
|
2024-03-07 19:19:08 +01:00
|
|
|
%make_build
|
2011-05-30 19:40:07 +02:00
|
|
|
|
|
|
|
%install
|
|
|
|
%make_install
|
2024-11-02 22:40:44 +01:00
|
|
|
# mkcmake 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
|
|
|
|
|
2019-04-24 12:17:05 +02:00
|
|
|
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rcdictd
|
2018-10-16 07:12:41 +02:00
|
|
|
|
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}/
|
2024-03-07 19:19:08 +01:00
|
|
|
install -p -v -m 0755 %{buildroot}%{_libexecdir}/dictdplugin* \
|
|
|
|
%{buildroot}%{_libdir}/
|
|
|
|
rm -rv %{buildroot}%{_libexecdir}
|
2019-01-26 19:45:33 +01:00
|
|
|
fi
|
2019-01-26 19:37:08 +01:00
|
|
|
rm -fv %{buildroot}%{_libdir}/*.{la,a}
|
|
|
|
|
2024-11-02 22:40:44 +01:00
|
|
|
%check
|
|
|
|
%make_build test
|
|
|
|
|
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
|
|
|
|
|
|
|
%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
|
2019-04-24 12:17:05 +02:00
|
|
|
%{_bindir}/dict*
|
|
|
|
%{_bindir}/colorit
|
|
|
|
%{_sbindir}/*dictd
|
|
|
|
%{_libdir}/dictdplugin_dbi.so*
|
|
|
|
%{_mandir}/man1/colorit*
|
|
|
|
%{_mandir}/man1/dict*
|
|
|
|
%{_mandir}/man8/dict*
|
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
|