]> git.pld-linux.org Git - packages/php-pecl-mongodb.git/blobdiff - php-pecl-mongodb.spec
consistent build: --with-mongodb-sasl
[packages/php-pecl-mongodb.git] / php-pecl-mongodb.spec
index f56150553dd45cdc6b0084396c7ad173c010e6db..a6c49a7858e84a5af1874e6c9a4aed21edfa1fa3 100644 (file)
@@ -1,3 +1,7 @@
+# TODO
+# - ix86/x32 (php -m) prints::
+#   src/mongoc/mongoc-handshake.c:478 _append_and_truncate(): precondition failed: space_for_suffix >= 0
+#   Aborted
 #
 # Conditional build:
 %bcond_without tests           # build without tests
@@ -15,19 +19,22 @@ Source0:    https://pecl.php.net/get/%{modname}-%{version}.tgz
 Source1:       mongodb.ini
 Patch0:                tests.patch
 URL:           https://pecl.php.net/package/mongodb
+BuildRequires: %{php_name}-cli
 BuildRequires: %{php_name}-devel >= 4:5.4.0
-BuildRequires: rpmbuild(macros) >= 1.666
-%if %{with tests}
 BuildRequires: %{php_name}-json
+BuildRequires: %{php_name}-pcre
 BuildRequires: %{php_name}-spl
-%endif
 BuildRequires: cyrus-sasl-devel
-BuildRequires: libbson-devel >= 1.5
-BuildRequires: mongo-c-driver-devel >= 1.5
+BuildRequires: libbson-devel >= 1.5.0
+BuildRequires: mongo-c-driver-devel >= 1.5.0
 BuildRequires: openssl-devel
+BuildRequires: rpmbuild(macros) >= 1.666
 Requires:      %{php_name}-json
+Requires:      %{php_name}-pcre
+Requires:      %{php_name}-spl
 %{?requires_php_extension}
 Provides:      php(%{modname}) = %{version}
+ExcludeArch:   %{ix86} x32
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -58,6 +65,7 @@ phpize
 %configure \
        --with-libbson \
        --with-libmongoc \
+       --with-mongodb-sasl \
        --enable-mongodb
 
 %{__make}
@@ -65,8 +73,9 @@ phpize
 # simple module load test, always enabled
 %{__php} -n -q \
        -d extension_dir=modules \
-       -d extension=%{php_extensiondir}/json.so \
+       -d extension=%{php_extensiondir}/pcre.so \
        -d extension=%{php_extensiondir}/spl.so \
+       -d extension=%{php_extensiondir}/json.so \
        -d extension=%{modname}.so \
        -m > modules.log
 grep %{modname} modules.log
@@ -77,7 +86,7 @@ cat <<'EOF' > run-tests.sh
 export NO_INTERACTION=1 REPORT_EXIT_STATUS=1 MALLOC_CHECK_=2
 exec %{__make} test \
        PHP_EXECUTABLE=%{__php} \
-       PHP_TEST_SHARED_SYSTEM_EXTENSIONS="json spl" \
+       PHP_TEST_SHARED_SYSTEM_EXTENSIONS="pcre spl json" \
        RUN_TESTS_SETTINGS="-q $*"
 EOF
 chmod +x run-tests.sh
@@ -92,7 +101,7 @@ rm -rf $RPM_BUILD_ROOT
        INSTALL_ROOT=$RPM_BUILD_ROOT
 
 install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
-cp -p %{SOURCE1}.ini $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
+cp -p %{SOURCE1} $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
 
 %clean
 rm -rf $RPM_BUILD_ROOT
This page took 0.14436 seconds and 4 git commands to generate.