%define upstream_name File_Util %define xmldir %{_var}/lib/pear %define peardir %(pear config-get php_dir 2> /dev/null) Name: php-pear-%{upstream_name} Version: 1.0.0 Release: %mkrel 2 Summary: Common file and directory utility functions License: PHP Group: Development/PHP Source0: http://pear.php.net/get/File_Util-%{version}.tgz URL: http://pear.php.net/package/File_Util BuildRequires: php-pear >= 1.4.7 Requires: php-pear-File >= 1.4.0 Requires: php-pear >= 1.7.0 BuildArch: noarch %description Common file and directory utility functions. Path handling, temp dir/file, sorting of files, listDirs, isIncludable and more %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 # Install XML package description mkdir -p %{buildroot}%{xmldir} tar -xzf %{SOURCE0} package.xml cp -p package.xml %{buildroot}%{xmldir}/File_Util.xml %clean rm -rf %{buildroot} %post pear install --nodeps --soft --force --register-only %{xmldir}/File_Util.xml %postun if [ "$1" -eq "0" ]; then pear uninstall --nodeps --ignore-errors --register-only pear.php.net/File_Util fi %files %defattr(-,root,root) %{peardir}/* %{xmldir}/File_Util.xml %changelog * Sun Jan 13 2013 umeabot <umeabot> 1.0.0-2.mga3 + Revision: 376182 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Fri Jan 20 2012 spuhler <spuhler> 1.0.0-1.mga2 + Revision: 198610 - imported package php-pear-File_Util