File horde4-ingo.spec of Package horde4-ingo
#
# spec file for package horde4-ingo
#
# Copyright (c) 2011 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
Summary: PEAR: An email filter rules manager
Name: horde4-ingo
Version: 2.0.2
Release: 1
License: BSD
Group: Productivity/Networking/Web/Utilities
Source0: http://pear.horde.org/get/ingo-%{version}.tgz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Url: http://pear.horde.org/package/ingo
BuildRequires: php5-pear >= 1.4.7
Requires: php5-pear >= 1.4.7
Requires: horde4 < 5.0.0, php5-pear >= 1.7.0
Conflicts: horde4 = 5.0.0
BuildRequires: fdupes
BuildRequires: php5-pear-Horde_Role php5-pear-channel-horde
Requires: php5-pear-channel-horde, php5-pear-Horde_Role
Requires: php5-pear-Horde_Auth
Requires: php5-pear-Horde_Autoloader
Requires: php5-pear-Horde_Browser
Requires: php5-pear-Horde_Cli
Requires: php5-pear-Horde_Core
Requires: php5-pear-Horde_Db
Requires: php5-pear-Horde_Editor
Requires: php5-pear-Horde_Exception
Requires: php5-pear-Horde_Form
Requires: php5-pear-Horde_Group
Requires: php5-pear-Horde_History
Requires: php5-pear-Horde_Icalendar
Requires: php5-pear-Horde_Image
Requires: php5-pear-Horde_Imap_Client
Requires: php5-pear-Horde_Itip
Requires: php5-pear-Horde_Lock
Requires: php5-pear-Horde_LoginTasks
Requires: php5-pear-Horde_Mail
Requires: php5-pear-Horde_Mime
Requires: php5-pear-Horde_Mime_Viewer
Requires: php5-pear-Horde_Nls
Requires: php5-pear-Horde_Notification
Requires: php5-pear-Horde_Pdf
Requires: php5-pear-Horde_Perms
Requires: php5-pear-Horde_Prefs
Requires: php5-pear-Horde_Share
Requires: php5-pear-Horde_Support
Requires: php5-pear-Horde_Text_Filter
Requires: php5-pear-Horde_Text_Flowed
Requires: php5-pear-Horde_Token
Requires: php5-pear-Horde_Tree
Requires: php5-pear-Horde_Url
Requires: php5-pear-Horde_Util
Requires: php5-pear-Horde_Vfs
Requires: php5-pear-Horde_View
Requires: php5-pear-Horde_Serialize
Requires: php5-pear-Net_Sieve
Requires: php5-pear-Net_Socket
Requires: horde4-timeobjects horde4-content
Requires: php5-gettext
#php5-singolexml
BuildArch: noarch
%description
Ingo is an email-filter management application. It is fully internationalized, integrated with Horde and the IMP Webmail client,
and supports both server-side (Sieve, procmail) and client-side (IMAP) message filtering.
%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=%{peardir}/tests \
-d ext_dir=%{_libdir} \
-d horde_dir=%{hordedir} \
-s
%build
%install
pear -c pearrc install --nodeps --packagingroot %{buildroot} %{SOURCE0}
%fdupes %buildroot%{hordedir}/ingo
%find_lang ingo
# 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}/ingo.xml
%clean
rm -rf %{buildroot}
%post
pear install --nodeps --soft --force --register-only %{xmldir}/ingo.xml
%postun
if [ "$1" -eq "0" ]; then
pear uninstall --nodeps --ignore-errors --register-only pear.horde.org/ingo
fi
%files -f ingo.lang
%defattr(-,root,root)
%{peardir}/*
%doc %{_docdir}/%{name}
%{xmldir}/ingo.xml
%{hordedir}/ingo
%attr(0775,root,www) %dir %{hordedir}/ingo/config
/usr/bin/ingo-convert-datatree-shares-to-sql
/usr/bin/ingo-convert-prefs-to-sql
/usr/bin/ingo-convert-sql-shares-to-sqlng
/usr/bin/ingo-postfix-policyd
%changelog