summaryrefslogtreecommitdiffstats
path: root/php-pecl-judy.spec
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2014-04-22 17:02:37 +0200
committerRemi Collet <fedora@famillecollet.com>2014-04-22 17:02:37 +0200
commitfee0e657743290cfbcc4998ce01d7f7459d64ce8 (patch)
treea51e4990cdb8b10425fa42d51ad2ebc61e75734f /php-pecl-judy.spec
parentffd730cd0be591a8f489b7691e0da1637d0d95cf (diff)
php-pecl-judy: package approved, switch spec
Diffstat (limited to 'php-pecl-judy.spec')
-rw-r--r--php-pecl-judy.spec66
1 files changed, 52 insertions, 14 deletions
diff --git a/php-pecl-judy.spec b/php-pecl-judy.spec
index 7469669..ce9299c 100644
--- a/php-pecl-judy.spec
+++ b/php-pecl-judy.spec
@@ -6,6 +6,7 @@
#
# Please, preserve the changelog entries
#
+%{?scl: %scl_package php-pecl-judy}
%{!?php_inidir: %global php_inidir %{_sysconfdir}/php.d}
%{!?php_incldir: %global php_incldir %{_includedir}/php}
%{!?__pecl: %global __pecl %{_bindir}/pecl}
@@ -14,38 +15,62 @@
%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: php-pecl-judy
+Name: %{?scl_prefix}php-pecl-judy
Version: 1.0.2
-Release: 2%{?dist}
+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}
Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz
-BuildRequires: php-devel > 5.3
-BuildRequires: php-pear
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildRequires: %{?scl_prefix}php-devel > 5.3
+BuildRequires: %{?scl_prefix}php-pear
BuildRequires: Judy-devel
BuildRequires: pcre-devel
Requires(post): %{__pecl}
Requires(postun): %{__pecl}
-Requires: php(zend-abi) = %{php_zend_api}
-Requires: php(api) = %{php_core_api}
+Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
+Requires: %{?scl_prefix}php(api) = %{php_core_api}
%if "%{php_version}" < "5.4"
# php 5.3.3 in EL-6 don't use arched virtual provides
# so only requires real packages instead
-Requires: php-common%{?_isa}
+Requires: %{?scl_prefix}php-common%{?_isa}
%else
-Requires: php-spl%{?_isa}
+Requires: %{?scl_prefix}php-spl%{?_isa}
%endif
-Provides: php-%{ext_name} = %{version}
-Provides: php-%{ext_name}%{?_isa} = %{version}
-Provides: php-pecl(%{pecl_name}) = %{version}
-Provides: php-pecl(%{pecl_name})%{?_isa} = %{version}
+Provides: %{?scl_prefix}php-%{ext_name} = %{version}
+Provides: %{?scl_prefix}php-%{ext_name}%{?_isa} = %{version}
+Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version}
+Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
+
+# Package have been renamed
+Obsoletes: %{?scl_prefix}php-pecl-Judy < 1.0.1
+Provides: %{?scl_prefix}php-pecl-Judy = %{version}-%{release}
+
+%if "%{?vendor}" == "Remi Collet"
+# Other third party repo stuff
+%if "%{php_version}" > "5.4"
+Obsoletes: php53-pecl-%{pecl_name}
+Obsoletes: php53u-pecl-%{pecl_name}
+Obsoletes: php54-pecl-%{pecl_name}
+%endif
+%if "%{php_version}" > "5.5"
+Obsoletes: php55u-pecl-%{pecl_name}
+%endif
+%if "%{php_version}" > "5.6"
+Obsoletes: php56u-pecl-%{pecl_name}
+%endif
+%endif
%if 0%{?fedora} < 20 && 0%{?rhel} < 7
# Filter shared private
@@ -66,7 +91,10 @@ benefits are scalability, high performance, and memory efficiency.
Summary: %{name} developer files (header)
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
-Requires: php-devel%{?_isa}
+Requires: %{?scl_prefix}php-devel%{?_isa}
+# Package have been renamed
+Obsoletes: %{?scl_prefix}php-pecl-Judy-devel < 1.0.1
+Provides: %{?scl_prefix}php-pecl-Judy-devel = %{version}-%{release}
%description devel
These are the files needed to compile programs using %{name}.
@@ -118,6 +146,8 @@ make %{?_smp_mflags}
%install
+rm -rf %{buildroot}
+
make -C NTS install INSTALL_ROOT=%{buildroot}
# install config file
@@ -182,12 +212,15 @@ REPORT_EXIT_STATUS=1 \
%endif
+%clean
+rm -rf %{buildroot}
+
+
%files
%defattr(-,root,root,-)
%doc %{pecl_docdir}/%{pecl_name}
%exclude %{pecl_docdir}/%{pecl_name}/examples
%{pecl_xmldir}/%{name}.xml
-
%config(noreplace) %{php_inidir}/%{ini_name}
%{php_extdir}/%{ext_name}.so
@@ -198,6 +231,7 @@ REPORT_EXIT_STATUS=1 \
%files devel
+%defattr(-,root,root,-)
%doc %{pecl_testdir}/%{pecl_name}
%doc %{pecl_docdir}/%{pecl_name}/examples
%{php_incldir}/ext/%{ext_name}
@@ -210,6 +244,10 @@ REPORT_EXIT_STATUS=1 \
%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
* Sun Nov 03 2013 Remi Collet <remi@fedoraproject.org> - 1.0.2-1
- Update to 1.0.2 (stable)