File php5-pear-channel-horde.spec of Package php5-pear-channel-horde
#
# spec file for package php5-pear-channel-horde
#
# 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 pear_xmldir /var/lib/pear
Name: php5-pear-channel-horde
Version: 1.0
Release: 0
Summary: Adds pear.horde.org channel to PEAR
License: BSD-3-Clause
Group: Development/Libraries/PHP
Url: http://pear.horde.org/
Source0: http://pear.horde.org/channel.xml
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
Requires: php
Requires: php-pear
Requires: php-tokenizer
BuildRequires: php-pear >= 1.9.0
BuildRequires: php-tokenizer
%description
This package adds the pear.horde.org channel which allows PEAR packages
from this channel to be installed.
%prep
%setup -q -c -T
%build
# Empty build section, nothing to build
%install
%{__mkdir_p} %{buildroot}%{pear_xmldir}
%{__install} -pm 644 %{SOURCE0} %{buildroot}%{pear_xmldir}/pear.horde.org.xml
%clean
%{__rm} -rf %{buildroot}
%post
if [ $1 -eq 1 ] ; then
pear channel-add %{pear_xmldir}/pear.horde.org.xml > /dev/null || :
else
pear channel-update %{pear_xmldir}/pear.horde.org.xml > /dev/null ||:
fi
%postun
if [ $1 -eq 0 ] ; then
pear channel-delete pear.horde.org.xml > /dev/null || :
fi
%files
%defattr(-,root,root,-)
%{pear_xmldir}/pear.horde.org.xml
%changelog