File kolab-scripts.spec of Package kolab-scripts

#
# spec file for package kolab-scripts
#
# Copyright (c) 2016 Aeneas Jaissle <aj@ajaissle.de>
#
# 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 via http://bugs.opensuse.org/
#


Summary:            Kolab Development and Testing Scripts
Name:               kolab-scripts
Version:            0.7.0
Release:            0

License:            GPL-3.0+
Group:              Productivity/Networking/Other
Url:                http://www.kolab.org/
Source0:            kolab-pre-setup
Source1:            kolab-pre-setup.man
Source3:            kolab-ssl.conf
Source4:            kolab-cert
Source5:            kolab-cert.man
Source6:            pre-setup.conf
Source7:            kolab-cleanup-and-start-over
Source8:            kolab-cleanup-and-start-over.man
Source9:            LICENSE
Source20:           why-your-system-should-have-proper-fqdn
Source23:           check-apache.sh
Source24:           check-certs.sh
Source25:           check-cyrus-rpm.sh
Source26:           check-hostname.sh
Source27:           check-imap-user-deny.sh
Source28:           check-postfix.sh
Source29:           check-services-files.sh
Source30:           check-sql-database.sh
Source40:           check-clamd-freshclam.sh
Source41:           run-update-pkgs.sh
Source51:           kolab-backup
Source52:           backup-config.sh
Source53:           backup-imap.sh
Source54:           backup-ldap.sh
Source55:           backup-sql.sh
Source56:           kolab-backup.man

BuildArch:          noarch
BuildRequires:      apache2
BuildRoot:          %{_tmppath}/%{name}-%{version}-build
Requires:           acl
Requires:           tar

%description
Kolab is a secure, scalable and reliable groupware server. It is formed by a
number of well-known and proven components and adds intelligent interaction between them.

This package contains tools and scripts that help you in managing the Kolab Groupware server.

%prep
cp -a %{SOURCE9} .
cp -a %{SOURCE20} .

%build

%install
# Needed directories
%{__install} -d -m 755 %{buildroot}%{_sbindir}
%{__install} -d -m 755 %{buildroot}%{_mandir}/man8
%{__install} -d -m 755 %{buildroot}%{_sysconfdir}/kolab
%{__install} -d -m 755 %{buildroot}%{_sysconfdir}/apache2/conf.d
%{__install} -d -m 755 %{buildroot}%{_datadir}/kolab/backup.d
%{__install} -d -m 755 %{buildroot}%{_datadir}/kolab/pre-setup.d

# kolab-pre-setup - checks system environment for fqdn, tls etc.
%{__install} -p -m 755 %SOURCE51  %{buildroot}%{_sbindir}/kolab-backup
%{__install} -p -m 755 %SOURCE4  %{buildroot}%{_sbindir}/kolab-cert
%{__install} -p -m 755 %SOURCE7  %{buildroot}%{_sbindir}/kolab-cleanup-and-start-over
%{__install} -p -m 755 %SOURCE0  %{buildroot}%{_sbindir}/kolab-pre-setup
%{__install} -p -m 644 %SOURCE56 %{buildroot}%{_mandir}/man8/kolab-backup.8
%{__install} -p -m 644 %SOURCE5  %{buildroot}%{_mandir}/man8/kolab-cert.8
%{__install} -p -m 644 %SOURCE8  %{buildroot}%{_mandir}/man8/kolab-cleanup-and-start-over.8
%{__install} -p -m 644 %SOURCE1  %{buildroot}%{_mandir}/man8/kolab-pre-setup.8
%{__install} -p -m 644 %SOURCE3  %{buildroot}%{_sysconfdir}/apache2/conf.d/
%{__install} -p -m 644 %SOURCE6  %{buildroot}%{_sysconfdir}/kolab/

for S in %SOURCE23 %SOURCE24 %SOURCE25 %SOURCE26 %SOURCE27 \
  %SOURCE28 %SOURCE29 %SOURCE30 %SOURCE40 %SOURCE41; do
  %{__install} -p -m 755 $S %{buildroot}%{_datadir}/kolab/pre-setup.d/
done

for S in %SOURCE52 %SOURCE53 %SOURCE54 %SOURCE55; do
  %{__install} -p -m 755 $S %{buildroot}%{_datadir}/kolab/backup.d/
done

# /etc/services contains maps port 4190 to sieve management in 13.1.
# We'll drop 'check-services-files.sh' in 13.2 to support distribution upgrades up to 13.1.
%if 0%{?suse_version} > 1310
rm %{buildroot}%{_datadir}/kolab/pre-setup.d/check-services-files.sh
%endif

%files
%defattr(-,root,root,-)
%doc LICENSE
%doc why-your-system-should-have-proper-fqdn
%{_sbindir}/kolab-backup
%{_sbindir}/kolab-cert
%{_sbindir}/kolab-cleanup-and-start-over
%{_sbindir}/kolab-pre-setup
%doc %{_mandir}/man8/kolab-*.8.gz
%dir %{_datadir}/kolab
%dir %{_datadir}/kolab/pre-setup.d
%dir %{_datadir}/kolab/backup.d
%{_datadir}/kolab/backup.d/backup-*.sh
%{_datadir}/kolab/pre-setup.d/check-*.sh
%{_datadir}/kolab/pre-setup.d/run-*.sh
%dir %{_sysconfdir}/kolab
%config %{_sysconfdir}/kolab/pre-setup.conf
%config %{_sysconfdir}/apache2/conf.d/kolab-ssl.conf

%changelog
openSUSE Build Service is sponsored by