File benno-core.spec of Package benno-core

#
# spec file for package benno-core
#
# Copyright (c) 2012,2013,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-core
Version:      2.10.0
Release:      1
Group:        Productivity/Networking/Email/Servers
Summary:      Email Archive - Benno MailArchiv Core
License:      AGPL-3.0
Autoreqprov:  on
URL:          http://www.benno-mailarchiv.de
Source:       %{name}-%{version}.tar.bz2
BuildRoot:    %{_tmppath}/%{name}-%{version}-build
PreReq:       /usr/sbin/groupadd
BuildRequires: benno-lib
Requires:     java >= 1.7.0 benno-lib
BuildArch:    noarch
Source1:      README.SUSE
Source2:	  benno-core.conf

%define GRPADDBENNO /usr/sbin/groupadd -r benno 2> /dev/null || :
%define USRADDBENNO /usr/sbin/useradd -r -g benno -c "Benno MailArchive Daemon User" benno 2> /dev/null || :


%description
Benno MailArchiv Core

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
# Gruppe anlegen
%{GRPADDBENNO}
%{USRADDBENNO}

export NO_BRP_CHECK_BYTECODE_VERSION=true
mkdir -p %{buildroot}
rm -rf install
mkdir -p %{buildroot}/var/log/benno
mv * %{buildroot}
mkdir %{buildroot}%{_defaultdocdir}
mv %{buildroot}/usr/share/doc/%{name} %{buildroot}/%{_defaultdocdir}
%{__cp} %{S:1} %{buildroot}%{_defaultdocdir}/%{name}/README.SUSE
mkdir -p %{buildroot}%{_tmpfilesdir}
%{__cp} %{S:2} %{buildroot}%{_tmpfilesdir}/

%pre
# Gruppe anlegen
%{GRPADDBENNO}
%{USRADDBENNO}

%post
%tmpfiles_create %{_tmpfilesdir}/benno-core.conf

%files
%defattr(-,root,root)
%dir %{_sysconfdir}/benno
%config %{_sysconfdir}/benno/benno.xml
%dir %doc %{_defaultdocdir}/%{name}
%doc %{_defaultdocdir}/%{name}/*
%attr(0644,root,root) /opt/benno/lib/bennocore-%{version}.jar
%attr(0770,benno,benno) /var/log/benno
%dir %{_tmpfilesdir}
%{_tmpfilesdir}/benno-core.conf
%ghost /run/benno
%changelog
openSUSE Build Service is sponsored by