2ad83698f4
please review, contrib cleanup OBS-URL: https://build.opensuse.org/request/show/72124 OBS-URL: https://build.opensuse.org/package/show/Education/dictd?expand=0&rev=1
141 lines
3.4 KiB
RPMSpec
141 lines
3.4 KiB
RPMSpec
#
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
%define maa_ver 1.1.1
|
|
|
|
Name: dictd
|
|
Version: 1.11.1
|
|
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.
|
|
|
|
%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
|
|
cd libmaa-%{maa_ver}
|
|
%patch1
|
|
|
|
%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
|
|
%{_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
|