File esmtp.spec of Package esmtp

#
# spec file for package esmtp (Version 1.0)
#
# Copyright 2009 Mario García H.
#
# 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.

%define sforge http://hivelocity.dl.sourceforge.net/sourceforge/

Summary: User configurable relay-only MTA
Name: esmtp
Version: 1.0
Release: 1
Source0: %{name}-%{version}.tar.bz2
Source1: %sforge/%{name}/%{name}-%{version}.tar.bz2
Vendor: %{vendor}
URL: http://esmtp.sourceforge.net/
License: GPLv2+
Group: Productivity/Networking/Email/Utilities
Requires: libesmtp >= 1.0
BuildRequires: libesmtp-devel >= 1.0
BuildRoot: %{_builddir}/%{name}-%{version}-build

%description
esmtp is a user configurable relay-only Mail
Transfer Agent (MTA) with a sendmail compatible
syntax.

It is based on libESMTP, supporting AUTH
(including CRAM-MD5 and NTLM SASL mechanisms)
and StartTLS SMTP extensions.

For local mail transport, there are complementary
solutions, as procmail.  esmtp's on-line
documentation has a simple example on how to do
this.


%prep
%setup -q

%build
%ifarch x86_64
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -pie -fPIC"
%else
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -pie"
%endif

if [ -x ./configure ]; then
  CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{_prefix} \
	--libdir=%{_libdir} \
	--datadir=%{_datadir} \
	--sysconfdir=%{_sysconfdir} \
	--docdir=%{_docdir}/%{name} \
	--disable-dependancy-tracking \
	--disable-static
else
  CFLAGS="$RPM_OPT_FLAGS" ./autogen.sh --prefix=%{_prefix}
fi

%{__make} %{?jobs:-j%jobs}
%debug_package


%install
%{__make} DESTDIR=$RPM_BUILD_ROOT install


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%attr(0755,root,root)%{_bindir}/%{name}
%attr(0755,root,root)%{_bindir}/mailq
%attr(0755,root,root)%{_bindir}/newaliases
%attr(0755,root,root)%{_sbindir}/sendmail
%attr(0644,root,root)%{_libdir}/sendmail

%doc %{_mandir}/man1/%{name}.1.gz
%doc %{_mandir}/man1/mailq.1.gz
%doc %{_mandir}/man1/newaliases.1.gz
%doc %{_mandir}/man1/sendmail.1.gz
%doc %{_mandir}/man5/%{name}rc.5.gz


%changelog
* Mon Jun 22 2009 Mario García H. <code933k@gmail.com> - 1.0
- Initial package.
openSUSE Build Service is sponsored by