diff options
author | Remi Collet <fedora@famillecollet.com> | 2014-04-16 13:36:55 +0200 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2014-04-16 13:36:55 +0200 |
commit | ffd730cd0be591a8f489b7691e0da1637d0d95cf (patch) | |
tree | bbe69b7b1e6c2ec0c66b1e9d3b98e1f31c373f05 | |
parent | 1d42b8bd8165a995955baa987f4f35884fc765b0 (diff) |
php-pecl-judy: use %ini_name
-rw-r--r-- | php-pecl-judy-dev.spec | 27 | ||||
-rw-r--r-- | php-pecl-judy.spec | 22 |
2 files changed, 31 insertions, 18 deletions
diff --git a/php-pecl-judy-dev.spec b/php-pecl-judy-dev.spec index 9b66dd2..ce9299c 100644 --- a/php-pecl-judy-dev.spec +++ b/php-pecl-judy-dev.spec @@ -12,14 +12,19 @@ %{!?__pecl: %global __pecl %{_bindir}/pecl} %{!?__php: %global __php %{_bindir}/php} -%global with_zts 0%{?__ztsphp:1} -%global pecl_name Judy -%global ext_name judy +%global with_zts 0%{?__ztsphp:1} +%global pecl_name Judy +%global ext_name judy +%if "%{php_version}" < "5.6" +%global ini_name %{ext_name}.ini +%else +%global ini_name 40-%{ext_name}.ini +%endif Summary: PHP Judy implements sparse dynamic arrays Name: %{?scl_prefix}php-pecl-judy Version: 1.0.2 -Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} +Release: 2%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} License: PHP Group: Development/Languages URL: http://pecl.php.net/package/%{pecl_name} @@ -114,7 +119,7 @@ cp -pr NTS ZTS %endif # Create configuration file -cat > %{pecl_name}.ini << 'EOF' +cat << 'EOF' | tee %{ini_name} ; Enable %{pecl_name} extension module extension=%{ext_name}.so EOF @@ -146,7 +151,7 @@ rm -rf %{buildroot} make -C NTS install INSTALL_ROOT=%{buildroot} # install config file -install -D -m 644 %{pecl_name}.ini %{buildroot}%{php_inidir}/%{ext_name}.ini +install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} # Install XML package description install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml @@ -154,7 +159,7 @@ install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml %if %{with_zts} make -C ZTS install INSTALL_ROOT=%{buildroot} -install -D -m 644 %{pecl_name}.ini %{buildroot}%{php_ztsinidir}/%{ext_name}.ini +install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} %endif # Test & Documentation @@ -216,11 +221,11 @@ rm -rf %{buildroot} %doc %{pecl_docdir}/%{pecl_name} %exclude %{pecl_docdir}/%{pecl_name}/examples %{pecl_xmldir}/%{name}.xml -%config(noreplace) %{php_inidir}/%{ext_name}.ini +%config(noreplace) %{php_inidir}/%{ini_name} %{php_extdir}/%{ext_name}.so %if %{with_zts} -%config(noreplace) %{php_ztsinidir}/%{ext_name}.ini +%config(noreplace) %{php_ztsinidir}/%{ini_name} %{php_ztsextdir}/%{ext_name}.so %endif @@ -237,6 +242,10 @@ rm -rf %{buildroot} %changelog +* Wed Apr 16 2014 Remi Collet <remi@fedoraproject.org> - 1.0.2-2 +- use %%{ini_name} macro +- add numerical prefix to extension configuration file + * Fri Nov 29 2013 Remi Collet <rcollet@redhat.com> - 1.0.2-1 - adapt for SCL diff --git a/php-pecl-judy.spec b/php-pecl-judy.spec index 5d8b8a4..7469669 100644 --- a/php-pecl-judy.spec +++ b/php-pecl-judy.spec @@ -11,14 +11,15 @@ %{!?__pecl: %global __pecl %{_bindir}/pecl} %{!?__php: %global __php %{_bindir}/php} -%global with_zts 0%{?__ztsphp:1} -%global pecl_name Judy -%global ext_name judy +%global with_zts 0%{?__ztsphp:1} +%global pecl_name Judy +%global ext_name judy +%global ini_name %{ext_name}.ini Summary: PHP Judy implements sparse dynamic arrays Name: php-pecl-judy Version: 1.0.2 -Release: 1 +Release: 2%{?dist} License: PHP Group: Development/Languages URL: http://pecl.php.net/package/%{pecl_name} @@ -90,7 +91,7 @@ cp -pr NTS ZTS %endif # Create configuration file -cat > %{pecl_name}.ini << 'EOF' +cat << 'EOF' | tee %{ini_name} ; Enable %{pecl_name} extension module extension=%{ext_name}.so EOF @@ -120,7 +121,7 @@ make %{?_smp_mflags} make -C NTS install INSTALL_ROOT=%{buildroot} # install config file -install -D -m 644 %{pecl_name}.ini %{buildroot}%{php_inidir}/%{ext_name}.ini +install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} # Install XML package description install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml @@ -128,7 +129,7 @@ install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml %if %{with_zts} make -C ZTS install INSTALL_ROOT=%{buildroot} -install -D -m 644 %{pecl_name}.ini %{buildroot}%{php_ztsinidir}/%{ext_name}.ini +install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} %endif # Test & Documentation @@ -187,11 +188,11 @@ REPORT_EXIT_STATUS=1 \ %exclude %{pecl_docdir}/%{pecl_name}/examples %{pecl_xmldir}/%{name}.xml -%config(noreplace) %{php_inidir}/%{ext_name}.ini +%config(noreplace) %{php_inidir}/%{ini_name} %{php_extdir}/%{ext_name}.so %if %{with_zts} -%config(noreplace) %{php_ztsinidir}/%{ext_name}.ini +%config(noreplace) %{php_ztsinidir}/%{ini_name} %{php_ztsextdir}/%{ext_name}.so %endif @@ -207,6 +208,9 @@ REPORT_EXIT_STATUS=1 \ %changelog +* Wed Apr 16 2014 Remi Collet <remi@fedoraproject.org> - 1.0.2-2 +- use %%{ini_name} macro + * Sun Nov 03 2013 Remi Collet <remi@fedoraproject.org> - 1.0.2-1 - Update to 1.0.2 (stable) |