File horde4.spec of Package horde4
#
# spec file for package horde4
#
# 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: Horde Application Framework
Name: horde4
Version: 4.0.8
Release: 1
License: LGPL-2.1
Group: Productivity/Networking/Web/Utilities
Source0: http://pear.horde.org/get/horde-%{version}.tgz
# remove on 4.0.8 release
Source1: http://www.gnu.org/licenses/lgpl-2.1.txt
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Url: http://pear.horde.org/package/horde
BuildRequires: php5-pear >= 1.4.7
## Required pear modules
Requires: php5-pear-Horde_Argv < 2.0.0
Requires: php5-pear-Horde_Core < 2.0.0
Requires: php5-pear-Horde_Form < 2.0.0
Requires: php5-pear-Horde_Rpc < 2.0.0
Requires: php5-pear-Horde_Template < 2.0.0
Requires: php5-pear-Horde_Text_Diff < 2.0.0
Requires: php5-pear-Horde_Token < 2.0.0
Requires: php5-pear-Horde_Tree < 2.0.0
Requires: php5-pear-Horde_View < 2.0.0
Requires: php5-pear-Horde_Vfs < 2.0.0
Requires: php5-pear-Horde_Http < 2.0.0
Requires: php5-pear-Horde_Role < 2.0.0
Requires: php5-pear-Horde_Auth < 2.0.0
## Channel file
Requires: php5-pear-channel-horde
## php pecl
Requires: php5-ctype php5-gettext, php5-hash, php5-json
## Conflicts
Requires: php5-pear >= 1.7.0
BuildRequires: php5-pear-Horde_Role php5-pear-channel-horde
## Normal pear requirements
Requires: php5-pear-MDB2
Suggests: php5-pear-MDB2_Driver_mysqli php5-pear-MDB2_Driver_mysql
BuildRequires: fdupes
BuildArch: noarch
%description
The Horde Application Framework is a flexible, modular, general-purpose web
application framework written in PHP. It provides an extensive array of
components that are targeted at the common problems and tasks involved in
developing modern web applications. It is the basis for a large number of
production-level web applications, notably the Horde Groupware suites. For
more information on Horde or the Horde Groupware suites, visit
http://www.horde.org.
%prep
%setup -c -T
%{_bindir}/pear config-set horde_dir %{hordedir}
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}
## remove on 4.0.8 release
%__cp %{SOURCE1} %{buildroot}/%{_docdir}/%{name}/horde/COPYING
%if 0%{?suse_version} > 1020
%fdupes %buildroot%{hordedir}
%find_lang horde
%endif
# 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}/horde.xml
%clean
rm -rf %{buildroot}
%post
%{_bindir}/pear config-set horde_dir %{hordedir}
%{_bindir}/pear install --nodeps --soft --force --register-only %{xmldir}/horde.xml
%postun
if [ "$1" -eq "0" ]; then
%{_bindir}/pear uninstall --nodeps --ignore-errors --register-only pear.horde.org/horde
fi
%files -f horde.lang
%defattr(0644,root,root,0755)
%doc %{_docdir}/%{name}
%{peardir}/*
%{xmldir}/horde.xml
%dir %{hordedir}
%{hordedir}/admin
%{hordedir}/js
%{hordedir}/lib
%dir %{hordedir}/locale/
%{hordedir}/locale/.htaccess
%{hordedir}/locale/horde.pot
%{hordedir}/locale/en
%{hordedir}/rpc
%{hordedir}/services
%dir %{hordedir}/scripts/
%{hordedir}/scripts/upgrades
%{hordedir}/templates
%{hordedir}/themes
%{hordedir}/util
%{hordedir}/*.php
%attr(0775,root,www) %dir %{hordedir}/config/
%config(noreplace) %{hordedir}/config/*.php
%{hordedir}/config/*.xml
%config(noreplace) %{hordedir}/config/.htaccess
%config(noreplace) %{hordedir}/config/registry.d
%{hordedir}/config/*.dist
%attr(0775, wwwrun, root ) %{hordedir}/static
%attr(0664, wwwrun, root ) %{hordedir}/static/README
%attr(0775, wwwrun, root ) %{hordedir}/scripts/upgrades/2008-08-29_fix_mdb2_sequences.php
%attr(0775, wwwrun, root ) %{peardir}/data/horde/scripts/*.cron
%defattr(0744,root,root,0755)
%{_bindir}/horde-active-sessions
%{_bindir}/horde-alarms
%{_bindir}/horde-check-logger
%{_bindir}/horde-clear-cache
%{_bindir}/horde-convert-datatree-groups-to-sql
%{_bindir}/horde-convert-datatree-perms-to-sql
%{_bindir}/horde-crond
%{_bindir}/horde-db-migrate
%{_bindir}/horde-import-squirrelmail-prefs
%{_bindir}/horde-memcache-stats
%{_bindir}/horde-move-history-out-of-datatree
%{_bindir}/horde-run-task
%{_bindir}/horde-set-perms
%{_bindir}/horde-themes
%{_bindir}/horde-translation
%changelog