From e51383139ca5dd37e3c097b4f73ec64c1fdbb686 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 2 Nov 2015 18:27:17 +0100 Subject: php-mongodb: git snapshot for compatibility with driver 1.0.0 --- php-mongodb.spec | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) (limited to 'php-mongodb.spec') diff --git a/php-mongodb.spec b/php-mongodb.spec index 561f0c7..2d4c791 100644 --- a/php-mongodb.spec +++ b/php-mongodb.spec @@ -6,20 +6,26 @@ # # Please, preserve the changelog entries # -%global gh_commit 39cb5bf858b7989f16b4f1c960f08fb4349fa666 +%global gh_commit a3c0b97b23ea8b111e332055cfd5d072312fd9e1 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner mongodb -#global gh_date 20150820 +%global gh_date 20151102 %global gh_project mongo-php-library -# Test suite not ready -# see https://github.com/mongodb/mongo-php-library/issues/41 +%if 0%{?fedora} >= 21 || 0%{?rhel} >= 6 +%global with_tests 0%{!?_without_tests:1} +%else %global with_tests 0%{?_with_tests:1} +%endif %global psr0 MongoDB -%global prever alpha1 +#global prever alpha1 Name: php-%{gh_owner} Version: 1.0.0 +%if 0%{?gh_date} +Release: 0.2.%{gh_date}git%{gh_short}%{?dist} +%else Release: 0.1.%{prever}%{?dist} +%endif Summary: MongoDB driver library Group: Development/Libraries @@ -29,6 +35,7 @@ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit # Autoloader Source1: %{name}-autoload.php +Patch0: %{name}-autoload.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -38,7 +45,7 @@ BuildRequires: php-reflection BuildRequires: php-spl BuildRequires: php-pecl(mongodb) BuildRequires: php-composer(phpunit/phpunit) -BuildRequires: mongodb-server +BuildRequires: mongodb-server >= 2.4 # For autoloader BuildRequires: php-composer(symfony/class-loader) %endif @@ -76,6 +83,7 @@ To use this library, you just have to add, in your project: %setup -q -n %{gh_project}-%{gh_commit} cp %{SOURCE1} src/autoload.php +%patch0 -p0 %build @@ -92,13 +100,19 @@ cp -pr src %{buildroot}%{_datadir}/php/%{psr0} %if %{with_tests} : Run a server mkdir dbtest + +: Choose a port to allow parallel build +port=$(php -r 'echo (27010+PHP_INT_SIZE);') + mongod \ --journal \ --logpath $PWD/server.log \ --pidfilepath $PWD/server.pid \ --dbpath $PWD/dbtest \ + --port $port \ --fork +sed -e "s/27017/$port/" phpunit.xml.dist >phpunit.xml cat << 'EOF' | tee tests/bootstrap.php - 1.0.0-0.2.20151102gita3c0b97 +- git snapshot + * Sat Oct 31 2015 Remi Collet - 1.0.0-0.1.alpha1 - initial package \ No newline at end of file -- cgit