File horde3-turba.spec of Package horde3-turba

#
# spec file for package horde3-turba
#
# 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 _turbadir %{_hordedir}/turba
%define _pversion 2.3.5

Name:           horde3-turba
Version:        2.3.5
Release:        2
Summary:        The Horde Groupware Address Book
License:        Horde Apache-like License
Group:          Productivity/Networking/Other
Url:            http://www.horde.org/turba
Source0:        turba-h3-%{_pversion}.tar.bz2
Source1:        turba-h3-2.2-alpha-sources.php.kolab
Patch0:         turba-h3-2.3.5-php5_exec.patch
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Provides:       turba = %{version}
Obsoletes:      turba <= 2.3.4

Requires:       horde3 >= 3.3.0
Requires:       php5-pear-MDB2
Requires:       php5-pear-Net_LDAP php5-pear-Net_LDAP2
BuildRequires:  apache2-devel horde3

%if 0%{?sles_version} != 10 
BuildRequires:  fdupes
%endif

%description
Turba is a set of PHP scripts that implement a contacts directory
and management interface. Turba also provides an API for external
applications to interface with address books, providing adding and
searching features that you can hook right into other applications.


Authors:
--------
	Chuck Hagenbuch
	Jon Parise
	Jan Schneider
	Michael J. Rubinsky

%prep
%setup -qn turba-h3-%{_pversion}
%__cp %{S:1} ./config/sources.php.kolab
%patch0

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

%install
%__mkdir_p %{buildroot}%{_turbadir}
%__cp -r ./* %{buildroot}%{_turbadir}
%__rm -rf %{buildroot}%{_turbadir}/{docs,README,LICENSE}
# remove and link duplicate files  if not SLES 10
%if 0%{?sles_version} != 10 
 %fdupes %buildroot/%{_turbadir}
%endif

%clean
%__rm -rf %{buildroot}

%files
%defattr(-, root, root)
%doc docs README LICENSE
%dir %{_turbadir}

%lang(ar_SY) %{_turbadir}/locale/ar_SY/LC_MESSAGES/turba.mo
%lang(bg_BG) %{_turbadir}/locale/bg_BG/LC_MESSAGES/turba.mo
%lang(ca_ES) %{_turbadir}/locale/ca_ES/LC_MESSAGES/turba.mo
%lang(cs_CZ) %{_turbadir}/locale/cs_CZ/LC_MESSAGES/turba.mo
%lang(el_GR) %{_turbadir}/locale/el_GR/LC_MESSAGES/turba.mo
%lang(et_EE) %{_turbadir}/locale/et_EE/LC_MESSAGES/turba.mo
%lang(da_DK) %{_turbadir}/locale/da_DK/LC_MESSAGES/turba.mo
%lang(de_DE) %{_turbadir}/locale/de_DE/LC_MESSAGES/turba.mo
%lang(es_ES) %{_turbadir}/locale/es_ES/LC_MESSAGES/turba.mo
%lang(eu_ES) %{_turbadir}/locale/eu_ES/LC_MESSAGES/turba.mo
%lang(fa_IR) %{_turbadir}/locale/fa_IR/LC_MESSAGES/turba.mo
%lang(fi_FI) %{_turbadir}/locale/fi_FI/LC_MESSAGES/turba.mo
%lang(fr_FR) %{_turbadir}/locale/fr_FR/LC_MESSAGES/turba.mo
%lang(gl_ES) %{_turbadir}/locale/gl_ES/LC_MESSAGES/turba.mo
%lang(hr_HR) %{_turbadir}/locale/hr_HR/LC_MESSAGES/turba.mo
%lang(hu_HU) %{_turbadir}/locale/hu_HU/LC_MESSAGES/turba.mo
%lang(is_IS) %{_turbadir}/locale/is_IS/LC_MESSAGES/turba.mo
%lang(it_IT) %{_turbadir}/locale/it_IT/LC_MESSAGES/turba.mo
%lang(ja_JP) %{_turbadir}/locale/ja_JP/LC_MESSAGES/turba.mo
%lang(ko_KR) %{_turbadir}/locale/ko_KR/LC_MESSAGES/turba.mo
%lang(lt_LT) %{_turbadir}/locale/lt_LT/LC_MESSAGES/turba.mo
%lang(lv_LV) %{_turbadir}/locale/lv_LV/LC_MESSAGES/turba.mo
%lang(mk_MK) %{_turbadir}/locale/mk_MK/LC_MESSAGES/turba.mo
%lang(nb_NO) %{_turbadir}/locale/nb_NO/LC_MESSAGES/turba.mo
%lang(nl_NL) %{_turbadir}/locale/nl_NL/LC_MESSAGES/turba.mo
%lang(nn_NO) %{_turbadir}/locale/nn_NO/LC_MESSAGES/turba.mo
%lang(pl_PL) %{_turbadir}/locale/pl_PL/LC_MESSAGES/turba.mo
%lang(pt_BR) %{_turbadir}/locale/pt_BR/LC_MESSAGES/turba.mo
%lang(pt_PT) %{_turbadir}/locale/pt_PT/LC_MESSAGES/turba.mo
%lang(ro_RO) %{_turbadir}/locale/ro_RO/LC_MESSAGES/turba.mo
%lang(ru_RU) %{_turbadir}/locale/ru_RU/LC_MESSAGES/turba.mo
%lang(sk_SK) %{_turbadir}/locale/sk_SK/LC_MESSAGES/turba.mo
%lang(sl_SI) %{_turbadir}/locale/sl_SI/LC_MESSAGES/turba.mo
%lang(sv_SE) %{_turbadir}/locale/sv_SE/LC_MESSAGES/turba.mo
%lang(tr_TR) %{_turbadir}/locale/tr_TR/LC_MESSAGES/turba.mo
%lang(zh_TW) %{_turbadir}/locale/zh_TW/LC_MESSAGES/turba.mo
%lang(uk_UA) %{_turbadir}/locale/uk_UA/LC_MESSAGES/turba.mo
%lang(zh_CN) %{_turbadir}/locale/zh_CN/LC_MESSAGES/turba.mo

%dir %{_turbadir}/locale
%dir %{_turbadir}/locale/*
%dir %{_turbadir}/locale/*/LC_MESSAGES

%{_turbadir}/locale/*/*.xml
%{_turbadir}/locale/.htaccess
%{_turbadir}/*.php
%{_turbadir}/addressbooks
%{_turbadir}/js
%{_turbadir}/lib
#%{_turbadir}/locale
%{_turbadir}/po
%{_turbadir}/scripts
%{_turbadir}/templates
%{_turbadir}/themes
%attr(0750, wwwrun, www) %dir %{_turbadir}/config
%attr(0640, wwwrun, www) %config(noreplace) %{_turbadir}/config/*
%attr(0640, wwwrun, www) %config(noreplace) %{_turbadir}/config/.htaccess

%changelog