summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2014-03-24 18:04:38 +0100
committerRemi Collet <fedora@famillecollet.com>2014-03-24 18:04:38 +0100
commit29d4bc4a4d20c3c007a120162a2f8bfdb2b042d7 (patch)
treecff12f6b89310582da9e872286868111bb79f7c0
parent69d38c57f6c4daf574f2fdf2dd7d62154056a4d4 (diff)
php-pecl-uri-template: allow SCL build
-rw-r--r--php-pecl-uri-template.spec44
1 files changed, 31 insertions, 13 deletions
diff --git a/php-pecl-uri-template.spec b/php-pecl-uri-template.spec
index 9123f1f..efbf57b 100644
--- a/php-pecl-uri-template.spec
+++ b/php-pecl-uri-template.spec
@@ -6,34 +6,49 @@
#
# Please, preserve the changelog entries
#
-%{!?php_inidir: %{expand: %%global php_inidir %{_sysconfdir}/php.d}}
-%{!?__pecl: %{expand: %%global __pecl %{_bindir}/pecl}}
+%{?scl: %scl_package php-pecl-uri-template}
+%{!?php_inidir: %global php_inidir %{_sysconfdir}/php.d}
+%{!?__pecl: %global __pecl %{_bindir}/pecl}
+%{!?__php: %global __php %{_bindir}/php}
%global with_zts 0%{?__ztsphp:1}
%global pecl_name uri_template
Summary: URI Template PHP Extension
-Name: php-pecl-uri-template
+Name: %{?scl_prefix}php-pecl-uri-template
Version: 1.0
-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}
Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildRequires: php-devel
-BuildRequires: php-pear
+BuildRequires: %{?scl_prefix}php-devel
+BuildRequires: %{?scl_prefix}php-pear
Requires(post): %{__pecl}
Requires(postun): %{__pecl}
-Requires: php(zend-abi) = %{php_zend_api}
-Requires: php(api) = %{php_core_api}
-
-Provides: php-%{pecl_name} = %{version}
-Provides: php-%{pecl_name}%{?_isa} = %{version}
-Provides: php-pecl(%{pecl_name}) = %{version}
-Provides: php-pecl(%{pecl_name})%{?_isa} = %{version}
+Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
+Requires: %{?scl_prefix}php(api) = %{php_core_api}
+
+Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
+Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
+Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version}
+Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
+
+%if "%{?vendor}" == "Remi Collet"
+# Other third party repo stuff
+Obsoletes: php53-pecl-uri-template
+Obsoletes: php53u-pecl-uri-template
+Obsoletes: php54-pecl-uri-template
+%if "%{php_version}" > "5.5"
+Obsoletes: php55u-pecl-uri-template
+%endif
+%if "%{php_version}" > "5.6"
+Obsoletes: php56u-pecl-uri-template
+%endif
+%endif
%if 0%{?fedora} < 20 && 0%{?rhel} < 7
# Filter shared private
@@ -179,6 +194,9 @@ rm -rf %{buildroot}
%changelog
+* Mon Mar 24 2014 Remi Collet <remi@fedoraproject.org> - 1.0-2
+- allow SCL build
+
* Tue Oct 15 2013 Remi Collet <remi@fedoraproject.org> - 1.0-1
- Update to 1.0
- install doc in pecl doc_dir