#1 Add conditional for building with bundled libmongoc
Closed 4 years ago by remi. Opened 4 years ago by carlwgeorge.
rpms/ carlwgeorge/php-pecl-mongodb bcond-libmongoc  into  master

file modified
+8
@@ -18,6 +18,8 @@ 

  # After 40-smbclient.ini, see https://jira.mongodb.org/browse/PHPC-658

  %global ini_name   50-%{pecl_name}.ini

  

+ %bcond_without libmongoc

+ 

  Summary:        MongoDB driver for PHP

  Name:           php-pecl-%{pecl_name}

  %global upstream_version 1.5.5
@@ -33,8 +35,10 @@ 

  BuildRequires:  php-devel > 5.5

  BuildRequires:  php-pear

  BuildRequires:  php-json

+ %if %{with libmongoc}

  BuildRequires:  pkgconfig(libbson-1.0)    >= 1.13

  BuildRequires:  pkgconfig(libmongoc-1.0)  >= 1.13

+ %endif

  

  Requires:       php(zend-abi) = %{php_zend_api}

  Requires:       php(api) = %{php_core_api}
@@ -91,12 +95,16 @@ 

  

    # Ensure we use system library

    # Need to be removed only after phpize because of m4_include

+   %if %{with libmongoc}

    rm -r src/libmongoc

+   %endif

  

    %configure \

      --with-php-config=%{_bindir}/${1}-config \

+     %if %{with libmongoc}

      --with-libbson \

      --with-libmongoc \

+     %endif

      --enable-mongodb

  

    make %{?_smp_mflags}

no initial comment

Sorry, but I don't want to maintain unused stuff in spec file.

I also need more conditions, and have to maintain various spec file, because some are not allowed in Fedora

If you need this conditions, use another upstream than Fedora ;)

Pull-Request has been closed by remi

4 years ago