diff options
-rw-r--r-- | php-pecl-couchbase4.spec | 74 |
1 files changed, 38 insertions, 36 deletions
diff --git a/php-pecl-couchbase4.spec b/php-pecl-couchbase4.spec index 2366079..3868977 100644 --- a/php-pecl-couchbase4.spec +++ b/php-pecl-couchbase4.spec @@ -27,7 +27,7 @@ Summary: Couchbase Server PHP extension Name: %{?scl_prefix}php-pecl-couchbase4 Version: 4.1.2 -Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} # Apache-2.0 # src # third_party/json/LICENSE.ryu @@ -115,33 +115,36 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO %prep %setup -q -c -mv %{pecl_name}-%{version}%{?prever} NTS - %{?_licensedir:sed -e '/LICENSE/s/role="doc"/role="src"/;/COPYING/s/role="doc"/role="src"/' -i package.xml} +: Collect license files mkdir lic -cp NTS/src/deps/couchbase-cxx-client/third_party/hdr_histogram_c/COPYING.txt lic/hdr_histogram_c_COPYING.txt -cp NTS/src/deps/couchbase-cxx-client/third_party/snappy/COPYING lic/snappy_COPYING -cp NTS/src/deps/couchbase-cxx-client/third_party/fmt/LICENSE.rst lic/fmt_LICENSE.rst -cp NTS/src/deps/couchbase-cxx-client/third_party/gsl/LICENSE lic/gsl_LICENSE -cp NTS/src/deps/couchbase-cxx-client/third_party/hdr_histogram_c/LICENSE.txt lic/hdr_histogram_c_LICENSE.txt -cp NTS/src/deps/couchbase-cxx-client/third_party/http_parser/LICENSE-MIT lic/http_parser_LICENSE-MIT -cp NTS/src/deps/couchbase-cxx-client/third_party/json/external/PEGTL/LICENSE lic/PEGTL_LICENSE -cp NTS/src/deps/couchbase-cxx-client/third_party/json/LICENSE lic/json_LICENSE -cp NTS/src/deps/couchbase-cxx-client/third_party/json/LICENSE.double-conversion lic/json_LICENSE.double-conversion -cp NTS/src/deps/couchbase-cxx-client/third_party/json/LICENSE.itoa lic/json_LICENSE.itoa -cp NTS/src/deps/couchbase-cxx-client/third_party/json/LICENSE.ryu lic/json_LICENSE.ryu -cp NTS/src/deps/couchbase-cxx-client/third_party/jsonsl/LICENSE lic/jsonsl_LICENSE -cp NTS/src/deps/couchbase-cxx-client/third_party/spdlog/LICENSE lic/spdlog_LICENSE -cp NTS/src/deps/couchbase-cxx-client/LICENSE.txt lic/LICENSE.txt - -cd NTS +cd %{pecl_name}-%{version}%{?prever} +cp src/deps/couchbase-cxx-client/third_party/hdr_histogram_c/COPYING.txt ../lic/hdr_histogram_c_COPYING.txt +cp src/deps/couchbase-cxx-client/third_party/snappy/COPYING ../lic/snappy_COPYING +cp src/deps/couchbase-cxx-client/third_party/fmt/LICENSE.rst ../lic/fmt_LICENSE.rst +cp src/deps/couchbase-cxx-client/third_party/gsl/LICENSE ../lic/gsl_LICENSE +cp src/deps/couchbase-cxx-client/third_party/hdr_histogram_c/LICENSE.txt ../lic/hdr_histogram_c_LICENSE.txt +cp src/deps/couchbase-cxx-client/third_party/http_parser/LICENSE-MIT ../lic/http_parser_LICENSE-MIT +cp src/deps/couchbase-cxx-client/third_party/json/external/PEGTL/LICENSE ../lic/PEGTL_LICENSE +cp src/deps/couchbase-cxx-client/third_party/json/LICENSE ../lic/json_LICENSE +cp src/deps/couchbase-cxx-client/third_party/json/LICENSE.double-conversion ../lic/json_LICENSE.double-conversion +cp src/deps/couchbase-cxx-client/third_party/json/LICENSE.itoa ../lic/json_LICENSE.itoa +cp src/deps/couchbase-cxx-client/third_party/json/LICENSE.ryu ../lic/json_LICENSE.ryu +cp src/deps/couchbase-cxx-client/third_party/jsonsl/LICENSE ../lic/jsonsl_LICENSE +cp src/deps/couchbase-cxx-client/third_party/spdlog/LICENSE ../lic/spdlog_LICENSE +cp src/deps/couchbase-cxx-client/LICENSE.txt ../lic/LICENSE.txt + %if 0%{?rhel} == 7 +: Switch to cmake3 sed -e 's/cmake/cmake3/' -i config.m4 %endif +: Build wrapper only once +sed -e 's:/cmake-build:/../cmake-build:' -i config.m4 +: Parallel build sed -e 's/--verbose/%{?_smp_mflags} --verbose/' -i Makefile.frag -# Sanity check, really often broken +: Sanity check as really often broken extver=$(sed -n '/#define PHP_COUCHBASE_VERSION/{s/.* "//;s/".*$//;p}' src/php_couchbase.hxx) if test "x${extver}" != "x%{version}%{?prever}"; then : Error: Upstream extension version is ${extver}, expecting %{version}%{?prever} @@ -149,6 +152,7 @@ if test "x${extver}" != "x%{version}%{?prever}"; then fi cd .. +: Configuration file cat << 'EOF' | tee %{ini_name} ; Enable %{pecl_name} extension module extension=%{pecl_name}.so @@ -162,32 +166,27 @@ extension=%{pecl_name}.so ;couchbase.log_path = EOF -%if 0%{?__ztsphp:1} -# duplicate for ZTS build -cp -pr NTS ZTS -%else -: Only NTS build, no ZTS +mkdir NTS +%if %{with_zts} +mkdir ZTS %endif +%global _configure ../%{pecl_name}-%{version}%{?prever}/configure + %build %{?dtsenable} -peclconf() { -%configure \ - --with-system-fastlz \ - --with-php-config=$1 -} - -cd NTS +cd %{pecl_name}-%{version}%{?prever} %{_bindir}/phpize -peclconf %{_bindir}/php-config + +cd ../NTS +%configure --with-php-config=%{_bindir}/php-config make %{?_smp_mflags} %if %{with_zts} cd ../ZTS -%{_bindir}/zts-phpize -peclconf %{_bindir}/zts-php-config +%configure --with-php-config=%{_bindir}/zts-php-config make %{?_smp_mflags} %endif @@ -209,7 +208,7 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml # Test & Documentation -cd NTS +cd %{pecl_name}-%{version}%{?prever} for i in $(grep 'role="doc"' ../package.xml | sed -e 's/^.*name="//;s/".*$//') do install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i done @@ -270,6 +269,9 @@ fi %changelog +* Wed Mar 22 2023 Remi Collet <remi@remirepo.net> - 4.1.2-2 +- build out of sources tree + * Mon Mar 20 2023 Remi Collet <remi@remirepo.net> - 4.1.2-1 - update to 4.1.2 |