File roundcubemail-plugins-kolab.spec of Package roundcubemail-plugins-kolab
#
# spec file for package roundcubemail-plugins-kolab
#
# Copyright (c) 2016 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2014-2016 Aeneas Jaissle <aj@ajaissle.de>
# Copyright (c) 2012 Kolab Systems AG, Zuerich, Switzerland.
#
# 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/
#
%global roundcubepath %{apache_datadir}/roundcubemail
%global roundcubeconfigpath %{_sysconfdir}/roundcubemail
%global roundcubelibpath %{_localstatedir}/lib/roundcubemail
Name: roundcubemail-plugins-kolab
Version: 3.2.23
Release: 0
Summary: Kolab Groupware Plugins for Roundcube Webmail
License: AGPL-3.0+ and GPL-3.0+
Group: Productivity/Networking/Other
Url: https://kolab.org/
Source0: https://cgit.kolab.org/%{name}/snapshot/%{name}-%{version}.tar.gz
Source1: kolab_logo.png
BuildRequires: apache-rpm-macros
BuildRequires: fdupes
Requires: php-libkolab0 >= 0.5
Requires: php-libkolabxml1 >= 1.0
Requires: php-pear-HTTP_Request2
Requires: php-pear-Net_URL2
Requires: roundcubemail >= 1.0.90
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%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 is a collection of Kolab Groupware Plugins for Roundcube Webmail.
%prep
%setup -q
# remove cruft from source archive
find . -type f -name ".gitignore" -delete
# remove kolab-zpush plugin (not used anymore)
rm -rf plugins/kolab_zpush/
# remove executable bit from files that should not be executed
chmod -x plugins/owncloud/copy_to_owncloud/themes/kolab/core/css/styles.css
%build
%install
mkdir -p \
%{buildroot}%{roundcubeconfigpath} \
%{buildroot}%{roundcubepath}/plugins
cp -a plugins/* %{buildroot}%{roundcubepath}/plugins
mkdir -p %{buildroot}%{roundcubepath}/skins/kolab/images
install -pm 644 %{SOURCE1} %{buildroot}%{roundcubepath}/skins/kolab/images/kolab_logo.png
for plugin in calendar csv_export kolab_activesync kolab_addressbook \
kolab_auth kolab_config kolab_delegation kolab_files \
kolab_folders kolab_notes kolab_shortcuts kolab_tags \
ldap_authentication libcalendaring libkolab loginfail \
logon_page odfviewer owncloud pdfviewer piwik_analytics \
tasklist tinymce_config; do
if [ -e %{buildroot}%{roundcubepath}/plugins/${plugin}/config.inc.php.dist ]; then
mv %{buildroot}%{roundcubepath}/plugins/${plugin}/config.inc.php.dist %{buildroot}%{roundcubeconfigpath}/${plugin}.inc.php
ln -s %{roundcubeconfigpath}/${plugin}.inc.php %{buildroot}%{roundcubepath}/plugins/${plugin}/config.inc.php
fi
done
# loginfail plugin
cp %{buildroot}%{roundcubepath}/plugins/loginfail/loginfail.html.sample %{buildroot}%{roundcubeconfigpath}/loginfail.html
ln -s %{roundcubeconfigpath}/loginfail.html %{buildroot}%{roundcubepath}/plugins/logon_page/loginfail.html
# logon_page plugin
mv %{buildroot}%{roundcubepath}/plugins/logon_page/logon_page.html %{buildroot}%{roundcubeconfigpath}/logon_page.html
ln -s %{roundcubeconfigpath}/logon_page.html %{buildroot}%{roundcubepath}/plugins/logon_page/logon_page.html
# odfviewer plugin
mkdir -p %{buildroot}%{roundcubelibpath}/plugins/odfviewer
ln -s %{roundcubelibpath}/plugins/odfviewer %{buildroot}%{roundcubepath}/plugins/odfviewer/files
# fdupes
%fdupes %{buildroot}%{roundcubepath}
%pre
# cruft from snapshot, will be replaces by a link
for plugin in calendar kolab_addressbook tasklist; do
find %{roundcubepath}/plugins/${plugin}/helpdocs -type d -name "_skin" -delete
done
find %{roundcubepath}/plugins/tasklist/helpdocs -type d -name "kolab" -exec rm -r {} +;
if [ -L "%{apache_datadir}/%{name}/config" ]; then
rm -rf "%{apache_datadir}/%{name}/config"
fi
%post
if [ -e %{roundcubeconfigpath}/kolab.inc.php ]; then
echo "The configuration file for the plugin libkolab moved from kolab.inc.php to libkolab.inc.php."
echo "In order to not lose your configuration, rename %{roundcubeconfigpath}/kolab.inc.php manually."
fi
for plugin in calendar kolab_activesync kolab_addressbook \
kolab_auth kolab_config kolab_delegation kolab_files \
kolab_folders kolab_notes kolab_shortcuts kolab_tags \
ldap_authentication libcalendaring libkolab logon_page \
odfviewer owncloud pdfviewer piwik_analytics tasklist tinymce_config; do
for dir in `find %{roundcubepath}/plugins/${plugin} -type d -name "SQL"`; do
%{roundcubepath}/bin/updatedb.sh \
--dir ${dir} \
--package ${plugin} \
>/dev/null 2>&1 || :
done
done
exit 0
%files
%defattr(-,root,root)
%dir %{roundcubeconfigpath}
%attr(0640,%{apache_user},%{apache_group}) %config(noreplace) %{roundcubeconfigpath}/*.php
%attr(0640,%{apache_user},%{apache_group}) %config(noreplace) %{roundcubeconfigpath}/loginfail.html
%attr(0640,%{apache_user},%{apache_group}) %config(noreplace) %{roundcubeconfigpath}/logon_page.html
%dir %{roundcubepath}
%dir %{roundcubepath}/plugins/
%dir %{roundcubepath}/skins/
%dir %{roundcubepath}/skins/kolab/
%dir %{roundcubepath}/skins/kolab/images/
%{roundcubepath}/skins/kolab/images/kolab_logo.png
%{roundcubepath}/plugins/calendar
%{roundcubepath}/plugins/csv_export
%{roundcubepath}/plugins/kolab_activesync
%{roundcubepath}/plugins/kolab_addressbook
%{roundcubepath}/plugins/kolab_auth
%{roundcubepath}/plugins/kolab_config
%{roundcubepath}/plugins/kolab_delegation
%{roundcubepath}/plugins/kolab_files
%{roundcubepath}/plugins/kolab_folders
%{roundcubepath}/plugins/kolab_notes
%{roundcubepath}/plugins/kolab_shortcuts
%{roundcubepath}/plugins/kolab_tags
%{roundcubepath}/plugins/ldap_authentication
%{roundcubepath}/plugins/libkolab
%{roundcubepath}/plugins/libcalendaring
%{roundcubepath}/plugins/loginfail
%{roundcubepath}/plugins/logon_page
%{roundcubepath}/plugins/odfviewer
%{roundcubepath}/plugins/owncloud
%{roundcubepath}/plugins/pdfviewer
%{roundcubepath}/plugins/piwik_analytics
%{roundcubepath}/plugins/tasklist
%{roundcubepath}/plugins/tinymce_config
%{roundcubepath}/plugins/wap_client
%attr(-, %{apache_user}, root) %dir %{roundcubelibpath}
%attr(0775,root,%{apache_group}) %dir %{roundcubelibpath}/plugins
%attr(0750,%{apache_user},%{apache_group}) %{roundcubelibpath}/plugins/odfviewer
%changelog