2018-05-30 15:35:32 +02:00
|
|
|
#
|
|
|
|
# spec file for package mailutils
|
|
|
|
#
|
|
|
|
# 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 http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
%define somajor 5
|
|
|
|
|
|
|
|
Name: mailutils
|
|
|
|
Version: 3.4
|
|
|
|
Release: 0
|
|
|
|
License: LGPL-3.0-or-later and GPL-3.0-or-later
|
|
|
|
Summary: GNU Mailutils
|
|
|
|
Url: https://mailutils.org/
|
|
|
|
Group: Productivity/Networking/Email/Clients
|
|
|
|
Source: ftp://ftp.gnu.org/gnu/mailutils/mailutils-3.4.tar.xz
|
2018-05-30 15:45:59 +02:00
|
|
|
Source1: mailutils-rpmlint
|
2018-05-30 15:35:32 +02:00
|
|
|
Patch0: lisp-load-silent.patch
|
|
|
|
Patch1: mimeview_lexer_format-security.patch
|
|
|
|
BuildRequires: bison
|
|
|
|
BuildRequires: cpio
|
|
|
|
BuildRequires: cyrus-sasl-gssapi
|
|
|
|
BuildRequires: flex
|
|
|
|
%if 0
|
|
|
|
# Seems not compatible with original radius (missing debug.h)
|
|
|
|
BuildRequires: freeradius-server-devel
|
|
|
|
%endif
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
BuildRequires: libmysqld-devel
|
|
|
|
BuildRequires: m4
|
|
|
|
BuildRequires: makeinfo
|
|
|
|
BuildRequires: openldap2-devel
|
|
|
|
BuildRequires: pam-devel
|
|
|
|
BuildRequires: pkgconfig(fribidi)
|
|
|
|
BuildRequires: pkgconfig(gnutls)
|
|
|
|
BuildRequires: pkgconfig(guile-2.0)
|
|
|
|
BuildRequires: pkgconfig(libgsasl)
|
|
|
|
BuildRequires: pkgconfig(krb5-gssapi)
|
|
|
|
BuildRequires: pkgconfig(kyotocabinet)
|
|
|
|
%if 0
|
|
|
|
# Does not compile due API changes
|
|
|
|
BuildRequires: pkgconfig(python3)
|
|
|
|
%else
|
|
|
|
BuildRequires: pkgconfig(python)
|
|
|
|
%endif
|
|
|
|
BuildRequires: readline-devel
|
|
|
|
BuildRequires: tcpd-devel
|
|
|
|
BuildRequires: update-alternatives
|
|
|
|
Requires(post): update-alternatives
|
|
|
|
Requires(preun): update-alternatives
|
|
|
|
Requires(post): %install_info_prereq
|
|
|
|
Requires(preun): %install_info_prereq
|
|
|
|
Requires(post): permissions
|
|
|
|
Requires(verify): permissions
|
|
|
|
|
|
|
|
%description
|
|
|
|
Mailutils is a swiss army knife of electronic mail handling. It offers a rich set of utilities and daemons for processing e-mail.
|
|
|
|
|
|
|
|
All Mailutils programs are able to operate on mailboxes of any existing format, ranging from standard UNIX maildrops, through maildir and up to remote mailboxes, which are transparently accessed using IMAP4, POP3 and SMTP.
|
|
|
|
|
|
|
|
Regular users will find here an implementation of the traditional UNIX mail reader mail, command line utilities, such as frm, messages, readmsg, and sieve -- a flexible utility for filtering the incoming mail.
|
|
|
|
|
|
|
|
A special feature of Mailutils is an implementation of the MH Message Handling System, which combines a power of the UNIX philosophy with a flexibility of Mailutils libraries, thus allowing to easily incorporate mail from remote mailboxes.
|
|
|
|
|
|
|
|
For system administrators, Mailutils provides a set of daemons for delivering and reading electronic mail, including pop3d, imap4d and a universal mail delivery agent, called maidag.
|
|
|
|
|
|
|
|
%package mh
|
|
|
|
Summary: GNU Mailutils -- Support for MH mailbox format
|
|
|
|
|
|
|
|
%description mh
|
|
|
|
|
|
|
|
%package server
|
|
|
|
Summary: GNU Mailutils -- Server daemons
|
|
|
|
|
|
|
|
%description server
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: GNU Mailutils -- Development
|
|
|
|
Requires: libmailutils%{somajor} == %{version}
|
|
|
|
Requires: mailutils == %{version}
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
|
|
|
|
%package -n libmailutils%{somajor}
|
|
|
|
Summary: GNU Mailutils -- Shared libraries
|
|
|
|
|
|
|
|
%description -n libmailutils%{somajor}
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
%patch0
|
|
|
|
%patch1 -p1
|
|
|
|
#
|
|
|
|
# Avoid build require for emacs as emacs does
|
|
|
|
# build require one the sub packages herein!
|
|
|
|
#
|
|
|
|
mkdir bin
|
|
|
|
(cat > bin/emacs)<<-'EOF'
|
|
|
|
#!/bin/sh
|
|
|
|
case "$@" in
|
|
|
|
*byte-compile*)
|
|
|
|
for arg
|
|
|
|
do
|
|
|
|
case "$arg" in
|
|
|
|
*.elc)
|
|
|
|
> "$arg"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
;;
|
|
|
|
*load-path*)
|
|
|
|
echo %{_datadir}/emacs/site-lisp
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
esac
|
|
|
|
EOF
|
|
|
|
chmod 755 bin/emacs
|
|
|
|
#
|
|
|
|
# There is no python-config for python3
|
|
|
|
#
|
|
|
|
if type -p python3-config > /dev/null 2>&1
|
|
|
|
then
|
|
|
|
sed -ri '\@python-config@{ s@python-config@python3-config@ }' configure
|
|
|
|
fi
|
|
|
|
|
|
|
|
%build
|
|
|
|
PATH="$PWD/bin:$PATH"
|
|
|
|
CC=gcc
|
|
|
|
CXX=g++
|
|
|
|
#
|
|
|
|
# In frm/frm.h wrong definition of MB_LEN_MAX if not defined
|
|
|
|
#
|
|
|
|
CFLAGS="-Wall $RPM_OPT_FLAGS -D_GNU_SOURCE -DMB_LEN_MAX=16 -fno-strict-aliasing"
|
|
|
|
CXXFLAGS="-Wall $RPM_OPT_FLAGS -D_GNU_SOURCE -DMB_LEN_MAX=16 -fno-strict-aliasing"
|
|
|
|
export PATH CC CXX CFLAGS CXXFLAGS
|
|
|
|
%configure --enable-ipv6 \
|
|
|
|
--enable-build-servers \
|
|
|
|
--enable-build-clients \
|
|
|
|
--disable-debug \
|
|
|
|
--disable-rpath \
|
|
|
|
%if 0
|
|
|
|
--disable-silent-rules \
|
|
|
|
%endif
|
|
|
|
--disable-static \
|
|
|
|
--with-gnu-ld \
|
|
|
|
--with-gssapi \
|
|
|
|
--with-tcp-wrappers \
|
|
|
|
--with-ldap \
|
|
|
|
--with-lispdir=%{_datadir}/emacs/site-lisp \
|
|
|
|
--with-log-facility=LOG_MAIL \
|
|
|
|
--with-kyotocabinet \
|
|
|
|
CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS"
|
|
|
|
|
|
|
|
make %{?_smp_mflags}
|
|
|
|
|
|
|
|
%install
|
|
|
|
PATH="$PWD/bin:$PATH"
|
|
|
|
make install DESTDIR=%{buildroot} %{?_smp_mflags}
|
|
|
|
#
|
|
|
|
# Remove dir, .la and .elc files
|
|
|
|
#
|
|
|
|
find %{buildroot} \( -name dir -o -name '*.la' -o -name '*.elc' \) -exec rm -fv '{}' \+
|
|
|
|
|
|
|
|
#
|
|
|
|
# Rename the mail program to avoid conflicts
|
|
|
|
#
|
|
|
|
mv %{buildroot}%{_bindir}/mail %{buildroot}%{_bindir}/mu-mail
|
|
|
|
mv %{buildroot}%{_mandir}/man1/mail.1 %{buildroot}%{_mandir}/man1/mu-mail.1
|
|
|
|
|
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives/
|
|
|
|
ln -sf %{_bindir}/mu-mail %{buildroot}%{_sysconfdir}/alternatives/mail
|
2018-05-30 15:45:59 +02:00
|
|
|
ln -sf %{_mandir}/man1/mu-mail.1%{?ext_man} %{buildroot}%{_sysconfdir}/alternatives/mail.1%{?ext_man}
|
2018-05-30 15:35:32 +02:00
|
|
|
|
|
|
|
#
|
|
|
|
#
|
|
|
|
#
|
|
|
|
%if 0
|
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/permissions.d
|
|
|
|
(cat > %{buildroot}%{_sysconfdir}/permissions.d/mailutils) <<-'EOF'
|
|
|
|
%{_bindir}/dotlock root:root 02755
|
|
|
|
%{_sbindir}/maidag root:root 04755
|
|
|
|
EOF
|
|
|
|
(cat > %{buildroot}%{_sysconfdir}/permissions.d/mailutils.paranoid) <<-'EOF'
|
|
|
|
%{_bindir}/dotlock root:root 00755
|
|
|
|
%{_sbindir}/maidag root:root 00755
|
|
|
|
EOF
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%find_lang %name
|
|
|
|
|
|
|
|
%post
|
|
|
|
%install_info --info-dir=%{_infodir} %{_infodir}/mailutils.info.gz
|
|
|
|
%{_sbindir}/update-alternatives --quiet --force --install %{_bindir}/mail mail %{_bindir}/mu-mail 10 \
|
|
|
|
--slave %{_mandir}/man1/mail.1%{?ext_man} mail.1%{?ext_man} %{_mandir}/man1/mu-mail.1%{?ext_man}
|
|
|
|
%if 0
|
|
|
|
%set_permissions %{_bindir}/dotlock
|
|
|
|
%set_permissions %{_sbindir}/maidag
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%preun
|
|
|
|
%install_info_delete --info-dir=%{_infodir} %{_infodir}/mailutils.info.gz
|
|
|
|
%{_sbindir}/update-alternatives --quiet --force --remove mail %{_bindir}/mu-mail
|
|
|
|
|
|
|
|
%post -n libmailutils%{somajor} -p /sbin/ldconfig
|
|
|
|
%postun -n libmailutils%{somajor} -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%if 0
|
|
|
|
%verifyscript
|
|
|
|
%verify_permissions %{_bindir}/dotlock
|
|
|
|
%verify_permissions %{_sbindir}/maidag
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%files -f %name.lang
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%if 0
|
|
|
|
%config %{_sysconfdir}/permissions.d/mailutils*
|
|
|
|
%endif
|
|
|
|
%ghost %config %{_sysconfdir}/alternatives/mail
|
|
|
|
%ghost %config %{_sysconfdir}/alternatives/mail.1%{?ext_man}
|
|
|
|
%license COPYING COPYING.LESSER
|
|
|
|
%doc ChangeLog README NEWS AUTHORS THANKS
|
|
|
|
%doc %{_infodir}/mailutils.info*.gz
|
|
|
|
%doc %{_mandir}/man1/*.1%{?ext_man}
|
|
|
|
%attr(00755,root,root) %verify(not mode) %{_bindir}/dotlock
|
|
|
|
%{_bindir}/frm
|
|
|
|
%{_bindir}/from
|
|
|
|
%{_bindir}/guimb
|
|
|
|
%{_bindir}/mu-mail
|
|
|
|
%{_bindir}/mailutils
|
|
|
|
%{_bindir}/mailutils-config
|
|
|
|
%{_bindir}/messages
|
|
|
|
%{_bindir}/mimeview
|
|
|
|
%{_bindir}/movemail
|
|
|
|
%{_bindir}/popauth
|
|
|
|
%{_bindir}/readmsg
|
|
|
|
%{_bindir}/sieve
|
|
|
|
%dir %{_libexecdir}/mailutils/
|
|
|
|
%{_libexecdir}/mailutils/mailutils-*
|
|
|
|
%dir %{_libexecdir}/python*/site-packages/mailutils/
|
|
|
|
%{_libexecdir}/python*/site-packages/mailutils/*.p*
|
|
|
|
%dir %{_libdir}/mailutils/
|
|
|
|
%{_libdir}/mailutils/*.so
|
|
|
|
%dir %{_libdir}/python*/site-packages/mailutils/
|
|
|
|
%{_libdir}/python*/site-packages/mailutils/c_api.so
|
|
|
|
|
|
|
|
%files mh
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%dir %{_bindir}/mu-mh/
|
|
|
|
%{_bindir}/mu-mh/*
|
|
|
|
%{_datadir}/emacs/site-lisp/mailutils-mh.el
|
|
|
|
%dir %{_datadir}/mailutils/
|
|
|
|
%dir %{_datadir}/mailutils/mh/
|
|
|
|
%{_datadir}/mailutils/mh/*
|
|
|
|
|
|
|
|
%files server
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_sbindir}/comsatd
|
|
|
|
%{_sbindir}/imap4d
|
|
|
|
%attr(00755,root,root) %verify(not mode) %{_sbindir}/maidag
|
|
|
|
%{_sbindir}/pop3d
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_libdir}/*.so
|
|
|
|
%dir %{_includedir}/mailutils/
|
|
|
|
%{_includedir}/mailutils/*.h
|
|
|
|
%dir %{_includedir}/mailutils/sys/
|
|
|
|
%{_includedir}/mailutils/sys/*.h
|
|
|
|
%{_datadir}/aclocal/mailutils.m4
|
|
|
|
%dir %{_datadir}/guile/site/2.0/
|
|
|
|
%dir %{_datadir}/guile/site/2.0/mailutils/
|
|
|
|
%{_datadir}/guile/site/2.0/mailutils/*
|
|
|
|
|
|
|
|
%files -n libmailutils%{somajor}
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_libdir}/*.so.*
|
|
|
|
|
|
|
|
%changelog
|