File horde5-kronolith.spec of Package horde5-kronolith
#
# spec file for package horde4-kronolith
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, 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 via http://bugs.opensuse.org/
#
%define peardir %(pear config-get php_dir 2> /dev/null || echo %{_datadir}/pear)
%define xmldir /var/lib/pear
%define hordedir /usr/share/php5/PEAR/www/horde
%define pear_name kronolith
Summary: Kronolith: A web based calendar
License: GPL-2.0
Group: Productivity/Networking/Web/Utilities
Name: horde5-kronolith
Version: 4.0.2
Release: 0
Source0: http://pear.horde.org/get/kronolith-%{version}.tgz
Source1: %{pear_name}.conf
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Url: http://pear.horde.org/package/kronolith
BuildRequires: php-pear >= 1.4.7
BuildRequires: fdupes
BuildRequires: php5-pear-Horde_Role
BuildRequires: php5-pear-channel-horde
BuildRequires: horde5 >= 5.0.2
Requires: horde5 >= 5.0.2
Requires: php-pear >= 1.7.0
Conflicts: horde5 >= 6.0.0
Requires: horde5-content >= 2.0.0
Requires: horde5-timeobjects >= 2.0.0
Requires: php-gettext
Requires: php-json
Requires: php5-pear-Horde_ActiveSync >= 2.0.0
Requires: php5-pear-Horde_Auth >= 2.0.0
Requires: php5-pear-Horde_Autoloader >= 2.0.0
Requires: php5-pear-Horde_Core >= 2.0.0
Requires: php5-pear-Horde_Crypt
Requires: php5-pear-Horde_Data >= 2.0.0
Requires: php5-pear-Horde_Date >= 2.0.0
Requires: php5-pear-Horde_Date_Parser >= 2.0.0
Requires: php5-pear-Horde_Db >= 2.0.0
Requires: php5-pear-Horde_Exception >= 2.0.0
Requires: php5-pear-Horde_Form >= 2.0.0
Requires: php5-pear-Horde_Group >= 2.0.0
Requires: php5-pear-Horde_Http >= 2.0.0
Requires: php5-pear-Horde_History >= 2.0.0
Requires: php5-pear-Horde_Icalendar >= 2.0.0
Requires: php5-pear-Horde_Image >= 2.0.0
Requires: php5-pear-Horde_Lock >= 2.0.0
Requires: php5-pear-Horde_LoginTasks >= 2.0.0
Requires: php5-pear-Horde_Mail >= 2.0.0
Requires: php5-pear-Horde_Mime >= 2.0.0
Requires: php5-pear-Horde_Nls >= 2.0.0
Requires: php5-pear-Horde_Notification >= 2.0.0
Requires: php5-pear-Horde_Perms >= 2.0.0
Requires: php5-pear-Horde_Role
Requires: php5-pear-Horde_Serialize >= 2.0.0
Requires: php5-pear-Horde_Share >= 2.0.0
Requires: php5-pear-Horde_Support >= 2.0.0
Requires: php5-pear-Horde_Text_Filter >= 2.0.0
Requires: php5-pear-Horde_Timezone >= 1.0.0
Requires: php5-pear-Horde_Url >= 2.0.0
Requires: php5-pear-Horde_Util >= 2.0.0
Requires: php5-pear-Horde_View >= 2.0.0
Requires: php5-pear-Horde_Test >= 2.0.0
Requires: php5-pear-Date_Holidays >= 0.21.0
Requires: php5-pear-channel-horde
Suggests: horde5-nag >= 4.0.0
Suggests: php-xmlwriter
#php5-simplexml
BuildArch: noarch
%description
Kronolith is the Horde calendar application.
It provides web-based calendars backed by a SQL database or a Kolab server.
Supported features include Ajax and mobile interfaces, shared calendars, remote calendars,
invitation management (iCalendar/iTip), free/busy management, resource management, alarms, recurring events,
and a sophisticated day/week view which handles arbitrary numbers of overlapping events.
%prep
%setup -c -T
pear -v -c pearrc \
-d php_dir=%{peardir} \
-d doc_dir=%{_docdir}/%{name} \
-d bin_dir=%{_bindir} \
-d data_dir=%{peardir}/data \
-d test_dir=%{testdir} \
-d ext_dir=%{_libdir} \
-d horde_dir=%{hordedir} \
-s
%build
%install
pear -c pearrc install --nodeps --packagingroot %{buildroot} %{SOURCE0}
## configs written by the web configurator should go to etc
%{__mkdir_p} %{buildroot}/etc/horde/
%{__mv} %{buildroot}/%{hordedir}/%{pear_name}/config %{buildroot}/etc/horde/%{pear_name}
%{__ln_s} /etc/horde/%{pear_name} %{buildroot}/%{hordedir}/%{pear_name}/config
## we provide an own apache config and delete the htaccess files
%{__install} -m 0660 -D %{SOURCE1} %{buildroot}/etc/horde/apache-snippets.d/%{pear_name}.conf
%{__rm} %{buildroot}/etc/horde/%{pear_name}/.htaccess
%{__rm} %{buildroot}/%{hordedir}/%{pear_name}/feed/.htaccess
%{__rm} %{buildroot}/%{hordedir}/%{pear_name}/lib/.htaccess
%{__rm} %{buildroot}/%{hordedir}/%{pear_name}/locale/.htaccess
%fdupes %buildroot%{hordedir}/%{pear_name}
%find_lang %{pear_name}
# Clean up unnecessary files
rm pearrc
rm %{buildroot}/%{peardir}/.filemap
rm %{buildroot}/%{peardir}/.lock
rm -rf %{buildroot}/%{peardir}/.registry
rm -rf %{buildroot}%{peardir}/.channels
rm %{buildroot}%{peardir}/.depdb
rm %{buildroot}%{peardir}/.depdblock
# Install XML package description
mkdir -p %{buildroot}%{xmldir}
tar -xzf %{SOURCE0} package.xml
cp -p package.xml %{buildroot}%{xmldir}/kronolith.xml
%clean
rm -rf %{buildroot}
%post
pear install --nodeps --soft --force --register-only %{xmldir}/kronolith.xml
%postun
if [ "$1" -eq "0" ]; then
pear uninstall --nodeps --ignore-errors --register-only pear.horde.org/kronolith
fi
%files -f kronolith.lang
%defattr(-,root,root)
%doc %{_docdir}/%{name}
%{peardir}/*
%{xmldir}/kronolith.xml
%{hordedir}/kronolith
%attr(0775,root,www) %dir %{hordedir}/kronolith/config
%{_bindir}/kronolith-agenda
%{_bindir}/kronolith-convert-to-utc
%{_bindir}/kronolith-convert-datatree-shares-to-sql
%{_bindir}/kronolith-convert-sql-shares-to-sqlng
%{_bindir}/kronolith-import-squirrelmail-calendar
%{_bindir}/kronolith-import-icals
%config /etc/horde/apache-snippets.d/%{pear_name}.conf
%attr(0750,wwwrun,www) %dir /etc/horde/%{pear_name}
%attr(0640,wwwrun,www) %config /etc/horde/%{pear_name}/*
%changelog