%global debian_release 54 Summary: Collection of MIME handling utilities Summary(de.UTF-8): Sammlung von MIME-Behandlungs-Utilities Summary(fr.UTF-8): Ensemble d'utilitaires de gestion MIME Summary(pl.UTF-8): Zestaw narzędzi do obsługi standardu MIME Summary(tr.UTF-8): MIME işleme araçları Name: metamail Version: 2.7 Release: %{debian_release}.6%{?dist} # Note: original code is MIT licensed but some patches are GPL-2.0-or-later License: GPL-2.0-or-later URL: http://packages.debian.org/unstable/mail/metamail Source0: http://ftp.funet.fi/pub/unix/mail/metamail/mm%{version}.tar.Z Source1: http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/metamail-non-english-man-pages.tar.bz2 Source3: ftp://ftp.debian.org/debian/pool/main/m/metamail/metamail_%{version}-%{debian_release}.diff.gz Patch0: metamail-ncurses.patch Patch1: metamail-pager.patch Patch2: metamail-linux.patch Patch3: metamail-fixawk.patch Patch4: metamail-fonts.patch Patch5: metamail-am.patch Patch6: metamail-suggestedname.patch Patch7: metamail-metasend_mktemp.patch Patch8: metamail-procmail_warning.patch Patch100: metamail-2.7-cleanup.patch Patch101: metamail-2.7-autotools.patch Patch102: metamail-gcc14.patch BuildRequires: bzip2 BuildRequires: coreutils BuildRequires: gcc BuildRequires: glibc-common BuildRequires: gzip BuildRequires: make BuildRequires: ncurses-devel >= 5.0 Requires: coreutils Requires: /usr/sbin/sendmail Requires: mailcap Requires: sharutils # The bundled fonts are available in other packages, whose name has # changed on a regular basis; fortunately the installed font files # didn't change location anywhere near as much # # Unfortunately, file dependencies outside /bin and /usr/bin # don't work well without explicit provides any longer %if 0%{?fedora} < 39 && 0%{?rhel} < 10 Requires: /usr/share/X11/fonts/misc/8x13B-ISO8859-8.pcf.gz %else Requires: xorg-x11-fonts-misc %endif %description Metamail is an implementation of MIME, the Multipurpose Internet Mail Extensions, a proposed standard for multimedia mail on the Internet. Metamail implements MIME, and also implements extensibility and configuration via the "mailcap" mechanism described in an informational RFC that is a companion to the MIME document. This version includes Debian patches. %description -l pl.UTF-8 Metamail obsługuje standard MIME (rozszerzenie poczty internetowej dla różnych celów) używany do przesyłania pocztą plików multimedialnych. MIME jest też wykorzystywany do kodowania znaków narodowych w listach i artykułach news. Metamail jest konfigurowalny poprzez mechanizm "mailcap" opisany w informacyjnym RFC towarzyszącym dokumentacji MIME. Ta wersja zawiera łaty z Debiana. %prep %setup -q -n mm%{version} cd src # There's {metamail,richmail} unused in debian patch and metamail is # libmetamail sources but due to debian patch patching (erronously probably) # metamail/splitmail.c, we need to keep it first rm -rf richmail mv metamail metamail.orig mkdir metamail mv metamail.orig/splitmail.c metamail # Debian patch bundle gzip -dc %{SOURCE3} | patch -p1 # Needed as file was created from patching chmod -c +x configure # Same as mimeencode - might still want this actually rm man/mmencode.1 cd .. # Link to libtinfo, not libncurses %patch -P 0 -p1 # Introduce environment variable METAMAIL_PAGER and have it default to "more" %patch -P 1 -p1 # Don't need to define killpg(), bcopy(), or bzero() as local macros on Linux %patch -P 2 -p1 # Don't have nawk but we do have awk %patch -P 3 -p1 # Don't need to check font path as we enforce the presence of the required # fonts through RPM dependencies %patch -P 4 -p1 # Remove autoconf hack no longer needed %patch -P 5 -p1 # If filename of attachment is given, it is used instead of using a random name %patch -P 6 -p1 # tempfile long-since deprecated in favour of mktemp %patch -P 7 -p0 # Allow metamail -x to work properly through procmail %patch -P 8 -p1 # Clean up code to build with current gcc and have fewer warnings %patch -P 100 -p1 -b .cleanup # Here's an autotools run we prepared earlier # cp -a mm2.7 mm2.7.orig # cd mm2.7/src # aclocal -I config # libtoolize # autoheader # automake --add-missing --force-missing --foreign # autoconf # rm -rf autom4te.cache metamail/config.h.in~ # cd ../.. # diff -ur --unidirectional-new-file mm2.7.orig mm2.7 > autotools.patch # rm -rf mm2.7.orig %patch -P 101 -p1 # Fix for gcc14 compatibility and some other stuff (rightfully) generating warnings %patch -P 102 # src/metamail/common.h is generated by configure rm src/metamail/common.h # Non-English man pages bzip2 -dc %{SOURCE1} | tar xf - -C src/man for f in src/man/fi/man1/*.1; do iconv -f iso-8859-1 -t utf-8 < ${f} > ${f}.utf-8 mv ${f}.utf-8 ${f} done for f in src/man/pl/man1/*.1; do iconv -f iso-8859-2 -t utf-8 < ${f} > ${f}.utf-8 mv ${f}.utf-8 ${f} done %build cd src %configure --disable-static make %install install -d %{buildroot}{%{_bindir},%{_mandir}{,/fi,/pl}/man1} cd src make install DESTDIR=%{buildroot} install -p -m 644 \ man/*.1 \ debian/mimencode.1 \ debian/mimeit.1 \ %{buildroot}%{_mandir}/man1 install -p -m 644 man/fi/man1/*.1 %{buildroot}%{_mandir}/fi/man1 install -p -m 644 man/pl/man1/*.1 %{buildroot}%{_mandir}/pl/man1 # No sane person would develop code against libmetamail rm -rf %{buildroot}%{_includedir}/metamail rm -rf %{buildroot}%{_libdir}/libmetamail.la rm -rf %{buildroot}%{_libdir}/libmetamail.so # The site with metamail patches has long since disappeared off the net, and # the patch-metamail script is inappropriate for a binary distribution anyway rm %{buildroot}{%{_bindir}/patch-metamail,%{_mandir}/man1/patch-metamail.1} %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %doc src/{README,CREDITS,mailers.txt} %{_bindir}/audiocompose %{_bindir}/audiosend %{_bindir}/extcompose %{_bindir}/getfilename %{_bindir}/mailserver %{_bindir}/mailto %{_bindir}/mailto-hebrew %{_bindir}/metamail %{_bindir}/metasend %{_bindir}/mimeit %{_bindir}/mimencode %{_bindir}/rcvAppleSingle %{_bindir}/richtext %{_bindir}/richtoatk %{_bindir}/showaudio %{_bindir}/showexternal %{_bindir}/shownonascii %{_bindir}/showpartial %{_bindir}/showpicture %{_bindir}/sndAppleSingle %{_bindir}/splitmail %{_bindir}/sun-audio-file %{_bindir}/sun-message %{_bindir}/sun-message.csh %{_bindir}/sun-to-mime %{_bindir}/sun2mime %{_bindir}/uudepipe %{_bindir}/uuenpipe %{_libdir}/libmetamail.so.0 %{_libdir}/libmetamail.so.0.0.0 %{_mandir}/man1/audiocompose.1* %{_mandir}/man1/audiosend.1* %{_mandir}/man1/extcompose.1* %{_mandir}/man1/getfilename.1* %{_mandir}/man1/mailto-hebrew.1* %{_mandir}/man1/mailto.1* %{_mandir}/man1/metamail.1* %{_mandir}/man1/metasend.1* %{_mandir}/man1/mime.1* %{_mandir}/man1/mimeit.1* %{_mandir}/man1/mimencode.1* %{_mandir}/man1/richtext.1* %{_mandir}/man1/showaudio.1* %{_mandir}/man1/showexternal.1* %{_mandir}/man1/shownonascii.1* %{_mandir}/man1/showpartial.1* %{_mandir}/man1/showpicture.1* %{_mandir}/man1/splitmail.1* %{_mandir}/man1/uudepipe.1* %{_mandir}/man1/uuenpipe.1* %lang(fi) %{_mandir}/fi/man1/audiocompose.1* %lang(fi) %{_mandir}/fi/man1/audiosend.1* %lang(fi) %{_mandir}/fi/man1/mime.1* %lang(fi) %{_mandir}/fi/man1/mimencode.1* %lang(pl) %{_mandir}/pl/man1/getfilename.1* %lang(pl) %{_mandir}/pl/man1/metamail.1* %changelog * Wed Sep 18 2024 Paul Howarth - 2.7-54.6 - Avoid file dependency for fonts after Fedora 38 * Fri May 3 2024 Paul Howarth - 2.7-54.5 - Fix for gcc14 compatibility and some other stuff (rightfully) generating warnings - Avoid use of deprecated patch syntax * Wed Feb 8 2023 Paul Howarth - 2.7-54.4 - Use SPDX-format license tag * Thu Nov 1 2018 Paul Howarth - 2.7-54.3 - Specify all build dependencies * Fri Nov 10 2017 Paul Howarth - 2.7-54.2 - Require coreutils rather than mktemp - Drop legacy Group: and BuildRoot: tags - Drop buildroot cleaning in %%install - Drop %%clean section - Drop %%defattr - Don't use macros or explicit paths for commands - Always link to libtinfo, not libncurses * Thu Oct 22 2009 Paul Howarth - 2.7-54.1 - Import from PLD Linux - Update to debian patch level 54 - Don't obsolete/provide htmlview - Fedora/RHEL still have it - Add cleanup patch to get code building cleanly - Add autotools patch so we don't have to run autotools at build time - Bundled fonts are included in X distributions for all supported distro releases, so don't include them and add an appropriate dependency instead - Comment all patch applications - Require /usr/sbin/sendmail, not /usr/lib/sendmail - Don't package devel parts for libmetamail - Change group from Applications/Mail to Applications/Internet - Fix license tag to rpmlint-friendly version - Recode manpages as UTF-8 - Fix buildroot for distros that need it - Link against libncurses if we don't have libtinfo