File benno-smtp.spec of Package benno-smtp
#
# spec file for package benno-smtp
#
# Copyright (c) 2012,2017,2018 FSP Computer & Netzwerke, Schotten, Germany
#
# 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.
# Please submit bugfixes or comments to stefan.schaefer@fsproductions.de
#
# norootforbuild
Name: benno-smtp
Version: 2.8.0
Release: 1
Group: Productivity/Networking/Email/Servers
Summary: Email Archive - Benno MailArchiv SMTP interface daemon
License: AGPL-3.0
Autoreqprov: on
URL: http://www.benno-mailarchiv.de
Source: %{name}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: benno-archive benno-lib benno-core
Requires: java >= 1.7.0 benno-lib benno-core benno-archive benno-systemd-global
BuildArch: noarch
Source1: README.SUSE
Source2: benno-smtp.init
Source3: benno-smtp-service.conf
Source5: benno-smtp-fsp.service
%description
Benno MailArchiv SMTP interface daemon
The benno-smtp daemon opens port 2500/tcp to receive mails from other
smtp daemons. The daemon drops all received mails to /srv/benno/inbox,
where the archive-daemon picks them up and pot them to the archive.
Using Benno MailArchiv is not free of charge. It is possible to get a
30 day evaluation license for testing.
For further information about licensing have a look at:
http://www.benno-mailarchiv.de or
http://www.fsproductions.de (Benno MailArchiv Partner)
Authors:
--------
Martin Werthmoeller <mw@lw-systems.de>
Stefan Schaefer <stefan.schaefer@fsproductions.de>
%prep
%setup -n %{name}-%{version}
%build
%install
export NO_BRP_CHECK_BYTECODE_VERSION=true
mkdir -p %{buildroot}
rm -rf install
mv * %{buildroot}
mkdir %{buildroot}%{_defaultdocdir}
mv %{buildroot}/usr/share/doc/%{name} %{buildroot}/%{_defaultdocdir}
rm -f %{buildroot}/%{_defaultdocdir}/%{name}/copyright
%{__cp} %{S:1} %{buildroot}%{_defaultdocdir}/%{name}/README.SUSE
%if 0%{?suse_version} >= 1315
%{__cp} %{S:3} %{buildroot}%{_sysconfdir}/%{name}/
mkdir -p %{buildroot}%{_unitdir}
mkdir -p %{buildroot}/usr/lib/systemd/scripts/
%{__cp} %{S:5} %{buildroot}%{_unitdir}
mv %{buildroot}/lib/systemd/system/benno-smtp.service %{buildroot}%{_unitdir}
rm -f %{buildroot}%{_sysconfdir}/init.d/%{name}
mkdir %{buildroot}%{_sbindir}
ln -sf %{_sbindir}/service %{buildroot}/%{_sbindir}/rc%{name}
%else
%{__cp} %{S:2} %{buildroot}%{_sysconfdir}/init.d/%{name}
mkdir %{buildroot}%{_sbindir}
ln -sf ../../etc/init.d/%{name} %{buildroot}%{_sbindir}/rc%{name}
%endif
%pre
%if 0%{?suse_version} >= 1315
%service_add_pre %{name}.service
%endif
%post
%if 0%{?suse_version} >= 1315
%service_add_post %{name}.service
%endif
%preun
%if 0%{?suse_version} >= 1315
%service_del_preun %{name}.service
%endif
%stop_on_removal %{name}
%postun
%restart_on_update %{name}
%if 0%{?suse_version} >= 1315
%service_del_postun %{name}.service
%else
%insserv_cleanup %{name}
%endif
%files
%defattr(-,root,root)
%dir %doc %{_defaultdocdir}/%{name}
%doc %{_defaultdocdir}/%{name}/*
%dir %{_sysconfdir}/%{name}
%config %{_sysconfdir}/%{name}/bennosmtp-log4j.xml
%config %{_sysconfdir}/%{name}/%{name}.conf
%config %{_sysconfdir}/default/%{name}
%dir /opt/%{name}
%dir /opt/%{name}/lib
%attr(0644,root,root) /opt/%{name}/bennosmtp.jar
%attr(0644,root,root) /opt/%{name}/lib/slf4j-api-1.6.1.jar
%attr(0644,root,root) /opt/%{name}/lib/slf4j-simple-1.6.1.jar
%attr(0644,root,root) /opt/%{name}/lib/benno-subethasmtp-3.1.7-benno3.jar
%attr(0644,root,root) /opt/%{name}/lib/activation-1.1.1.jar
%attr(0644,root,root) /opt/%{name}/lib/commons-cli-1.2.jar
%attr(0644,root,root) /opt/%{name}/lib/log4j-1.2.16.jar
%attr(0644,root,root) /opt/%{name}/lib/mail-1.4.4.jar
%attr(0644,root,root) /opt/%{name}/lib/jsr305-1.3.9.jar
%if 0%{?suse_version} >= 1315
%config %{_sysconfdir}/%{name}/%{name}-service.conf
%attr(644,root,root) %{_unitdir}/%{name}-fsp.service
%attr(644,root,root) %{_unitdir}/%{name}.service
%{_sbindir}/rc%{name}
%else
%attr(0750,root,root) %{_sysconfdir}/init.d/%{name}
%attr(0644,root,root) %{_sbindir}/rc%{name}
%endif
%changelog