File horde3-ingo.spec of Package horde3-ingo

#
# spec file for package horde3-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/
#

# norootforbuild

%define _hordedir %(%{_sbindir}/apxs2 -q datadir)/htdocs/horde
%define _ingodir %{_hordedir}/ingo

%define _pversion 1.2.5

Name:           horde3-ingo
Version:        1.2.5
Release:        2
Summary:        Horde "Email Filter Rules Manager"
License:        Horde Apache-like License
Group:          Productivity/Networking/Other
Url:            http://www.horde.org/ingo
Source0:        ingo-h3-%{_pversion}.tar.bz2
Source1:        ingo-h3-1.2-rc1-backends.php.kolab
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Provides:       ingo = %{version}
Obsoletes:      ingo <= 1.2.4

Requires:       horde3 >= 3.3.0
Requires:       php5-pear-DB
Requires:       php5-pear-Mail_Mime
Requires:       php5-pear-Net_Sieve
BuildRequires:  apache2-devel horde3
%if 0%{?sles_version} != 10 
BuildRequires:  fdupes
%endif

%description
Ingo, the "Email Filter Rules Manager", started as a frontend for 
the Sieve filter language, and is now a generic and complete filter
rule frontend that currently is able to create Sieve, procmail,
maildrop, and IMAP filter rules. The IMAP filter driver translates
the filter rules on demand to IMAP commands, executed via PHP's IMAP
extension and has replaced IMP's internal filtering code. It is now
the default filtering agent in IMP H3 (4.x).

Authors:
--------
	Michael Slusarz <slusarz@horde.org>
	Jan Schneider <jan@horde.org>

%prep
%setup -qn ingo-h3-%{_pversion}

%__cp %{S:1} config/backends.php.kolab
%__sed -i 's|/usr/bin/php|%{_bindir}/php5|' scripts/upgrades/convert_prefs_to_sql.php

%build
pushd config/
for i in *.dist; do %__mv $i ${i%.dist}; done
popd

%install
%__mkdir_p %{buildroot}%{_ingodir}
%__cp -r ./* %{buildroot}%{_ingodir}
%__rm -rf %{buildroot}%{_ingodir}/{docs,README,LICENSE}
%if 0%{?sles_version} != 10 
 %fdupes %buildroot%{_ingodir}
%endif
%find_lang ingo

%clean
%__rm -rf %{buildroot}

%files -f ingo.lang
%defattr(-, root, root)
%dir %{_ingodir}
%doc docs README LICENSE
%{_ingodir}/*.php
%{_ingodir}/js
%{_ingodir}/lib
%dir %{_ingodir}/locale
# US provides just the xml file so we need to include it manually
%{_ingodir}/locale/en_US
%{_ingodir}/po
%{_ingodir}/scripts
%{_ingodir}/templates
%{_ingodir}/themes
%attr(0750, wwwrun, www) %dir %{_ingodir}/config
%attr(0640, wwwrun, www) %config(noreplace) %{_ingodir}/config/*
%attr(0640, wwwrun, www) %config(noreplace) %{_ingodir}/config/.htaccess

%changelog
openSUSE Build Service is sponsored by