diff options
author | Remi Collet <remi@remirepo.net> | 2024-10-17 14:44:10 +0200 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2024-10-17 14:44:10 +0200 |
commit | 1bcdab02f576f0224ce04e6ed649312aa7c85395 (patch) | |
tree | cb66822119b524a6869c6993369566ba2f11c24b | |
parent | f9793aa9e294dee99c3a0e5da795c7b87a4420bf (diff) |
-rw-r--r-- | php-pecl-pq.spec | 40 |
1 files changed, 10 insertions, 30 deletions
diff --git a/php-pecl-pq.spec b/php-pecl-pq.spec index f87d346..adad0ab 100644 --- a/php-pecl-pq.spec +++ b/php-pecl-pq.spec @@ -28,11 +28,7 @@ Source0: https://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz License: BSD-2-Clause URL: https://pecl.php.net/package/%{pecl_name} -%if 0%{?fedora} >= 29 || 0%{?rhel} >= 8 BuildRequires: libpq-devel > 9 -%else -BuildRequires: postgresql-devel > 9 -%endif BuildRequires: make BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel >= 7.0 @@ -74,7 +70,7 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO # Don't install tests sed -e '/role="test"/d' \ - %{?_licensedir: -e '/LICENSE/s/role="doc"/role="src"/' }\ + -e '/LICENSE/s/role="doc"/role="src"/' \ -i package.xml cd %{sources} @@ -103,26 +99,30 @@ EOF cd %{sources} %{__phpize} +[ -f Makefile.global ] && GLOBAL=Makefile.global || GLOBAL=build/Makefile.global +sed -e 's/INSTALL_ROOT/DESTDIR/' -i $GLOBAL cd ../NTS %configure \ --with-libdir=%{_lib} \ --with-php-config=%{__phpconfig} -make %{?_smp_mflags} + +%make_build %if %{with_zts} cd ../ZTS %configure \ --with-libdir=%{_lib} \ --with-php-config=%{__ztsphpconfig} -make %{?_smp_mflags} + +%make_build %endif %install %{?dtsenable} -make -C NTS install INSTALL_ROOT=%{buildroot} +%make_install -C NTS # install config file install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} @@ -131,7 +131,7 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml %if %{with_zts} -make -C ZTS install INSTALL_ROOT=%{buildroot} +%make_install -C ZTS install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} %endif @@ -142,26 +142,6 @@ do install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i done -%if 0%{?fedora} < 24 && 0%{?rhel} < 8 -# when pear installed alone, after us -%triggerin -- %{?scl_prefix}php-pear -if [ -x %{__pecl} ] ; then - %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : -fi - -# posttrans as pear can be installed after us -%posttrans -if [ -x %{__pecl} ] ; then - %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : -fi - -%postun -if [ $1 -eq 0 -a -x %{__pecl} ] ; then - %{pecl_uninstall} %{pecl_name} >/dev/null || : -fi -%endif - - %check : ignore tests with erratic results rm %{sources}/tests/cancel001.phpt @@ -228,7 +208,7 @@ exit $RET %files %doc %{pecl_docdir}/%{pecl_name} -%{?_licensedir:%license %{sources}/LICENSE} +%license %{sources}/LICENSE %{pecl_xmldir}/%{name}.xml %config(noreplace) %{php_inidir}/%{ini_name} |