%define upstream_name Base %define _requires_exceptions pear(TestConfiguration.php) %define xmldir %{_var}/lib/pear %define peardir %(pear config-get php_dir 2> /dev/null) Name: ezcomponents-%{upstream_name} Version: 1.8 Release: %mkrel 1 Summary: The Base package provides the basic infrastructure that all packages rely on License: New BSD Group: Development/PHP URL: http://components.ez.no/package/%upstream_name Source0: http://components.ez.no/get/%upstream_name-%{version}.tgz Requires(post): php-pear Requires(preun): php-pear Requires: php-pear Requires: php-pear-channel-components BuildRequires: php-pear BuildRequires: php-pear-channel-components BuildArch: noarch %description The Base package provides the basic infrastructure that all packages rely on. Therefore every component relies on this package. %prep %setup -c -T pear -v -c pearrc \ -d php_dir=%{peardir} \ -d doc_dir=/docs \ -d bin_dir=%{_bindir} \ -d data_dir=%{peardir}/data \ -d test_dir=%{peardir}/tests \ -d ext_dir=%{_libdir} \ -s %build %install rm -rf %{buildroot} pear -c pearrc install --nodeps --packagingroot %{buildroot} %{SOURCE0} # 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 mv %{buildroot}/docs . # Install XML package description mkdir -p %{buildroot}%{xmldir} tar -xzf %{SOURCE0} package.xml cp -p package.xml %{buildroot}%{xmldir}/Base.xml %clean rm -rf %{buildroot} %post pear install --nodeps --soft --force --register-only %{xmldir}/Base.xml %postun if [ "$1" -eq "0" ]; then pear uninstall --nodeps --ignore-errors --register-only components.ez.no/Base fi %files %defattr(-,root,root) %doc docs/Base/* %{peardir}/data/Base/design/class_diagram.png %{peardir}/data/Base/design/design.txt %{peardir}/ezc/Base/base.php %{peardir}/ezc/Base/base_autoload.php %{peardir}/ezc/Base/exceptions/autoload.php %{peardir}/ezc/Base/exceptions/double_class_repository_prefix.php %{peardir}/ezc/Base/exceptions/exception.php %{peardir}/ezc/Base/exceptions/extension_not_found.php %{peardir}/ezc/Base/exceptions/file_exception.php %{peardir}/ezc/Base/exceptions/file_io.php %{peardir}/ezc/Base/exceptions/file_not_found.php %{peardir}/ezc/Base/exceptions/file_permission.php %{peardir}/ezc/Base/exceptions/functionality_not_supported.php %{peardir}/ezc/Base/exceptions/init_callback_configured.php %{peardir}/ezc/Base/exceptions/invalid_callback_class.php %{peardir}/ezc/Base/exceptions/invalid_parent_class.php %{peardir}/ezc/Base/exceptions/property_not_found.php %{peardir}/ezc/Base/exceptions/property_permission.php %{peardir}/ezc/Base/exceptions/setting_not_found.php %{peardir}/ezc/Base/exceptions/setting_value.php %{peardir}/ezc/Base/exceptions/value.php %{peardir}/ezc/Base/exceptions/whatever.php %{peardir}/ezc/Base/ezc_bootstrap.php %{peardir}/ezc/Base/features.php %{peardir}/ezc/Base/file.php %{peardir}/ezc/Base/init.php %{peardir}/ezc/Base/interfaces/configuration_initializer.php %{peardir}/ezc/Base/interfaces/exportable.php %{peardir}/ezc/Base/interfaces/persistable.php %{peardir}/ezc/Base/metadata.php %{peardir}/ezc/Base/metadata/pear.php %{peardir}/ezc/Base/metadata/tarball.php %{peardir}/ezc/Base/options.php %{peardir}/ezc/Base/options/autoload.php %{peardir}/ezc/Base/struct.php %{peardir}/ezc/Base/structs/file_find_context.php %{peardir}/ezc/Base/structs/repository_directory.php %{peardir}/ezc/autoload/base_autoload.php %{xmldir}/Base.xml %changelog * Sat Jul 16 2011 spuhler <spuhler> 1.8-1.mga2 + Revision: 124813 - imported package ezcomponents-Base