forked from pool/dictd
3f55ce16c6
Clean up SPEC file, make the package building again. OBS-URL: https://build.opensuse.org/request/show/642025 OBS-URL: https://build.opensuse.org/package/show/Education/dictd?expand=0&rev=4
114 lines
3.1 KiB
RPMSpec
114 lines
3.1 KiB
RPMSpec
#
|
|
# spec file for package dictd
|
|
#
|
|
# 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/
|
|
#
|
|
|
|
|
|
|
|
Name: dictd
|
|
Version: 1.12.1
|
|
Release: 0
|
|
Summary: DICT protocol (RFC 2229) server and command-line client
|
|
License: GPL-1.0-or-later AND Zlib AND MIT
|
|
Group: Productivity/Office/Dictionary
|
|
URL: https://sourceforge.net/projects/dict/
|
|
Source0: http://downloads.sourceforge.net/dict/%{name}-%{version}.tar.gz
|
|
Source1: colorit.conf
|
|
Source2: dictd.service
|
|
Patch0: dictd-1.12.1-unused-return.patch
|
|
# https://bugzilla.redhat.com/show_bug.cgi?id=198359
|
|
# https://sourceforge.net/p/dict/feature-requests/4/
|
|
# Patch1: dictd-1.9.15-ipv6.patch
|
|
BuildRequires: bison
|
|
BuildRequires: flex
|
|
BuildRequires: gawk
|
|
BuildRequires: gcc
|
|
BuildRequires: libdbi-devel
|
|
BuildRequires: libmaa-devel
|
|
BuildRequires: libtool
|
|
BuildRequires: systemd
|
|
BuildRequires: zlib-devel
|
|
# libtool-ltdl-devel byacc
|
|
%if 0%{?suse_version}
|
|
BuildRequires: systemd-rpm-macros
|
|
%{?systemd_requires}
|
|
%endif
|
|
|
|
%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.
|
|
|
|
%prep
|
|
%setup
|
|
%autopatch -p1
|
|
|
|
%build
|
|
export LDFLAGS="%{?__global_ldflags}" CPPFLAGS="$RPM_OPT_FLAGS -fPIC"
|
|
%configure --enable-dictorg --disable-plugin
|
|
make %{?_smp_mflags}
|
|
|
|
%install
|
|
%make_install
|
|
install -D -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/colorit.conf
|
|
cat <<EOF > $RPM_BUILD_ROOT/%{_sysconfdir}/dictd.conf
|
|
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
|
|
|
|
%pre
|
|
%service_add_pre dictd.service
|
|
|
|
%post
|
|
%service_add_post dictd.service
|
|
touch %{_localstatedir}/log/dictd
|
|
chmod 644 %{_localstatedir}/log/dictd
|
|
|
|
%preun
|
|
%service_del_preun dictd.service
|
|
|
|
%postun
|
|
%service_del_postun dictd.service
|
|
|
|
%files
|
|
%license COPYING
|
|
%doc ANNOUNCE ChangeLog NEWS README TODO example*
|
|
%doc doc/dicf.ms doc/rfc.ms doc/rfc2229.txt doc/security.doc
|
|
%{_bindir}/*
|
|
%{_sbindir}/*
|
|
%{_mandir}/man1/*
|
|
%{_mandir}/man8/*
|
|
%attr(0644,root,root) %{_unitdir}/dictd.service
|
|
%config(noreplace) %{_sysconfdir}/colorit.conf
|
|
%config(noreplace) %{_sysconfdir}/dictd.conf
|
|
|
|
%changelog
|