%global github_owner sdboyer %global github_name gliph %global github_version 0.1.4 %global github_commit aad932ef7d808105341cc9a36538e9fe2cb5ee82 %global lib_name Gliph %global php_min_ver 5.3.0 Name: php-%{github_name} Version: %{github_version} Release: 1%{?dist} Summary: A graph library for PHP Group: Development/Libraries License: MIT URL: https://github.com/%{github_owner}/%{github_name} Source0: %{url}/archive/%{github_commit}/%{name}-%{version}-%{github_commit}.tar.gz BuildArch: noarch # For tests BuildRequires: php-common >= %{php_min_ver} BuildRequires: php-pear(pear.phpunit.de/PHPUnit) # For tests: phpcompatinfo BuildRequires: php-reflection BuildRequires: php-spl Requires: php-common >= %{php_min_ver} # phpcompatinfo Requires: php-spl %description Gliph is a graph library for PHP. It provides graph building blocks and data structures for use by other PHP applications. It is (currently) designed for use with in-memory graphs, not for interaction with a graph database like Neo4J (http://neo4j.org/). %prep %setup -q -n %{github_name}-%{github_commit} # Create PHPUnit bootstrap for tests ( cat <<'BOOTSTRAP' bootstrap.php # Create phpunit.xml with updated PHPUnit bootstrap and no colors cat phpunit.xml.dist | \ sed -e 's#tests/bootstrap.php#bootstrap.php#' \ -e 's#colors="true"#colors="false"#' > \ phpunit.xml %build # Empty build section, nothing to build %install mkdir -p -m 755 %{buildroot}%{_datadir}/php cp -rp src/%{lib_name} %{buildroot}%{_datadir}/php/ %check %{_bindir}/phpunit -d include_path="./src:./tests:.:%{pear_phpdir}" %files %doc README.md composer.json %{_datadir}/php/%{lib_name} %changelog * Wed Oct 23 2013 Shawn Iwinski - 0.1.4-1 - Initial package