%define versionmajor 7 %define versionminor 0 %define versionpatch 0 %define prerel alpha13 %define oname fetchmail %if 0%{!?mkrel:1} %define mkrel(c) %{1}%{?dist} %endif Summary: Full-featured POP/IMAP mail retrieval daemon Name: fetchmail7 Version: %{versionmajor}.%{versionminor}.%{versionpatch} Release: %mkrel 0.%{prerel}.1 License: GPLv2 Group: Networking/Mail URL: https://www.fetchmail.info %if 0%{?prerel:1} Source0: https://gitlab.com/fetchmail/fetchmail/-/archive/%{version}-%{prerel}/%{oname}-%{version}-%{prerel}.tar.bz2 %else Source0: https://gitlab.com/fetchmail/fetchmail/-/archive/%{version}/%{oname}-%{version}.tar.xz Source2: https://gitlab.com/fetchmail/fetchmail/-/archive/%{version}/%{oname}-%{version}.tar.xz.asc %endif Source4: %{name}.sysconfig Source5: %{name}.service # From OpenSUSE Patch100: fetchmail-6.3.8-smtp_errors.patch %if 0%{!?_unitdir:1} %define _unitdir %{_prefix}/lib/systemd/system %endif BuildRequires: autoconf >= 2.71 BuildRequires: automake BuildRequires: libtool BuildRequires: (gcc or clang) BuildRequires: bison BuildRequires: flex # Building locales is disabled so that fetchmail7 files won't conflict with # those of fetchmail. Obviously that won't be the case when fetchmail 7 is # released and this package is renamed back to fetchmail instead of fetchmail7. %if "%{name}" == "%{oname}" BuildRequires: gettext >= 0.23.1 BuildRequires: gettext-devel %endif BuildRequires: lynx BuildRequires: (pkgconfig(openssl) >= 3.0.9) BuildRequires: pkgconfig(krb5) BuildRequires: python3 # By default, fetchmail sends the mail to a local mail server. Requires: (mail-server or postfix or exim or sendmail) # The mail server will then send the mail to a delivery agent (based on # ~/.forward). The delivery agent can also be used directly. Requires: (MailTransportAgent or maildrop or procmail) # Not much use without a mail client. Elmo and alpine are the modern clones of # elm and pine, respectively. Recommends: (mailx or mutt or neomutt or elmo or alpine) Obsoletes: fetchyahoo < 2.14.9-2 %if "%{name}" != "%{oname}" Obsoletes: %{oname} = %{version}-%{release} %else Obsoletes: %{name}%{versionmajor} <= %{version}-%{release} %endif %description Fetchmail is a free, full-featured, robust, and well-documented remote mail retrieval and forwarding utility intended to be used over on-demand TCP/IP links (such as SLIP or PPP connections). It retrieves mail from remote mail servers and forwards it to your local (client) machine's delivery system, so it can then be read by normal mail user agents such as Mutt, Elm, Pine, (X)Emacs/Gnus or Mailx. Fetchmail supports all standard mail-retrieval protocols in use on the Internet: POP3, IMAP4rev1 (also IMAP4), ETRN, and ODMR. On the output side, fetchmail supports ESMTP/SMTP, LMTP, and invocation of a local delivery agent. Fetchmail also fully supports authentication via GSSAPI, Kerberos 5, RFC1938 one-time passwords, Compuserve's POP3 with RPA, Microsoft's NTLM, Demon Internet's SDPS, or CRAM-MD5 authentication a la RFC2195. Fetchmail supports end-to-end encryption with OpenSSL or wolfSSL. Do read README.SSL for details on fetchmail's configuration and README.SSL-SERVER for server-side requirements. %package daemon Summary: SySV init script for demonize fetchmail for retrieving emails Group: System/Base Requires: %{name} = %{version} Requires(preun): rpm-helper Requires(post): rpm-helper %description daemon Systemd service for fetchmail for sucking emails. %prep %autosetup -p1 -n %{oname}-%{version}%{?prerel:-%{prerel}} %build # Just sets up CFLAGS; fetchmail should compile fine without them. %{?serverbuild} autoreconf --force --install %configure \ --enable-RPA \ --enable-NTLM \ --enable-SDPS \ --with-gssapi \ --with-kerberos5 \ --with-ssl=%{_prefix} \ %if "%{name}" != "%{oname}" --program-suffix=%{versionmajor} \ --disable-nls \ %endif --with-python=%{_prefix}/python3 # (tv) do not use %%make in order to workaround buggy parallel build: %__make all FAQ FEATURES NOTES %install %make_install mkdir -p \ %{buildroot}{%_sysconfdir/sysconfig,%_mandir/man1,%_unitdir} install -m0644 %SOURCE4 %{buildroot}%{_sysconfdir}/sysconfig/%{name} install -m0755 %SOURCE5 %{buildroot}%{_unitdir}/%{name}.service echo -e "# Put here each user config\n" > %{buildroot}/etc/%{name}rc %if "%{name}" == "%{oname}" %find_lang %name %endif %post -n %{name}-daemon %_post_service %{name} %postun -n %{name}-daemon %_preun_service %{name} %if "%{name}" == "%{oname}" %files -f %oname.lang %else %files %endif %doc FAQ FEATURES NOTES %doc INSTALL NEWS README* %doc contrib fetchmail-features.html fetchmail-FAQ.html design-notes.html %license COPYING %attr(2755, root, mail) %{_bindir}/%{name} %{_mandir}/man1/%{name}.1* %files daemon %attr(600,mail,mail) %config(noreplace,missingok) %{_sysconfdir}/%{name}rc %config(noreplace) %{_sysconfdir}/sysconfig/%{name} %{_unitdir}/%{name}.service