[php-theseer-directoryscanner/f20] - update to 1.3.1 - switch from pear to github sources - enable test suite
Remi Collet
remi at fedoraproject.org
Tue Nov 25 15:13:04 UTC 2014
commit abf4927394d1adc0db92c7b4278447eaa740ed09
Author: Remi Collet <remi at fedoraproject.org>
Date: Tue Nov 25 16:12:58 2014 +0100
- update to 1.3.1
- switch from pear to github sources
- enable test suite
.gitignore | 1 +
php-theseer-directoryscanner.spec | 69 +++++++++++++++++--------------------
sources | 2 +-
3 files changed, 34 insertions(+), 38 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 2ab968c..937cf34 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
/DirectoryScanner-1.3.0.tgz
+/DirectoryScanner-1.3.1.tar.gz
diff --git a/php-theseer-directoryscanner.spec b/php-theseer-directoryscanner.spec
index 4c433f8..783cadf 100644
--- a/php-theseer-directoryscanner.spec
+++ b/php-theseer-directoryscanner.spec
@@ -6,36 +6,35 @@
#
# Please, preserve the changelog entries
#
-%{!?pear_metadir: %global pear_metadir %{pear_phpdir}}
-%{!?__pear: %global __pear %{_bindir}/pear}
-%global pear_name DirectoryScanner
-%global pear_channel pear.netpirates.net
+%global gh_commit b1406a99f5e4b1761c84d9e98127c03871bb7b0e
+%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
+%global gh_owner theseer
+%global gh_project DirectoryScanner
+%global php_home %{_datadir}/php/TheSeer
+%global pear_name DirectoryScanner
+%global pear_channel pear.netpirates.net
Name: php-theseer-directoryscanner
-Version: 1.3.0
+Version: 1.3.1
Release: 1%{?dist}
Summary: A recursive directory scanner and filter
Group: Development/Libraries
-# https://github.com/theseer/DirectoryScanner/issues/3
License: BSD
-URL: https://github.com/theseer/DirectoryScanner
-Source0: http://%{pear_channel}/get/%{pear_name}-%{version}.tgz
+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(language) >= 5.3.1
-BuildRequires: php-pear(PEAR)
-BuildRequires: php-channel(%{pear_channel})
+BuildRequires: %{_bindir}/phpunit
-Requires(post): %{__pear}
-Requires(postun): %{__pear}
-# From package.xml
+# From composer.json
Requires: php(language) >= 5.3.1
+# From phpcompatinfo report for 1.3.0
Requires: php-fileinfo
Requires: php-spl
-Requires: php-pear(PEAR)
-Requires: php-channel(%{pear_channel})
+Provides: php-composer(theseer/directoryscanner) = %{version}
Provides: php-pear(%{pear_channel}/%{pear_name}) = %{version}
@@ -44,46 +43,42 @@ A recursive directory scanner and filter.
%prep
-%setup -q -c
-
-cd %{pear_name}-%{version}
-mv ../package.xml %{name}.xml
+%setup -q -n %{gh_project}-%{gh_commit}
%build
-cd %{pear_name}-%{version}
# Empty build section, most likely nothing required.
%install
-cd %{pear_name}-%{version}
-%{__pear} install --nodeps --packagingroot %{buildroot} %{name}.xml
+mkdir -p %{buildroot}%{php_home}
+cp -pr src %{buildroot}%{php_home}/%{gh_project}
-# 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}
+%check
+phpunit --bootstrap %{buildroot}%{php_home}/%{gh_project}/autoload.php
%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 \
- %{pear_channel}/%{pear_name} >/dev/null || :
+if [ -x %{_bindir}/pear ]; then
+ %{_bindir}/pear uninstall --nodeps --ignore-errors --register-only \
+ %{pear_channel}/%{pear_name} >/dev/null || :
fi
%files
-%{pear_xmldir}/%{name}.xml
-%dir %{pear_phpdir}/TheSeer
-%{pear_phpdir}/TheSeer/%{pear_name}
+%{!?_licensedir:%global license %%doc}
+%license LICENSE
+%doc composer.json
+%dir %{php_home}
+%{php_home}/%{gh_project}
%changelog
+* Tue Nov 25 2014 Remi Collet <remi at fedoraproject.org> - 1.3.1-1
+- update to 1.3.1
+- switch from pear to github sources
+- enable test suite
+
* Sun Apr 6 2014 Remi Collet <remi at fedoraproject.org> - 1.3.0-1
- initial package, version 1.3.0
\ No newline at end of file
diff --git a/sources b/sources
index 0515ea6..9237a14 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-13830bdf0ce1cf84bca273b1fe28c683 DirectoryScanner-1.3.0.tgz
+6930985d09a514dee3ba43656a6fe2b1 DirectoryScanner-1.3.1.tar.gz
More information about the scm-commits
mailing list