From a3cee152e61974f2dfcc1b075911ae602aa3e50b Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Apr 23 2014 13:14:02 +0000 Subject: get sources from github --- diff --git a/.gitignore b/.gitignore index 5454a13..a4a9ef2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +clog File_Iterator-1.2.2.tgz /File_Iterator-1.2.3.tgz /File_Iterator-1.2.4.tgz diff --git a/php-phpunit-File-Iterator.spec b/php-phpunit-File-Iterator.spec index a261d21..f3c06c8 100644 --- a/php-phpunit-File-Iterator.spec +++ b/php-phpunit-File-Iterator.spec @@ -1,85 +1,70 @@ -%{!?pear_metadir: %global pear_metadir %{pear_phpdir}} -%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}} -%global pear_name File_Iterator -%global channel pear.phpunit.de +%global gh_commit acd690379117b042d1c8af1fafd61bde001bf6bb +%global gh_short %(c=%{gh_commit}; echo ${c:0:7}) +%global gh_owner sebastianbergmann +%global gh_project php-file-iterator +%global php_home %{_datadir}/php +%global pear_name File_Iterator +%global pear_channel pear.phpunit.de +# Circular dependency with phpunit +%global with_tests %{?_with_tests:1}%{!?_with_tests:0} Name: php-phpunit-File-Iterator Version: 1.3.4 -Release: 1%{?dist} +Release: 2%{?dist} Summary: FilterIterator implementation that filters files based on a list of suffixes Group: Development/Libraries License: BSD -URL: http://github.com/sebastianbergmann/php-file-iterator/ -Source0: http://pear.phpunit.de/get/%{pear_name}-%{version}.tgz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +URL: https://github.com/%{gh_owner}/%{gh_project} +Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}.tar.gz BuildArch: noarch -BuildRequires: php-pear(PEAR) >= 1.9.2 -BuildRequires: php-channel(%{channel}) +BuildRequires: php(language) >= 5.3.3 -Requires: php-pear(PEAR) >= 1.9.2 -Requires: php-channel(%{channel}) -Requires: php-common >= 5.3.3 -Requires(post): %{__pear} -Requires(postun): %{__pear} +# From composer.json +Requires: php(language) >= 5.3.3 +# From phpcompatinfo report for 1.3.4 +Requires: php-pcre +Requires: php-spl -Provides: php-pear(%{channel}/%{pear_name}) = %{version} +# For compatibility with PEAR mode +Provides: php-pear(%{pear_channel}/%{pear_name}) = %{version} %description FilterIterator implementation that filters files based on a list of suffixes. + %prep -%setup -q -c -[ -f package2.xml ] || %{__mv} package.xml package2.xml -mv package2.xml %{pear_name}-%{version}/%{name}.xml -cd %{pear_name}-%{version} +%setup -q -n %{gh_project}-%{gh_commit} + +rm File/Iterator/Autoload.php.in %build -cd %{pear_name}-%{version} # Empty build section, most likely nothing required. - -%install -rm -rf %{buildroot} -cd %{pear_name}-%{version} - -%{__pear} install --nodeps --packagingroot %{buildroot} %{name}.xml - -# Clean up unnecessary files -rm -rf %{buildroot}%{pear_metadir}/.??* - -# Install XML package description -mkdir -p %{buildroot}%{pear_xmldir} -install -pm 644 %{name}.xml %{buildroot}%{pear_xmldir} +# If upstream drop Autoload.php, command to generate it +#phpab \ +# --output File/Iterator/Autoload.php \ +# --template File/Iterator/Autoload.php.in \ +# File -%clean -rm -rf %{buildroot} - - -%post -%{__pear} install --nodeps --soft --force --register-only \ - %{pear_xmldir}/%{name}.xml >/dev/null || : - - -%postun -if [ $1 -eq 0 ] ; then - %{__pear} uninstall --nodeps --ignore-errors --register-only \ - %{channel}/%{pear_name} >/dev/null || : -fi +%install +mkdir -p %{buildroot}%{php_home} +cp -pr File %{buildroot}%{php_home} %files -%defattr(-,root,root,-) -%{pear_xmldir}/%{name}.xml -%{pear_phpdir}/File +%doc ChangeLog.markdown README.markdown LICENSE composer.json +%{php_home}/* -%doc %{pear_docdir}/%{pear_name} %changelog +* Wed Apr 23 2014 Remi Collet - 1.3.4-2 +- get sources from github + * Sun Nov 3 2013 Christof Damian - 1.3.4-1 - upstream 1.3.4