summaryrefslogtreecommitdiffstats
path: root/php-phpspec-php-diff.spec
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2015-02-17 13:40:18 +0100
committerRemi Collet <fedora@famillecollet.com>2015-02-17 13:40:18 +0100
commit7f5bbea1ec5605924c62a604f6f67c187a8346ea (patch)
tree6b9c2599a5e714c64229cee92a4e85b7130ed129 /php-phpspec-php-diff.spec
php-phpspec-php-diff: 1.0.2 - New package
Diffstat (limited to 'php-phpspec-php-diff.spec')
-rw-r--r--php-phpspec-php-diff.spec92
1 files changed, 92 insertions, 0 deletions
diff --git a/php-phpspec-php-diff.spec b/php-phpspec-php-diff.spec
new file mode 100644
index 0000000..27eb26a
--- /dev/null
+++ b/php-phpspec-php-diff.spec
@@ -0,0 +1,92 @@
+# spec file for php-phpspec-php-diff
+#
+# Copyright (c) 2015 Remi Collet
+# License: CC-BY-SA
+# http://creativecommons.org/licenses/by-sa/4.0/
+#
+# Please, preserve the changelog entries
+#
+%global gh_commit 30e103d19519fe678ae64a60d77884ef3d71b28a
+%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
+%global gh_owner phpspec
+%global gh_project php-diff
+
+Name: php-phpspec-php-diff
+Version: 1.0.2
+Release: 1%{?dist}
+Summary: A library for generating differences between two hashable objects
+
+Group: Development/Libraries
+# LICENSE text is inclued in the README file
+License: BSD
+URL: https://github.com/%{gh_owner}/%{gh_project}
+Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}.tar.gz
+
+# Fix example to use our generated autoloader
+Patch0: %{gh_project}-example.patch
+
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildArch: noarch
+# For minimal test
+BuildRequires: php-cli
+# To generate an autoloader
+BuildRequires: %{_bindir}/phpab
+
+Requires: php(language)
+Requires: php-pcre
+
+Provides: php-composer(phpspec/php-diff) = %{version}
+
+
+%description
+A comprehensive library for generating differences between two hashable
+objects (strings or arrays). Generated differences can be rendered in
+all of the standard formats including:
+ * Unified
+ * Context
+ * Inline HTML
+ * Side by Side HTML
+
+The logic behind the core of the diff engine (ie, the sequence matcher)
+is primarily based on the Python difflib package. The reason for doing
+so is primarily because of its high degree of accuracy.
+
+
+%prep
+%setup -q -n %{gh_project}-%{gh_commit}
+
+%patch0 -p0
+
+
+%build
+: Generate a simple autoloader
+%{_bindir}/phpab --output lib/autoload.php lib
+
+
+%install
+# No namespace, so use a package specific dir
+rm -rf %{buildroot}
+mkdir -p %{buildroot}%{_datadir}/php/phpspec/php-diff
+cp -pr lib/* %{buildroot}%{_datadir}/php/phpspec/php-diff
+
+
+%check
+# Not really a test... but should work without error
+cd example
+%{_bindir}/php -d include_path=%{buildroot}%{_datadir}/php example.php >/dev/null
+
+
+%clean
+rm -rf %{buildroot}
+
+
+%files
+%defattr(-,root,root,-)
+%doc README example
+%doc composer.json
+%{_datadir}/php/phpspec
+
+
+%changelog
+* Tue Feb 17 2015 Remi Collet <remi@fedoraproject.org> - 1.0.2-1
+- initial package \ No newline at end of file