[php-JMSParser] Initial import (#903785)
Shawn Iwinski
siwinski at fedoraproject.org
Mon Mar 18 18:16:49 UTC 2013
commit 1327ebef63b86c3a61bbf7109daf9957c6fd026a
Author: Shawn Iwinski <siwinski at redhat.com>
Date: Mon Mar 18 14:12:23 2013 -0400
Initial import (#903785)
.gitignore | 1 +
php-JMSParser.spec | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++++
sources | 1 +
3 files changed, 94 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..5e1f1b9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/php-JMSParser-1.0.0-c509473bc1b4866415627af0e1c6cc8ac97fa51d.tar.gz
diff --git a/php-JMSParser.spec b/php-JMSParser.spec
new file mode 100644
index 0000000..61d3f61
--- /dev/null
+++ b/php-JMSParser.spec
@@ -0,0 +1,92 @@
+%global github_owner schmittjoh
+%global github_name parser-lib
+%global github_version 1.0.0
+%global github_commit c509473bc1b4866415627af0e1c6cc8ac97fa51d
+
+%global php_min_ver 5.3.0
+%global phpoption_min_ver 0.9
+%global phpoption_max_ver 2.0
+
+Name: php-JMSParser
+Version: %{github_version}
+Release: 2%{?dist}
+Summary: Library for writing recursive-descent parsers
+
+Group: Development/Libraries
+License: ASL 2.0
+URL: http://jmsyst.com/libs/%{github_name}
+# To create source:
+# wget https://github.com/schmittjoh/parser-lib/archive/%%{github_commit}.tar.gz
+# php-JMSParser-strip.sh %%{github_version} %%{github_commit}
+Source0: %{name}-%{github_version}-%{github_commit}.tar.gz
+
+BuildArch: noarch
+# Test build requires
+BuildRequires: php(language) >= %{php_min_ver}
+BuildRequires: php-pear(pear.phpunit.de/PHPUnit)
+BuildRequires: php-PhpOption >= %{phpoption_min_ver}
+BuildRequires: php-PhpOption < %{phpoption_max_ver}
+# Test build requires: phpci
+BuildRequires: php-json
+BuildRequires: php-pcre
+BuildRequires: php-reflection
+BuildRequires: php-spl
+
+Requires: php(language) >= %{php_min_ver}
+Requires: php-PhpOption >= %{phpoption_min_ver}
+Requires: php-PhpOption < %{phpoption_max_ver}
+# phpci requires
+Requires: php-json
+Requires: php-pcre
+Requires: php-reflection
+Requires: php-spl
+
+%description
+%{summary}.
+
+
+%prep
+%setup -q -n %{github_name}-%{github_commit}
+
+# Rewrite tests' bootstrap (which uses Composer autoloader) with simple
+# autoloader that uses include path
+( cat <<'AUTOLOAD'
+<?php
+spl_autoload_register(function ($class) {
+ $src = str_replace('\\', '/', str_replace('_', '/', $class)).'.php';
+ @include_once $src;
+});
+AUTOLOAD
+) > tests/bootstrap.php
+
+
+%build
+# Empty build section, nothing to build
+
+
+%install
+mkdir -p -m 755 %{buildroot}%{_datadir}/php/JMS
+cp -rp src/JMS/Parser %{buildroot}%{_datadir}/php/JMS/
+
+
+%check
+%{_bindir}/phpunit \
+ -d include_path="./src:./tests:.:%{pear_phpdir}:%{_datadir}/php" \
+ -c phpunit.xml.dist
+
+
+%files
+%doc LICENSE README.md composer.json
+%dir %{_datadir}/php/JMS
+ %{_datadir}/php/JMS/Parser
+
+
+%changelog
+* Sat Mar 16 2013 Shawn Iwinski <shawn.iwinski at gmail.com> 1.0.0-2
+- Added phpoption_min_ver and phpoption_max_ver globals
+- Bad licensed files stripped from source
+- php-common => php(language)
+- Removed tests sub-package
+
+* Thu Jan 24 2013 Shawn Iwinski <shawn.iwinski at gmail.com> 1.0.0-1
+- Initial package
diff --git a/sources b/sources
index e69de29..65703d9 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+316195915acae997454a62d56702f3d5 php-JMSParser-1.0.0-c509473bc1b4866415627af0e1c6cc8ac97fa51d.tar.gz
More information about the scm-commits
mailing list