# Use rpmbuild --without foo to disable foo feature %bcond_with with_ltdl %bcond_with with_gnutls %bcond_with with_gsasl # Do not disable guile. Mailutils 1.2 (unlike 1.1) doesn't build without guile at all %bcond_with with_guile %bcond_with without_readline %bcond_with with_mysql %bcond_with with_postgres # rpmbuild --with db4 to use db4 instead of gdbm # mailutils just uses of dbms, there's no point in specifying multiple %bcond_with with_db4 %if ! %{with db4} %bcond_with with_gdbm %endif Name: mailutils Version: 1.2 Release: 3%{?dist} Summary: Collection of GNU mail-related utilities Group: Applications/Internet License: GPLv3+ and LGPLv2+ URL: http://www.gnu.org/software/%{name}/ Source0: ftp://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.gz Patch0: mailutils-build.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: texinfo, gettext, pam-devel %if %{with ltdl} BuildRequires: libtool-ltdl-devel %endif %if %{with gnutls} BuildRequires: gnutls-devel %endif %if %{with gsasl} BuildRequires: libgsasl-devel %endif %if %{with guile} BuildRequires: guile-devel %endif %if ! %{without readline} BuildRequires: readline-devel %endif %if %{with mysql} BuildRequires: mysql-devel, mysql-libs %endif %if %{with postgres} BuildRequires: postgresql-devel %endif %if %{with db4} BuildRequires: db4-devel %endif %if %{with gdbm} BuildRequires: gdbm-devel %endif Requires(post): /sbin/install-info Requires(preun): /sbin/install-info Requires: %{name}-libs = %{version}-%{release} Requires: %{name}-doc = %{version}-%{release} %description Mailutils is a GNU implementation of various mail-handling utilities. This package offers basic Mailutils tools including SMTP and local delivery agents. %package sieve Summary: GNU implementation of Sieve mail filter language Group: Applications/Internet Requires: %{name}-libs = %{version}-%{release} %description sieve Sieve takes a script written in superset of RFC 3028 Sieve extensible with plugins and applies it to the given mailbox. %package mh Summary: GNU implementation of MH Message Handling system Group: Applications/Internet Conflicts: nmh Requires: %{name}-libs = %{version}-%{release} %description mh This package provides a drop-in replacement for MH mail user agent that is intended mainly for use with GNU Emacs' mh-e module. For complete MH compatible mail system use nmh package. %package server Summary: GNU implementations of IMAP, POP3 and mail notification servers Group: Applications/Internet Requires: %{name}-libs = %{version}-%{release} %description server Mail servers serve contents of mailboxes via RFC 2060 IMAP4 and RFC 1939 POP3 protocols. Comsatd notifies the user about incoming mail messages. %package devel Summary: Files needed for building extensions to GNU Mailutils Group: Applications/Internet Requires: %{name}-libs = %{version}-%{release} %description devel This package provides files that are required to build modules (such as mailutils-sieve extensions) for GNU Mailutils. %package libs Summary: Shared files for GNU Mailutils Group: System Environment/Libraries License: LGPL Requires: %{name}-libs = %{version}-%{release} %description libs This package provides files that are required to run components of the GNU Mailutils package. %prep %setup -q %patch0 -p1 -b .build %build # https://savannah.gnu.org/bugs/index.php?21038 # Adding to LDFLAGS just has no effect CFLAGS="$CFLAGS -L/usr/lib/mysql" %configure \ --with-mh-bindir=%{_bindir} \ --enable-mh-utils \ --disable-radius \ %{with_gnutls} \ %{with_gsasl} \ %{with_guile} \ %{without_readline} \ %{with_mysql} \ %{with_postgres} \ %{with_db4} \ %{with_gdbm} make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT rm $RPM_BUILD_ROOT/%{_libdir}/*.la rm $RPM_BUILD_ROOT/%{_libdir}/*.a rm $RPM_BUILD_ROOT/%{_libdir}/%{name}/*.la rm $RPM_BUILD_ROOT/%{_libdir}/%{name}/*.a rm -f $RPM_BUILD_ROOT/%{_infodir}/dir rm $RPM_BUILD_ROOT/%{_bindir}/mail rm $RPM_BUILD_ROOT/%{_mandir}/man1/mail.1* %find_lang %{name} %clean rm -rf $RPM_BUILD_ROOT %post libs -p /sbin/ldconfig %postun libs -p /sbin/ldconfig %files sieve %defattr(-,root,root,-) %{_bindir}/sieve %dir %{_libdir}/%{name} %{_libdir}/%{name}/* %if %{with guile} %{_bindir}/sieve.scm %{_datadir}/guile/site/mailutils/sieve-core.scm %{_datadir}/guile/site/sieve-modules/mimeheader.scm %{_datadir}/guile/site/sieve-modules/numaddr.scm %{_datadir}/guile/site/sieve-modules/redirect.scm %{_datadir}/guile/site/sieve-modules/reject.scm %{_datadir}/guile/site/sieve-modules/vacation.scm %endif %files mh %defattr(-,root,root,-) %{_bindir}/ali %{_bindir}/anno %{_bindir}/burst %{_bindir}/comp %{_bindir}/fmtcheck %{_bindir}/folder %{_bindir}/folders %{_bindir}/forw %{_bindir}/inc %{_bindir}/install-mh %{_bindir}/mark %{_bindir}/mhl %{_bindir}/mhn %{_bindir}/mhparam %{_bindir}/mhpath %{_bindir}/pick %{_bindir}/refile %{_bindir}/repl %{_bindir}/rmf %{_bindir}/rmm %{_bindir}/scan %{_bindir}/send %{_bindir}/sortm %{_bindir}/whatnow %{_bindir}/whom %files server %defattr(-,root,root,-) %{_sbindir}/comsatd %{_sbindir}/imap4d %{_sbindir}/pop3d %{_mandir}/man1/imap4d.1* %{_mandir}/man1/pop3d.1* %{_mandir}/man1/popauth.1* %files devel %defattr(-,root,root,-) %{_bindir}/%{name}-config %dir %{_includedir}/%{name} %{_includedir}/%{name}/* %{_libdir}/*.so %files libs %defattr(-,root,root,-) %dir %{_datadir}/%{name}/mh %{_datadir}/%{name}/mh/* %{_libdir}/*.so.* %if %{with guile} %{_datadir}/guile/site/mailutils/mailutils.scm %doc libmu_scm/guile-procedures.txt %endif # doc part merged with libs %{_infodir}/%{name}.info* %doc AUTHORS COPYING COPYING.LESSER NEWS README THANKS TODO ChangeLog %files -f %{name}.lang %defattr(-,root,root,-) %{_bindir}/dotlock %{_bindir}/frm %{_bindir}/from %{_bindir}/messages %{_bindir}/mimeview %{_bindir}/movemail %{_bindir}/readmsg %if %{with guile} %{_bindir}/guimb %endif %{_libexecdir}/mail.local %{_libexecdir}/mail.remote %changelog * Sat Aug 09 2008 Rakesh Pandit 1.2-3 - replaced messy %%define with %%bcond_with - merged doc with libs package * Mon Jul 14 2008 Rakesh Pandit 1.2-2 - Rebuild and fixed some warnings - build patch - fixed some missing files in %%files * Tue Sep 11 2007 Lubomir Kundrak 1.2-1 - Version bump - Corrected the License tag in accordance with the new guidelines - Multiple cosmetic changes and cleanups, thanks to Patrice Dumas (#244346) - Added guile support, and more thanks to Patrice Dumas (#244346) - Added configurable support of various stuff * Thu Jun 21 2007 Lubomir Kundrak 1.1-2 - Simplify scriptlets for -libs supbackage, thanks to Ruben Kerkhof (#244346) - Package locale files correctly, thanks to Bernard Johnson (#244346) * Thu Jun 14 2007 Lubomir Kundrak 1.1-1 - Initial package