Blame SPECS/s-nail.spec

a5df2e
Name:           s-nail
a5df2e
Version:        14.9.22
a5df2e
Release:        6%{?dist}
a5df2e
Summary:        Environment for sending and receiving mail
a5df2e
a5df2e
# Everything is ISC except parts coming from the original Heirloom mailx which are BSD
a5df2e
License:        ISC and BSD with advertising and BSD
a5df2e
URL:            https://www.sdaoden.eu/code.html#s-nail
a5df2e
Source0:        https://www.sdaoden.eu/downloads/%{name}-%{version}.tar.xz
a5df2e
Source1:        https://www.sdaoden.eu/downloads/%{name}-%{version}.tar.xz.asc
a5df2e
# https://ftp.sdaoden.eu/steffen.asc
a5df2e
Source2:        steffen.asc
a5df2e
a5df2e
BuildRequires: make
a5df2e
BuildRequires:  gnupg2
a5df2e
BuildRequires:  gcc
a5df2e
BuildRequires:  openssl
a5df2e
BuildRequires:  openssl-devel
a5df2e
BuildRequires:  krb5-devel
a5df2e
BuildRequires:  libidn2-devel
a5df2e
BuildRequires:  ncurses-devel
a5df2e
a5df2e
Requires(post):   %{_sbindir}/update-alternatives
a5df2e
Requires(postun): %{_sbindir}/update-alternatives
a5df2e
Requires(preun):  %{_sbindir}/update-alternatives
a5df2e
a5df2e
# For backwards compatibility
a5df2e
Provides: /bin/mail
a5df2e
Provides: /bin/mailx
a5df2e
a5df2e
a5df2e
%description
a5df2e
S-nail provides a simple and friendly environment for sending
a5df2e
and receiving mail. It is intended to provide the functionality
a5df2e
of the POSIX mailx(1) command, but is MIME capable and optionally offers
a5df2e
extensions for line editing, S/MIME, SMTP and POP3, among others.
a5df2e
S-nail divides incoming mail into its constituent messages and allows
a5df2e
the user to deal with them in any order. It offers many commands
a5df2e
and internal variables for manipulating messages and sending mail.
a5df2e
It provides the user simple editing capabilities to ease the composition
a5df2e
of outgoing messages, and increasingly powerful and reliable
a5df2e
non-interactive scripting capabilities.
a5df2e
a5df2e
a5df2e
%prep
a5df2e
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
a5df2e
a5df2e
%autosetup -p1
a5df2e
a5df2e
cat <<EOF >>nail.rc
a5df2e
a5df2e
# Fedora-specific defaults
a5df2e
set bsdcompat
a5df2e
set noemptystart
a5df2e
set prompt='& '
a5df2e
EOF
a5df2e
a5df2e
a5df2e
%build
a5df2e
%make_build \
a5df2e
    CFLAGS="%{build_cflags}" \
a5df2e
    LDFLAGS="%{build_ldflags}" \
a5df2e
    OPT_AUTOCC=no \
a5df2e
    OPT_DEBUG=yes \
a5df2e
    OPT_NOMEMDBG=yes \
a5df2e
    OPT_DOTLOCK=no \
a5df2e
    VAL_PREFIX=%{_prefix} \
a5df2e
    VAL_SYSCONFDIR=%{_sysconfdir} \
a5df2e
    VAL_MAIL=%{_localstatedir}/mail \
a5df2e
    config
a5df2e
a5df2e
%make_build build
a5df2e
a5df2e
a5df2e
%install
a5df2e
%make_install
a5df2e
a5df2e
# s-nail binary is installed with 0555 permissions, fix that
a5df2e
chmod 0755 %{buildroot}%{_bindir}/%{name}
a5df2e
a5df2e
# provide files for alternative usage
a5df2e
ln -s %{_bindir}/%{name} %{buildroot}%{_bindir}/mailx.%{name}
a5df2e
touch %{buildroot}%{_bindir}/{Mail,mail,mailx,nail}
a5df2e
ln -s %{_mandir}/man1/%{name}.1 %{buildroot}%{_mandir}/man1/mailx.%{name}.1
a5df2e
touch %{buildroot}%{_mandir}/man1/{Mail,mail,mailx,nail}.1
a5df2e
a5df2e
a5df2e
%check
a5df2e
make test
a5df2e
a5df2e
a5df2e
%pre
a5df2e
# remove alternativized files if they are not symlinks
a5df2e
for f in Mail mail mailx nail; do
a5df2e
    [ -L %{_bindir}/$f ] || rm -f %{_bindir}/$f >/dev/null 2>&1 || :
a5df2e
    [ -L %{_mandir}/man1/$f.1.gz ] || rm -f %{_mandir}/man1/$f.1.gz >/dev/null 2>&1 || :
a5df2e
done
a5df2e
a5df2e
a5df2e
%preun
a5df2e
if [ $1 -eq 0 ]; then
a5df2e
    %{_sbindir}/update-alternatives --remove mailx %{_bindir}/mailx.%{name} >/dev/null 2>&1 || :
a5df2e
fi
a5df2e
a5df2e
a5df2e
%post
a5df2e
# set up the alternatives files
a5df2e
%{_sbindir}/update-alternatives --install %{_bindir}/mailx mailx %{_bindir}/mailx.%{name} 100 \
a5df2e
    --slave %{_bindir}/Mail Mail %{_bindir}/mailx.%{name} \
a5df2e
    --slave %{_bindir}/mail mail %{_bindir}/mailx.%{name} \
a5df2e
    --slave %{_bindir}/nail nail %{_bindir}/mailx.%{name} \
a5df2e
    --slave %{_mandir}/man1/mailx.1.gz mailx.1.gz %{_mandir}/man1/mailx.%{name}.1.gz \
a5df2e
    --slave %{_mandir}/man1/Mail.1.gz Mail.1.gz %{_mandir}/man1/mailx.%{name}.1.gz \
a5df2e
    --slave %{_mandir}/man1/mail.1.gz mail.1.gz %{_mandir}/man1/mailx.%{name}.1.gz \
a5df2e
    --slave %{_mandir}/man1/nail.1.gz nail.1.gz %{_mandir}/man1/mailx.%{name}.1.gz \
a5df2e
    >/dev/null 2>&1 || :
a5df2e
a5df2e
a5df2e
%postun
a5df2e
if [ $1 -ge 1 ]; then
a5df2e
    if [ "$(readlink %{_sysconfdir}/alternatives/mailx)" == "%{_bindir}/mailx.%{name}" ]; then
a5df2e
        %{_sbindir}/update-alternatives --set mailx %{_bindir}/mailx.%{name} >/dev/null 2>&1 || :
a5df2e
    fi
a5df2e
fi
a5df2e
a5df2e
a5df2e
%files
a5df2e
%license COPYING
a5df2e
%doc README
a5df2e
%ghost %{_bindir}/{Mail,mail,mailx,nail}
a5df2e
%{_bindir}/mailx.%{name}
a5df2e
%{_bindir}/%{name}
a5df2e
%config(noreplace) %{_sysconfdir}/%{name}.rc
a5df2e
%ghost %{_mandir}/man1/{Mail,mail,mailx,nail}.1*
a5df2e
%{_mandir}/man1/mailx.%{name}.1*
a5df2e
%{_mandir}/man1/%{name}.1*
a5df2e
a5df2e
a5df2e
%changelog
a5df2e
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 14.9.22-6
a5df2e
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
a5df2e
  Related: rhbz#1991688
a5df2e
a5df2e
* Wed Jun 16 2021 Mohan Boddu <mboddu@redhat.com> - 14.9.22-5
a5df2e
- Rebuilt for RHEL 9 BETA for openssl 3.0
a5df2e
  Related: rhbz#1971065
a5df2e
a5df2e
* Fri May 07 2021 Nikola Forró <nforro@redhat.com> - 14.9.22-4
a5df2e
- Provide /bin/mail{,x} for backwards compatibility
a5df2e
  resolves: #1958360
a5df2e
a5df2e
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 14.9.22-3
a5df2e
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
a5df2e
a5df2e
* Tue Mar 16 2021 Nikola Forró <nforro@redhat.com> - 14.9.22-2
a5df2e
- Fix alternatives
a5df2e
  related: #1897928
a5df2e
a5df2e
* Wed Feb 24 2021 Nikola Forró <nforro@redhat.com> - 14.9.22-1
a5df2e
- New upstream release 14.9.22
a5df2e
  resolves: #1932122
a5df2e
a5df2e
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 14.9.21-2
a5df2e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
a5df2e
a5df2e
* Fri Jan 22 2021 Nikola Forró <nforro@redhat.com> - 14.9.21-1
a5df2e
- New upstream release 14.9.21
a5df2e
  resolves: #1919030
a5df2e
a5df2e
* Mon Dec 14 2020 Nikola Forró <nforro@redhat.com> - 14.9.20-1
a5df2e
- New upstream release 14.9.20
a5df2e
  resolves: #1907112
a5df2e
a5df2e
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 14.9.19-2
a5df2e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
a5df2e
a5df2e
* Mon Apr 27 2020 Nikola Forró <nforro@redhat.com> - 14.9.19-1
a5df2e
- New upstream release 14.9.19
a5df2e
- Adjust default configuration to be closer to Heirloom mailx
a5df2e
- Provide alternativized binaries and man pages
a5df2e
  resolves: #1827969
a5df2e
a5df2e
* Thu Apr 23 2020 Nikola Forró <nforro@redhat.com> - 14.9.18-1
a5df2e
- Update to the latest upstream release
a5df2e
a5df2e
* Thu Apr 09 2020 Nikola Forró <nforro@redhat.com> - 14.9.17-1
a5df2e
- Initial package