[php-Pimple] Initial import (#882418)

Shawn Iwinski siwinski at fedoraproject.org
Sun Dec 2 19:57:53 UTC 2012


commit a94ac64157bc568b1f5755063298209bd2803964
Author: Shawn Iwinski <shawn.iwinski at gmail.com>
Date:   Sun Dec 2 14:21:32 2012 -0500

    Initial import (#882418)

 .gitignore      |    1 +
 php-Pimple.spec |   71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 sources         |    1 +
 3 files changed, 73 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..e5a5466 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/v1.0.0.tar.gz
diff --git a/php-Pimple.spec b/php-Pimple.spec
new file mode 100644
index 0000000..a149636
--- /dev/null
+++ b/php-Pimple.spec
@@ -0,0 +1,71 @@
+%global libname     Pimple
+%global php_min_ver 5.3.0
+
+Name:          php-%{libname}
+Version:       1.0.0
+Release:       1%{?dist}
+Summary:       A simple Dependency Injection Container for PHP 5.3
+
+Group:         Development/Libraries
+License:       MIT
+URL:           http://pimple.sensiolabs.org
+Source0:       https://github.com/fabpot/%{libname}/archive/v%{version}.tar.gz
+
+
+BuildArch: noarch
+# Test requires
+BuildRequires: php-common >= %{php_min_ver}
+BuildRequires: php-pear(pear.phpunit.de/PHPUnit)
+# Test requires: phpci
+BuildRequires: php-spl
+
+Requires:      php-common >= %{php_min_ver}
+# phpci requires
+Requires:      php-spl
+
+%description
+Pimple is a small Dependency Injection Container for PHP 5.3 that consists of
+just one file and one class.
+
+
+%prep
+%setup -q -n %{libname}-%{version}
+
+# Update and move tests' PHPUnit config
+sed 's#tests/##' -i phpunit.xml.dist
+mv phpunit.xml.dist tests/
+
+# Update tests' require
+sed "s#.*require.*Pimple.php.*#require_once '%{_datadir}/php/%{libname}/Pimple.php';#" \
+    -i tests/bootstrap.php
+
+
+%build
+# Empty build section, nothing to build
+
+
+%install
+mkdir -p -m 755 %{buildroot}%{_datadir}/php/%{libname}
+cp -pr lib/* %{buildroot}%{_datadir}/php/%{libname}/
+
+mkdir -p -m 755 %{buildroot}%{_datadir}/tests/%{name}
+cp -pr tests/* %{buildroot}%{_datadir}/tests/%{name}/
+
+
+%check
+# Update tests' require to use buildroot
+sed 's#%{_datadir}#%{buildroot}%{_datadir}#' -i tests/bootstrap.php
+
+%{_bindir}/phpunit -c tests/phpunit.xml.dist
+
+
+%files
+%doc LICENSE README.rst composer.json
+%{_datadir}/php/%{libname}
+%dir %{_datadir}/tests
+     %{_datadir}/tests/%{name}
+
+
+%changelog
+* Fri Nov 30 2012 Shawn Iwinski <shawn.iwinski at gmail.com> 1.0.0-1
+- Initial package
diff --git a/sources b/sources
index e69de29..1581d71 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+5ea3f9f289b32b592f84777cbb4fdd41  v1.0.0.tar.gz


More information about the scm-commits mailing list