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/
|
|
|
|
#
|
|
|
|
|
2018-06-07 11:51:21 +02:00
|
|
|
# See bug boo#1095783
|
|
|
|
# Currently disabled suid/sgid program dotlock and maidag
|
|
|
|
%bcond_with set_user_identity
|
|
|
|
|
2018-05-30 15:35:32 +02:00
|
|
|
%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:46:59 +02:00
|
|
|
Source1: mailutils-rpmlintrc
|
2018-05-30 15:35:32 +02:00
|
|
|
Patch0: lisp-load-silent.patch
|
|
|
|
Patch1: mimeview_lexer_format-security.patch
|
2018-06-07 11:51:21 +02:00
|
|
|
Patch2: silent-rpmlint-with_initgroups.patch
|
2018-05-30 15:35:32 +02:00
|
|
|
BuildRequires: bison
|
|
|
|
BuildRequires: cpio
|
|
|
|
BuildRequires: cyrus-sasl-gssapi
|
2018-05-30 15:59:20 +02:00
|
|
|
BuildRequires: fdupes
|
2018-05-30 15:35:32 +02:00
|
|
|
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
|
2018-06-07 11:51:21 +02:00
|
|
|
%if %{with set_user_identity}
|
2018-05-30 15:35:32 +02:00
|
|
|
Requires(post): permissions
|
|
|
|
Requires(verify): permissions
|
2018-06-07 11:51:21 +02:00
|
|
|
%endif
|
2018-05-30 15:35:32 +02:00
|
|
|
|
|
|
|
%description
|
2018-06-07 11:51:21 +02:00
|
|
|
Mailutils is a swiss army knife of electronic mail handling.
|
|
|
|
It offers a rich set of utilities and daemons for processing e-mail.
|
2018-05-30 15:35:32 +02:00
|
|
|
|
2018-06-07 11:51:21 +02:00
|
|
|
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.
|
2018-05-30 15:35:32 +02:00
|
|
|
|
2018-06-07 11:51:21 +02:00
|
|
|
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.
|
2018-05-30 15:35:32 +02:00
|
|
|
|
2018-06-07 11:51:21 +02:00
|
|
|
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.
|
2018-05-30 15:35:32 +02:00
|
|
|
|
2018-06-07 11:51:21 +02:00
|
|
|
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.
|
2018-05-30 15:35:32 +02:00
|
|
|
|
|
|
|
%package mh
|
|
|
|
Summary: GNU Mailutils -- Support for MH mailbox format
|
2018-06-07 11:51:21 +02:00
|
|
|
Group: Productivity/Networking/Email/Clients
|
2018-05-30 15:35:32 +02:00
|
|
|
|
|
|
|
%description mh
|
2018-06-07 11:51:21 +02:00
|
|
|
The primary aim of this implementation is to provide an interface
|
|
|
|
between Mailutils and Emacs using mh-e module.
|
|
|
|
|
|
|
|
To use Mailutils MH with Emacs, add the following line to your
|
|
|
|
site-start.el or .gnu-emacs file: (load "mailutils-mh")
|
|
|
|
|
|
|
|
|
|
|
|
%if %{with set_user_identity}
|
|
|
|
%package delivery
|
|
|
|
Summary: GNU Mailutils -- Server daemon MAIDAG, the mail delivery agent
|
|
|
|
Group: Productivity/Networking/Email/Servers
|
|
|
|
|
|
|
|
%description delivery
|
|
|
|
The name 'maidag' stands for Mail delivery agent. It is a
|
|
|
|
general-purpose MDA offering a rich set of features. It can operate
|
|
|
|
both in traditional mode, reading the message from its standard input,
|
|
|
|
and in LMTP mode. 'Maidag' is able to deliver mail to any mailbox
|
|
|
|
format, supported by GNU Mailutils. These formats, among others,
|
|
|
|
include 'smtp://', 'prog://' and 'sendmail://' which are equivalent to
|
|
|
|
forwarding a message over SMTP to a remote node.
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%package notify
|
|
|
|
Summary: GNU Mailutils -- Server daemon COMSATD, notify users about incoming mail
|
|
|
|
Group: Productivity/Networking/Email/Servers
|
|
|
|
|
|
|
|
%description notify
|
|
|
|
Comsatd is the server which receives reports of incoming mail and
|
|
|
|
notifies users, wishing to get this service.
|
|
|
|
|
|
|
|
%package imap4d
|
|
|
|
Summary: GNU Mailutils -- Server daemon IMAP4D
|
|
|
|
Group: Productivity/Networking/Email/Servers
|
|
|
|
|
|
|
|
%description imap4d
|
|
|
|
GNU 'imap4d' is a daemon implementing IMAP4 rev1 protocol for accessing
|
|
|
|
and handling electronic mail messages on a server.
|
2018-05-30 15:35:32 +02:00
|
|
|
|
2018-06-07 11:51:21 +02:00
|
|
|
%package pop3d
|
|
|
|
Summary: GNU Mailutils -- Server daemon POP3D
|
|
|
|
Group: Productivity/Networking/Email/Servers
|
2018-05-30 15:35:32 +02:00
|
|
|
|
2018-06-07 11:51:21 +02:00
|
|
|
%description pop3d
|
|
|
|
The 'pop3d' daemon implements the Post Office Protocol Version 3 server.
|
2018-05-30 15:35:32 +02:00
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: GNU Mailutils -- Development
|
2018-06-07 11:51:21 +02:00
|
|
|
Group: Development/Libraries/Other
|
2018-05-30 15:35:32 +02:00
|
|
|
Requires: libmailutils%{somajor} == %{version}
|
|
|
|
Requires: mailutils == %{version}
|
|
|
|
|
|
|
|
%description devel
|
2018-06-07 11:51:21 +02:00
|
|
|
This package includes libraries and header files for building tools to
|
|
|
|
access mailutils features.
|
2018-05-30 15:35:32 +02:00
|
|
|
|
|
|
|
%package -n libmailutils%{somajor}
|
|
|
|
Summary: GNU Mailutils -- Shared libraries
|
2018-06-07 11:51:21 +02:00
|
|
|
Group: System/Libraries
|
2018-05-30 15:35:32 +02:00
|
|
|
|
|
|
|
%description -n libmailutils%{somajor}
|
2018-06-07 11:51:21 +02:00
|
|
|
At the core of Mailutils is 'libmailutils', a library which provides
|
|
|
|
an API for accessing a generalized mailbox. A set of complementary
|
|
|
|
libraries provide methods for handling particular mailbox
|
|
|
|
implementations: UNIX mailbox, Maildir, MH, POP3, IMAP4, even SMTP.
|
2018-05-30 15:35:32 +02:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
%patch0
|
|
|
|
%patch1 -p1
|
2018-06-07 11:51:21 +02:00
|
|
|
%patch2
|
2018-05-30 15:35:32 +02:00
|
|
|
#
|
|
|
|
# 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 \
|
2018-06-07 11:51:21 +02:00
|
|
|
%if %{without set_user_identity}
|
|
|
|
--disable-build-dotlock \
|
|
|
|
--disable-build-maidag \
|
|
|
|
%endif
|
2018-05-30 15:35:32 +02:00
|
|
|
%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
|
|
|
|
|
2018-06-07 11:51:21 +02:00
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
2018-05-30 15:35:32 +02:00
|
|
|
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
|
|
|
|
|
|
|
#
|
|
|
|
#
|
|
|
|
#
|
2018-06-07 11:51:21 +02:00
|
|
|
%if %{with set_user_identity}
|
2018-05-30 15:35:32 +02:00
|
|
|
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
|
|
|
|
|
2018-05-30 15:59:20 +02:00
|
|
|
%fdupes -s %{buildroot}%{_libexecdir}/python*/site-packages/mailutils/
|
|
|
|
|
2018-05-30 15:35:32 +02:00
|
|
|
%find_lang %name
|
|
|
|
|
|
|
|
%post
|
|
|
|
%install_info --info-dir=%{_infodir} %{_infodir}/mailutils.info.gz
|
2018-06-07 11:51:21 +02:00
|
|
|
%{_sbindir}/update-alternatives --quiet --force \
|
|
|
|
--install %{_bindir}/mail mail %{_bindir}/mu-mail 10 \
|
|
|
|
--slave /bin/mail binmail %{_bindir}/mu-mail \
|
|
|
|
--slave %{_bindir}/Mail Mail %{_bindir}/mu-mail \
|
|
|
|
--slave %{_mandir}/man1/mail.1%{?ext_man} mail.1%{?ext_man} %{_mandir}/man1/mu-mail.1%{?ext_man} \
|
|
|
|
--slave %{_mandir}/man1/Mail.1%{?ext_man} Mail.1%{?ext_man} %{_mandir}/man1/mu-mail.1%{?ext_man}
|
|
|
|
%if %{with set_user_identity}
|
2018-05-30 15:35:32 +02:00
|
|
|
%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
|
|
|
|
|
2018-06-07 11:51:21 +02:00
|
|
|
%if %{with set_user_identity}
|
2018-05-30 15:35:32 +02:00
|
|
|
%verifyscript
|
|
|
|
%verify_permissions %{_bindir}/dotlock
|
|
|
|
%verify_permissions %{_sbindir}/maidag
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%files -f %name.lang
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%license COPYING COPYING.LESSER
|
|
|
|
%doc ChangeLog README NEWS AUTHORS THANKS
|
|
|
|
%doc %{_infodir}/mailutils.info*.gz
|
|
|
|
%doc %{_mandir}/man1/*.1%{?ext_man}
|
2018-06-07 11:51:21 +02:00
|
|
|
%if %{with set_user_identity}
|
|
|
|
%config %{_sysconfdir}/permissions.d/mailutils*
|
|
|
|
%endif
|
|
|
|
%ghost %config %{_sysconfdir}/alternatives/binmail
|
|
|
|
%ghost %config %{_sysconfdir}/alternatives/Mail
|
|
|
|
%ghost %config %{_sysconfdir}/alternatives/mail
|
|
|
|
%ghost %config %{_sysconfdir}/alternatives/Mail.1%{?ext_man}
|
|
|
|
%ghost %config %{_sysconfdir}/alternatives/mail.1%{?ext_man}
|
|
|
|
%if %{with set_user_identity}
|
|
|
|
%attr(02755,root,root) %verify(not mode) %{_bindir}/dotlock
|
|
|
|
%endif
|
2018-05-30 15:35:32 +02:00
|
|
|
%{_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/*
|
|
|
|
|
2018-06-07 11:51:21 +02:00
|
|
|
%if %{with set_user_identity}
|
|
|
|
%files delivery
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%attr(04755,root,root) %verify(not mode) %{_sbindir}/maidag
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%files notify
|
2018-05-30 15:35:32 +02:00
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_sbindir}/comsatd
|
2018-06-07 11:51:21 +02:00
|
|
|
|
|
|
|
%files imap4d
|
|
|
|
%defattr(-,root,root)
|
2018-05-30 15:35:32 +02:00
|
|
|
%{_sbindir}/imap4d
|
2018-06-07 11:51:21 +02:00
|
|
|
|
|
|
|
%files pop3d
|
|
|
|
%defattr(-,root,root)
|
2018-05-30 15:35:32 +02:00
|
|
|
%{_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
|